Import when using mpi4py-1.2.2 and openmpi-1.5.1-1

1,654 views
Skip to first unread message

Eduardo Lenz

unread,
Dec 17, 2010, 7:00:07 AM12/17/10
to mpi...@googlegroups.com
Hi,

after updating openmpi and mpi4py I am having the following error:


Python 2.7.1 (r271:86832, Dec  2 2010, 03:01:28) 
[GCC 4.5.1 20101125 (prerelease)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from mpi4py import MPI
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: /usr/lib/python2.7/site-packages/mpi4py/MPI.so: undefined symbol: ompi_mpi_char
>>> 

I just compiled both packages today, so I belive that something has changed (probably openmpi). 
Does someone have observed this same problem ?

Thanks,

--
Prof. Dr. Eduardo Lenz Cardoso
 +55 47 431-7233
 Departamento de Engenharia Mecanica
 Campus Universitario Prof. Avelino Marcante, S/N
 Bom Retiro - Joinville - SC - Brasil
 CEP: 89223-100
 E-mail: eduardo...@gmail.com



Lisandro Dalcin

unread,
Dec 17, 2010, 8:09:33 AM12/17/10
to mpi...@googlegroups.com
On 17 December 2010 09:00, Eduardo Lenz <eduardo...@gmail.com> wrote:
> Hi,
> after updating openmpi and mpi4py I am having the following error:
>
> Python 2.7.1 (r271:86832, Dec  2 2010, 03:01:28)
> [GCC 4.5.1 20101125 (prerelease)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
>>>> from mpi4py import MPI
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
> ImportError: /usr/lib/python2.7/site-packages/mpi4py/MPI.so: undefined
> symbol: ompi_mpi_char
>>>>
> I just compiled both packages today, so I belive that something has changed
> (probably openmpi).
> Does someone have observed this same problem ?

Not here:

$ nm /usr/local/openmpi/1.5.1/lib/libmpi.so | grep ompi_mpi_char
001d1e60 D ompi_mpi_char
001d4a60 D ompi_mpi_character


What do you get? If you get an "U" instead of "D", then your Open MPI
build is a bit broken, MPI_CHAR datatype should be available.

BTW, are you 100% sure mpi4py is linked against the 1.5.1 Open MPI libs?

$ ldd ~/lib/python/mpi4py/MPI.so
linux-gate.so.1 => (0x00312000)
libpython2.6.so.1.0 => /usr/lib/libpython2.6.so.1.0 (0x00959000)
libmpi.so.1 => /usr/local/openmpi/1.5.1/lib/libmpi.so.1 (0x00313000)
libdl.so.2 => /lib/libdl.so.2 (0x00c14000)
libnsl.so.1 => /lib/libnsl.so.1 (0x001fa000)
libutil.so.1 => /lib/libutil.so.1 (0x00237000)
libm.so.6 => /lib/libm.so.6 (0x0023b000)
libpthread.so.0 => /lib/libpthread.so.0 (0x00d64000)
libc.so.6 => /lib/libc.so.6 (0x00592000)
/lib/ld-linux.so.2 (0x00572000)

--
Lisandro Dalcin
---------------
CIMEC (INTEC/CONICET-UNL)
Predio CONICET-Santa Fe
Colectora RN 168 Km 472, Paraje El Pozo
Tel: +54-342-4511594 (ext 1011)
Tel/Fax: +54-342-4511169

Eduardo Lenz

unread,
Dec 17, 2010, 6:06:51 PM12/17/10
to mpi...@googlegroups.com
Hi,

I just realized that mpi4py linked against a new mpi instaled with a finite element program (intel mpi). It 
overwrited the openmpi settings, that I was using before. My fault.


ldd MPI.so 
        linux-vdso.so.1 =>  (0x00007fff22fff000)
        libpython2.7.so.1.0 => /usr/lib/libpython2.7.so.1.0 (0x00007f4574664000)
        libmpi.so.1 => /opt/marc2010/lib_shared/linux64/libmpi.so.1 (0x00007f45743ba000)
        libdl.so.2 => /lib/libdl.so.2 (0x00007f45741b5000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x00007f4573f98000)
        libc.so.6 => /lib/libc.so.6 (0x00007f4573c3c000)
        libutil.so.1 => /lib/libutil.so.1 (0x00007f4573a38000)
        libm.so.6 => /lib/libm.so.6 (0x00007f45737b6000)
        /lib/ld-linux-x86-64.so.2 (0x00007f4574d4a000)

Sorry for buggin you and thanks for this amazing tool.
Eduardo.

2010/12/17 Lisandro Dalcin <dal...@gmail.com>

--
You received this message because you are subscribed to the Google Groups "mpi4py" group.
To post to this group, send email to mpi...@googlegroups.com.
To unsubscribe from this group, send email to mpi4py+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/mpi4py?hl=en.

Lisandro Dalcin

unread,
Dec 17, 2010, 6:26:24 PM12/17/10
to mpi4py
On 17 December 2010 20:06, Eduardo Lenz <eduardo...@gmail.com> wrote:
> Hi,
> I just realized that mpi4py linked against a new mpi instaled with a finite
> element program (intel mpi). It
> overwrited the openmpi settings, that I was using before. My fault.
>

Oh, I see... Intel MPI is based in MPICH2, then it not compatible at
all with Open MPI.

Are you having trouble with LD_LIBRARY_PATH or something like that?
You can export/setenv LDFLAGS=-Wl,-rpath,/path/to/openmpi/lib and
re-build mpi4py, this way you do not need to set LD_LIBRARY_PATH.

Reply all
Reply to author
Forward
0 new messages