mirror of
https://github.com/logos-storage/das-research.git
synced 2026-01-04 06:03:10 +00:00
warn if no nodes for a row/column
Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
This commit is contained in:
parent
353efec141
commit
64fcbff0ef
@ -64,7 +64,10 @@ class Simulator:
|
|||||||
# If the number of nodes in a channel is smaller or equal to the
|
# If the number of nodes in a channel is smaller or equal to the
|
||||||
# requested degree, a fully connected graph is used. For n>d, a random
|
# requested degree, a fully connected graph is used. For n>d, a random
|
||||||
# d-regular graph is set up. (For n=d+1, the two are the same.)
|
# d-regular graph is set up. (For n=d+1, the two are the same.)
|
||||||
if (len(rowChannels[id]) <= self.shape.netDegree):
|
if not rowChannels[id]:
|
||||||
|
self.logger.error("No nodes for row %d !" % id, extra=self.format)
|
||||||
|
continue
|
||||||
|
elif (len(rowChannels[id]) <= self.shape.netDegree):
|
||||||
self.logger.debug("Graph fully connected with degree %d !" % (len(rowChannels[id]) - 1), extra=self.format)
|
self.logger.debug("Graph fully connected with degree %d !" % (len(rowChannels[id]) - 1), extra=self.format)
|
||||||
G = nx.complete_graph(len(rowChannels[id]))
|
G = nx.complete_graph(len(rowChannels[id]))
|
||||||
else:
|
else:
|
||||||
@ -77,7 +80,10 @@ class Simulator:
|
|||||||
val1.rowNeighbors[id].update({val2.ID : Neighbor(val2, 0, self.shape.blockSize)})
|
val1.rowNeighbors[id].update({val2.ID : Neighbor(val2, 0, self.shape.blockSize)})
|
||||||
val2.rowNeighbors[id].update({val1.ID : Neighbor(val1, 0, self.shape.blockSize)})
|
val2.rowNeighbors[id].update({val1.ID : Neighbor(val1, 0, self.shape.blockSize)})
|
||||||
|
|
||||||
if (len(columnChannels[id]) <= self.shape.netDegree):
|
if not columnChannels[id]:
|
||||||
|
self.logger.error("No nodes for column %d !" % id, extra=self.format)
|
||||||
|
continue
|
||||||
|
elif (len(columnChannels[id]) <= self.shape.netDegree):
|
||||||
self.logger.debug("Graph fully connected with degree %d !" % (len(columnChannels[id]) - 1), extra=self.format)
|
self.logger.debug("Graph fully connected with degree %d !" % (len(columnChannels[id]) - 1), extra=self.format)
|
||||||
G = nx.complete_graph(len(columnChannels[id]))
|
G = nx.complete_graph(len(columnChannels[id]))
|
||||||
else:
|
else:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user