Using paranrn as python module does not work

General issues of interest both for network and
individual cell parallelization.

Moderator: hines

Using paranrn as python module does not work

Postby mattions » Fri Oct 09, 2009 10:22 am

Hi,

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


The code I'm running is the following:
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()


Output 1:
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


Output 2:
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


It's worth to say that if I run the binary nrniv without the mpi switch I obtain the second output.
What am I missing here?
mattions
 
Posts: 31
Joined: Tue Jul 15, 2008 11:21 am

Re: Using paranrn as python module does not work

Postby hines » Mon Oct 12, 2009 11:33 am

NEURON -- Release 7.0 (281:80827e3cd201) 2009-01-16

Try the latest alpha version
http://www.neuron.yale.edu/ftp/neuron/versions/alpha
There have been a number of changes with regard to figuring out whether or not to
add the -mpi arg when extending.
hines
Site Admin
 
Posts: 572
Joined: Wed May 18, 2005 3:32 pm

Re: Using paranrn as python module does not work

Postby mattions » Tue Oct 20, 2009 4:24 am

It works with this one.
Thanks.
mattions
 
Posts: 31
Joined: Tue Jul 15, 2008 11:21 am


Return to Parallel NEURON

Who is online

Users browsing this forum: No registered users and 1 guest