Re: Minimal Working Example of MPI Gap Junctions (in python)
Posted: Mon Feb 11, 2013 11:31 am
The code you sent works fine in my hands. We can continue resolving this by email. For now, thought I'd mention something here which might be of use to others.
I could not run your code using
mpiexec -n 3 nrniv -mpi -python gap_mwe.py
because of the use of argparse.ArgumentParser
Also I do not have mpi4py installed so
mpiexec -n 3 python gap_mwe.py
with a subsequent
from neuron import h
would not notify neuron that it is running under mpi. therefore 3 processes all thinking they were rank 0 of 1. The solution (apart from removing your use of argparse) is
export NEURON_INIT_MPI=1
which causes "from neuron import h" to initialize MPI.
I could not run your code using
mpiexec -n 3 nrniv -mpi -python gap_mwe.py
because of the use of argparse.ArgumentParser
Also I do not have mpi4py installed so
mpiexec -n 3 python gap_mwe.py
with a subsequent
from neuron import h
would not notify neuron that it is running under mpi. therefore 3 processes all thinking they were rank 0 of 1. The solution (apart from removing your use of argparse) is
export NEURON_INIT_MPI=1
which causes "from neuron import h" to initialize MPI.