I'm trying to make neuron, python and mpich2 all work together.
compiling neuron:
Code: Select all
./configure --prefix=`pwd` --with-nrnpython=/usr/bin/python2 --with-paranrn --with-mpi MPICC=/opt/mpich2/bin/mpicc MPICXX=/opt/mpich2/bin/mpicxx && make && make install
Code: Select all
./configure --prefix=/opt/mpich2 --with-pm=smpd --with-pmi=smpd --enable-sharedlibs=gcc && make && make install
Code: Select all
Python 2.6.5 (release26-maint, Aug 22 2010, 12:25:09)
[GCC 4.4.3] on linux2
Code: Select all
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.6
creating build/lib.linux-x86_64-2.6/neuron
copying ../.././share/lib/python/neuron/sections.py -> build/lib.linux-x86_64-2.6/neuron
copying ../.././share/lib/python/neuron/doc.py -> build/lib.linux-x86_64-2.6/neuron
copying ../.././share/lib/python/neuron/gui.py -> build/lib.linux-x86_64-2.6/neuron
copying ../.././share/lib/python/neuron/__init__.py -> build/lib.linux-x86_64-2.6/neuron
creating build/lib.linux-x86_64-2.6/neuron/tests
copying ../.././share/lib/python/neuron/tests/test_all.py -> build/lib.linux-x86_64-2.6/neuron/tests
copying ../.././share/lib/python/neuron/tests/test_vector.py -> build/lib.linux-x86_64-2.6/neuron/tests
copying ../.././share/lib/python/neuron/tests/__init__.py -> build/lib.linux-x86_64-2.6/neuron/tests
running build_ext
building 'neuron.hoc' extension
creating build/temp.linux-x86_64-2.6
/opt/mpich2/bin/mpicxx -fPIC -I../.././src/oc -I../oc -I/usr/include/python2.6 -c inithoc.cpp -o build/temp.linux-x86_64-2.6/inithoc.o
In file included from /usr/include/python2.6/Python.h:8,
from inithoc.cpp:8:
/usr/include/python2.6/pyconfig.h:1067:1: warning: "_POSIX_C_SOURCE" redefined
In file included from /usr/include/stdio.h:28,
from /opt/mpich2/include/mpicxx.h:39,
from /opt/mpich2/include/mpi.h:1188,
from inithoc.cpp:3:
/usr/include/features.h:158:1: warning: this is the location of the previous definition
In file included from /usr/include/python2.6/Python.h:8,
from inithoc.cpp:8:
/usr/include/python2.6/pyconfig.h:1079:1: warning: "_XOPEN_SOURCE" redefined
In file included from /usr/include/stdio.h:28,
from /opt/mpich2/include/mpicxx.h:39,
from /opt/mpich2/include/mpi.h:1188,
from inithoc.cpp:3:
/usr/include/features.h:160:1: warning: this is the location of the previous definition
inithoc.cpp:25: warning: deprecated conversion from string constant to 'char*'
inithoc.cpp:25: warning: deprecated conversion from string constant to 'char*'
inithoc.cpp:25: warning: deprecated conversion from string constant to 'char*'
inithoc.cpp:30: warning: deprecated conversion from string constant to 'char*'
inithoc.cpp:30: warning: deprecated conversion from string constant to 'char*'
x86_64-pc-linux-gnu-g++ -pthread -shared build/temp.linux-x86_64-2.6/inithoc.o -L/usr/local/nrn/x86_64/lib -L/usr/local/iv/x86_64/lib -L/usr/lib64 -lnrnpython -lnrnoc -loc -lnrniv -livoc -lmemacs -lmeschach -lneuron_gnu -lnrnmpi -lscopmath -lsparse13 -lsundials -lIVhines -lreadline -lpython2.6 -o build/lib.linux-x86_64-2.6/neuron/hoc.so -Wl,-R/usr/local/nrn/x86_64/lib -Wl,-R/usr/local/iv/x86_64/lib
running install_lib
copying build/lib.linux-x86_64-2.6/neuron/hoc.so -> /usr/lib64/python2.6/site-packages/neuron
running install_egg_info
Removing /usr/lib64/python2.6/site-packages/NEURON-7.0-py2.6.egg-info
Writing /usr/lib64/python2.6/site-packages/NEURON-7.0-py2.6.egg-info
Code: Select all
MPICH2 Version: 1.2.1p1
MPICH2 Release date: Unknown, built on Sun Aug 22 11:13:12 IDT 2010
MPICH2 Device: ch3:nemesis
MPICH2 configure: --prefix=/opt/mpich2 --with-pm=smpd --with-pmi=smpd --enable-sharedlibs=gcc
MPICH2 CC: gcc -fPIC -O2
MPICH2 CXX: c++ -O2
MPICH2 F77: gfortran -fPIC -O2
MPICH2 F90: gfortran -O2
Code: Select all
nrniv -mpi -python
Code: Select all
ython 2.6.5 (release26-maint, Aug 22 2010, 12:25:09)
[GCC 4.4.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import neuron
/usr/lib64/python2.6/site-packages/neuron/__init__.py:92: DeprecationWarning: BaseException.message has been deprecated as of Python 2.6
"""%e.message
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib64/python2.6/site-packages/neuron/__init__.py", line 92, in <module>
"""%e.message
ImportError:
Can't import neuron.hoc module.
In case you are importing neuron from within
a directory containing neuron/__init__.py
which is not the installed neuron package for python,
move out of this directory and try again.
The original error message was:
/usr/local/nrn/x86_64/lib/libsundials.so.0: undefined symbol: MPI_Allreduce
Many thanks,
N.