Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding fix for when running current clamps across multiple cores #366

Merged
merged 1 commit into from
May 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading