From 22e4c89989eb42df6fe5eea244d68a3a45b5dd89 Mon Sep 17 00:00:00 2001 From: Csaba Kiraly Date: Thu, 16 Feb 2023 17:32:57 +0100 Subject: [PATCH 1/3] fix: column IDs matching row IDs Fixes a simple copy paste error. Signed-off-by: Csaba Kiraly --- DAS/validator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DAS/validator.py b/DAS/validator.py index 6344925..3270c38 100644 --- a/DAS/validator.py +++ b/DAS/validator.py @@ -50,7 +50,7 @@ class Validator: self.columnIDs = range(shape.blockSize) else: self.rowIDs = rows[(self.ID*self.shape.chi):(self.ID*self.shape.chi + self.shape.chi)] - self.columnIDs = rows[(self.ID*self.shape.chi):(self.ID*self.shape.chi + self.shape.chi)] + self.columnIDs = columns[(self.ID*self.shape.chi):(self.ID*self.shape.chi + self.shape.chi)] #if shape.deterministic: # random.seed(self.ID) #self.rowIDs = random.sample(range(self.shape.blockSize), self.shape.chi) From 8c9ddcca5598bb312db3b84b5fd7c5e53cc086dc Mon Sep 17 00:00:00 2001 From: Csaba Kiraly Date: Wed, 15 Feb 2023 02:51:47 +0100 Subject: [PATCH 2/3] add debug logging of topology Signed-off-by: Csaba Kiraly --- DAS/simulator.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/DAS/simulator.py b/DAS/simulator.py index 3e6e496..33d7794 100644 --- a/DAS/simulator.py +++ b/DAS/simulator.py @@ -75,6 +75,11 @@ class Simulator: val1.columnNeighbors[id].update({val2.ID : Neighbor(val2, self.shape.blockSize)}) val2.columnNeighbors[id].update({val1.ID : Neighbor(val1, self.shape.blockSize)}) + if self.logger.isEnabledFor(logging.DEBUG): + for i in range(1, self.shape.numberValidators): + self.logger.debug("Val %d : rowN %s", i, self.validators[i].rowNeighbors, extra=self.format) + self.logger.debug("Val %d : colN %s", i, self.validators[i].columnNeighbors, extra=self.format) + def initLogger(self): """It initializes the logger.""" logger = logging.getLogger("DAS") From 2775d180f11be032047fdc709555a2549ffc68c7 Mon Sep 17 00:00:00 2001 From: Csaba Kiraly Date: Thu, 16 Feb 2023 17:33:31 +0100 Subject: [PATCH 3/3] debug log neighborhood of producer as well Signed-off-by: Csaba Kiraly --- DAS/simulator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DAS/simulator.py b/DAS/simulator.py index 33d7794..07cd5d4 100644 --- a/DAS/simulator.py +++ b/DAS/simulator.py @@ -76,7 +76,7 @@ class Simulator: val2.columnNeighbors[id].update({val1.ID : Neighbor(val1, self.shape.blockSize)}) if self.logger.isEnabledFor(logging.DEBUG): - for i in range(1, self.shape.numberValidators): + for i in range(0, self.shape.numberValidators): self.logger.debug("Val %d : rowN %s", i, self.validators[i].rowNeighbors, extra=self.format) self.logger.debug("Val %d : colN %s", i, self.validators[i].columnNeighbors, extra=self.format)