Skip to content

Commit

Permalink
fixup! Write gids without offset in complexity file for load balancin…
Browse files Browse the repository at this point in the history
…g: WholeCell
  • Loading branch information
jorblancoa committed Apr 4, 2024
1 parent 510e46e commit 975bb11
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions neurodamus/cell_distributor.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,6 @@ def _init_cell_network(self):
cell.re_init_rng(self._ionchannel_seed)
nc = cell.connect2target(None) # Netcon doesnt require being stored
raw_gid = gid - self._local_nodes.offset

if self._binfo:
gid_i = int(self._binfo.gids.indwhere("==", raw_gid))
cb = self._binfo.bilist.object(self._binfo.cbindex.x[gid_i])
Expand All @@ -369,10 +368,9 @@ def _init_cell_network(self):
cell.gid = raw_gid
continue

final_gid = raw_gid if self._binfo else gid
pc.set_gid2node(final_gid, pc.id())
pc.cell(final_gid, nc)
cell.gid = final_gid # update the cell.gid last (RNGs had to use the base gid)
pc.set_gid2node(raw_gid, pc.id())
pc.cell(raw_gid, nc)
cell.gid = raw_gid # update the cell.gid last (RNGs had to use the base gid)

pc.multisplit()

Expand Down Expand Up @@ -803,7 +801,7 @@ def _cell_complexity_total_max(cx_cells):
def _compute_complexities(cls, mcomplex, cell_distributor):
cx_cell = compat.Vector("f")
pc = cell_distributor.pc
for gid in cell_distributor.local_nodes.final_gids():
for gid in cell_distributor.local_nodes.raw_gids():
cx_cell.append(mcomplex.cell_complexity(pc.gid2cell(gid)))
return cx_cell

Expand Down

0 comments on commit 975bb11

Please sign in to comment.