-
Notifications
You must be signed in to change notification settings - Fork 132
Closed
Description
When mpi4py is imported before h.nrnmpi_init() is called, all nodes think they are node 0.
This might be because mpi4py calls MPI.Init() and MPI.Init_thread if MPI hasn't been initialized at that point.
Reproducers
nrnmpi_init first (IDs OK)
from neuron import h
h.nrnmpi_init()
pc = h.ParallelContext()
from mpi4py import MPI
print("I am MPI rank", MPI.COMM_WORLD.rank, "but have ParallelContext ID", pc.id())
h.quit()MPI Init first (IDs not OK)
from neuron import h
from mpi4py import MPI
h.nrnmpi_init()
pc = h.ParallelContext()
print("I am MPI rank", MPI.COMM_WORLD.rank, "but have ParallelContext ID", pc.id())
h.quit()Metadata
Metadata
Assignees
Labels
No labels