Parallel Neuron with Python support on an Opteron server

Post Reply
szabolcs
Posts: 8
Joined: Fri Aug 06, 2010 10:37 am

Parallel Neuron with Python support on an Opteron server

Post by szabolcs »

Dear All,

I am trying to install Neuron 7.1 with MPI and Python support, but without X11 on an Opteron blade server running Fedora 9, with the ultimate goal of using it with PyNN.

I can compile Neuron with the Python interpreter (using the options --with-nrnpython=/usr/bin/python --with-paranrn --without-x); however, when I attempt to build the Neuron shared library for Python by executing "python setup.py install" in src/nrnpython (and after replacing the IVhines library with ivos as suggested by an earlier post), I get the following error:

Code: Select all

running install
running build
running build_py
running build_ext
building 'neuron.hoc' extension
mpic++ -pthread -shared build/temp.linux-x86_64-2.5/inithoc.o -L/home/eperfa/neuron71/nrn/x86_64/lib -L -L/usr/lib64 -lnrnpython -lnrnoc -loc -lnrniv -livoc -lmemacs -lmeschach -lneuron_gnu -lnrnmpi -lscopmath -lsparse13 -lsundials -livos -lreadline -lpython2.5 -o build/lib.linux-x86_64-2.5/neuron/hoc.so -Wl,-R/home/eperfa/neuron71/nrn/x86_64/lib -Wl,-R
/usr/bin/ld: /home/eperfa/mpich2/mpich2-1.2/../lib/libmpich.a(initialized.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
/home/eperfa/mpich2/mpich2-1.2/../lib/libmpich.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
error: command 'mpic++' failed with exit status 1
No error occurs (I can build and use the shared library in PyNN) if I compile Neuron without MPI, but of course that prevents me from taking advantage of multiple processors and cores.

Could anyone help me with figuring out what to do?

Thanks a lot,

Szabolcs
hines
Site Admin
Posts: 1687
Joined: Wed May 18, 2005 3:32 pm

Re: Parallel Neuron with Python support on an Opteron server

Post by hines »

Unless you build a shared library version of mpich2, you cannot dynamically load into python. (nrniv works because when nrniv is built, mpich2 is statically linked to the
nrniv executable). If you desire to build a shared library version of mpich2, you can configure mpich2 the the configure option
'--enable-sharedlibs=gcc'
szabolcs
Posts: 8
Joined: Fri Aug 06, 2010 10:37 am

Re: Parallel Neuron with Python support on an Opteron server

Post by szabolcs »

Thank you for your help. Rebuilding mpich2 with shared library support was indeed the necessary first step, but then I also had to modify the setup.py script to get rid of an error caused in mpic++ by the remaining empty references to the missing iv libraries. In the end, I managed to make it work - I would be happy to share the details with anyone interested.

Szabolcs
Post Reply