Skip to content

Commit

Permalink
Merge pull request #366 from kaeldai/fix/multicore_iclamp
Browse files Browse the repository at this point in the history
Adding fix for when running current clamps across multiple cores
  • Loading branch information
kaeldai authored May 7, 2024
2 parents 704e4e4 + 2b200cd commit d1f41a1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion bmtk/simulator/bionet/modules/iclamp.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def __init__(self, input_type, **mod_args):
def initialize(self, sim):
# Get select node gids, but only for those nodes that are on the current rank (if running on multiple cores)
select_gids = list(sim.net.get_node_set(self._node_set).gids())
gids_on_rank = list(set(select_gids) & set(select_gids))
gids_on_rank = list(set(select_gids) & set(sim.local_gids))

for gid in gids_on_rank:
cell = sim.net.get_cell_gid(gid)
Expand Down
4 changes: 4 additions & 0 deletions bmtk/tests/simulator/bionet/test_iclamp.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ def __init__(self):
self.cell = None
self.vm = None

@property
def local_gids(self):
return [0]

def get_node_set(self, _):
return self

Expand Down

0 comments on commit d1f41a1

Please sign in to comment.