[mvapich-discuss] Error while compiling mpi4py with MVAPICH

senthil.natesan at ndsu.edu senthil.natesan at ndsu.edu
Thu Sep 30 19:00:44 EDT 2010


Hi Jonathan,

Thanks for the suggestion. I was running an application using mvapich2, so
I didn't want to disturb until it finished now. Today I installed the
recommended latest version. But still it is showing the same error when I
am trying to compile mpi4py.

-----------------------------------------------------------------------
[root at craycx1 mpi4py-1.2.1]# python2.7 setup.py build
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/mpi4py
copying src/rc.py -> build/lib.linux-x86_64-2.7/mpi4py
copying src/__init__.py -> build/lib.linux-x86_64-2.7/mpi4py
creating build/lib.linux-x86_64-2.7/mpi4py/include
creating build/lib.linux-x86_64-2.7/mpi4py/include/mpi4py
copying src/include/mpi4py/mpi4py.MPI.h ->
build/lib.linux-x86_64-2.7/mpi4py/include/mpi4py
copying src/include/mpi4py/mpi4py.h ->
build/lib.linux-x86_64-2.7/mpi4py/include/mpi4py
copying src/include/mpi4py/mpi4py.MPI_api.h ->
build/lib.linux-x86_64-2.7/mpi4py/include/mpi4py
copying src/include/mpi4py/mpi_c.pxd ->
build/lib.linux-x86_64-2.7/mpi4py/include/mpi4py
copying src/include/mpi4py/MPI.pxd ->
build/lib.linux-x86_64-2.7/mpi4py/include/mpi4py
copying src/include/mpi4py/__init__.pxd ->
build/lib.linux-x86_64-2.7/mpi4py/include/mpi4py
copying src/include/mpi4py/__init__.pyx ->
build/lib.linux-x86_64-2.7/mpi4py/include/mpi4py
copying src/include/mpi4py/mpi.pxi ->
build/lib.linux-x86_64-2.7/mpi4py/include/mpi4py
copying src/include/mpi4py/mpi4py.i ->
build/lib.linux-x86_64-2.7/mpi4py/include/mpi4py
running build_ext
MPI C compiler:    /usr/mpi/gcc/mvapich2-1.5.1p1/bin/mpicc
MPI C++ compiler:  /usr/mpi/gcc/mvapich2-1.5.1p1/bin/mpicxx
MPI linker:        /usr/mpi/gcc/mvapich2-1.5.1p1/bin/mpicc
checking for MPI compile and link ...
/usr/mpi/gcc/mvapich2-1.5.1p1/bin/mpicc -fPIC -fno-strict-aliasing
-DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes
-I/usr/local/include/python2.7 -c _configtest.c -o _configtest.o
/usr/mpi/gcc/mvapich2-1.5.1p1/bin/mpicc _configtest.o -o _configtest
success!
removing: _configtest.c _configtest.o _configtest
checking for MPE availability ...
checking for header 'mpe.h' ...
/usr/mpi/gcc/mvapich2-1.5.1p1/bin/mpicc -fPIC -fno-strict-aliasing
-DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes
-I/usr/local/include/python2.7 -c _configtest.c -o _configtest.o
success!
removing: _configtest.c _configtest.o
succes!
checking for function 'MPE_Init_log' ...
/usr/mpi/gcc/mvapich2-1.5.1p1/bin/mpicc -fPIC -fno-strict-aliasing
-DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes
-I/usr/local/include/python2.7 -c _configtest.c -o _configtest.o
/usr/mpi/gcc/mvapich2-1.5.1p1/bin/mpicc _configtest.o -lmpe -o _configtest
success!
removing: _configtest.c _configtest.o _configtest
building 'mpi4py.MPI' extension
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/src
/usr/mpi/gcc/mvapich2-1.5.1p1/bin/mpicc -fPIC -fno-strict-aliasing
-DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes
-I/usr/local/include/python2.7 -c src/MPI.c -o
build/temp.linux-x86_64-2.7/src/MPI.o
/usr/mpi/gcc/mvapich2-1.5.1p1/bin/mpicc -shared
build/temp.linux-x86_64-2.7/src/MPI.o -o
build/lib.linux-x86_64-2.7/mpi4py/MPI.so
/usr/bin/ld:
/usr/mpi/gcc/mvapich2-1.5.1p1/lib/libmpich.a(comm_create_keyval.o):
relocation R_X86_64_32 against `MPID_Keyval_mem' can not be used when
making a shared object; recompile with -fPIC
/usr/mpi/gcc/mvapich2-1.5.1p1/lib/libmpich.a: could not read symbols: Bad
value
collect2: ld returned 1 exit status
error: command '/usr/mpi/gcc/mvapich2-1.5.1p1/bin/mpicc' failed with exit
status 1

----------------------------------------------------------------

As I mentioned earlier, I was able to compile with MPICH2.
It would be great if you can suggest any way out.

thanks,

Senthil


Jonathan wrote:

> It looks like you're trying to create a shared library using objects
> that were not compiled with -fPIC in the static libmpich.a library.
> You may have a bug that was fixed with the mvapich2-1.5.1p1 release.
> Please install this version and see if you still encounter this issue.
>
> For your convenience:
> http://mvapich.cse.ohio-state.edu/download/mvapich2/mvapich2-1.5.1p1.tgz
>
> --
> Jonathan Perkins
> http://www.cse.ohio-state.edu/~perkinjo
>
>




More information about the mvapich-discuss mailing list