Using bionet iclamp with MPI fails due to accessing cells not on rank
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 45/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- python
- Domain
- distributed-systems, hpc
Research direction
Start in bmtk/simulator/bionet/modules/iclamp.py at initialize(), then inspect bmtk/simulator/bionet/bionetwork.py and get_cell_gid(). Reproduce the failure with the multi-rank current-clamp setup and verify that initialization accesses only cells local to each rank without raising the reported KeyError.
Written by the indexing model from the issue text.
Description
When adding a current clamp to cells on multiple ranks an error occurs when the gid isn't local to that rank -
Traceback (most recent call last):
File "generate_traces.py", line 17, in <module>
generate_parametric_traces(config)
File "/home/tbg28/git_stage/act/act/utils.py", line 238, in generate_parametric_traces
sim.run()
File "/home/tbg28/git_stage/bmtk/bmtk/simulator/bionet/biosimulator.py", line 262, in run
mod.initialize(self)
File "/home/tbg28/git_stage/bmtk/bmtk/simulator/bionet/modules/iclamp.py", line 136, in initialize
cell = sim.net.get_cell_gid(gid)
File "/home/tbg28/git_stage/bmtk/bmtk/simulator/bionet/bionetwork.py", line 124, in get_cell_gid
return self._rank_node_gids[gid]
KeyError: 0
A solution that worked for me was to update iclamp.py
# line 130
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())
+ local_gids = sim.net.get_local_cells()
+ gids_on_rank = list(set(select_gids) & set(local_gids))
- gids_on_rank = list(set(select_gids) & set(select_gids))
Will put up a PR for consideration.
- Dominant language
- Python
- Stars
- 339
- Forks
- 103
- Avg merge
- 2h 7m
- Merged PRs (30d)
- 14
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from AllenInstitute/bmtk
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
AllenInstitute/bmtk#468 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 65/100
AllenInstitute/bmtk#337 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 1-3 hours Newbie friendliness 68/100
AllenInstitute/bmtk#326 ·
Maintainers usually reply within 1 day
-
tau_syn_basis and weight coefficients for TF synapsesMay be free again @shixnya claimed this 131 days ago, and no pull request is open. Open
AllenInstitute/bmtk#463 · 1 assignee ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
AllenInstitute/bmtk#457 ·
Maintainers usually reply within 1 day
All issues in AllenInstitute/bmtk
Similar issues
-
Import errors are swallowed: PerthImplicitWatermarker silently becomes NonePossibly taken @JonRC claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
resemble-ai/Perth#23 ·
-
correction metadata
Difficulty 2/5 Under an hour Newbie friendliness 65/100
acl-org/acl-anthology#10753 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
earthtojake/text-to-cad#758 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 1-3 hours Newbie friendliness 70/100
DataTalksClub/faq#545 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day