I'm trying to use the parallel neuron to run my simulation
If I use the binary it works. :
Code: Select all
nrniv -python -mpi mpi_ex.py
If I use neuron as python module it doesn't
Code: Select all
python mpi_exp.py
Code: Select all
from mpi4py import MPI
import os
# Removing display to import neuron properly
if os.environ.has_key("DISPLAY"):
del os.environ['DISPLAY']
from neuron import h
pc = h.ParallelContext()
s = "mpi4py thinks I am %d of %d, NEURON thinks I am %d of %d\n"
cw = MPI.COMM_WORLD
print s % (cw.rank, cw.size, pc.id(), pc.nhost())
pc.done()
Code: Select all
mattioni@ebi-001:sandbox(master)$ bsub -I -n 4 -a openmpi mpirun.lsf -np 4 -mca btl tcp,self nrniv -python -mpi mpi_exp.py
Job <237116> is submitted to default queue <research>.
<<Waiting for dispatch ...>>
<<Starting on ebi-152>>
numprocs=4
NEURON -- Release 7.0 (281:80827e3cd201) 2009-01-16
Duke, Yale, and the BlueBrain Project -- Copyright 1984-2008
See http://www.neuron.yale.edu/credits.html
mpi4py thinks I am 0 of 4, NEURON thinks I am 0 of 4
mpi4py thinks I am 1 of 4, NEURON thinks I am 1 of 4
mpi4py thinks I am 2 of 4, NEURON thinks I am 2 of 4
mpi4py thinks I am 3 of 4, NEURON thinks I am 3 of 4
Code: Select all
mattioni@ebi-001:sandbox(master)$ bsub -I -n 4 -a openmpi mpirun.lsf -np 4 -mca btl tcp,self python mpi_exp.py
Job <237115> is submitted to default queue <research>.
<<Waiting for dispatch ...>>
<<Starting on ebi-108>>
NEURON -- Release 7.0 (281:80827e3cd201) 2009-01-16
Duke, Yale, and the BlueBrain Project -- Copyright 1984-2008
See http://www.neuron.yale.edu/credits.html
mpi4py thinks I am 2 of 4, NEURON thinks I am 0 of 1
mpi4py thinks I am 0 of 4, NEURON thinks I am 0 of 1
mpi4py thinks I am 1 of 4, NEURON thinks I am 0 of 1
mpi4py thinks I am 3 of 4, NEURON thinks I am 0 of 1
What am I missing here?