Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Open MPI User's mailing list

Subject: Re: [OMPI users] Problems in 1.3 loading shared libs when using VampirServer
From: Jeff Squyres (jsquyres_at_[hidden])
Date: 2009-02-24 10:55:16

On Feb 24, 2009, at 10:29 AM, <michael.meinel_at_[hidden]> wrote:

> I have a runtime-linking problem with MPI 1.3 that is very similar.
> We apply MPI in a Python-based framework. For some platforms we use a
> patched Python version that does the MPI_Init() call.
> On some machines we use an unmodified Python with a small module
> (minimpi) that cares for the MPI_Init/Finalize calls.
> Starting with OpenMPI 1.3 the minimpi module crashes with the error
> ".../ undefined symbol:
> mca_base_param_reg_int".

Sounds like the same dynamic linker issue.

> Upon further investigation, it seems to be a problem similar to this:
> The dynamic parts of the library are however no more linked against
> their frameworks.

I looked at your tarball -- I don't know anything about Python, so I
don't fully understand it. Where does it load in libmpi?

> To try it out yourself, please feel free to use the attached code.
> * Make sure to adapt the pathes to your OpenMPI implementation in
> * Run " install"
> * Start Python
> * type "import minimpi" and the application should crash.

I had to change your code slightly for my version of python (probably
ancient -- whatever ships in RHEL4):

#if 0
         return PyBool_FromInt(1);

I then was able to "./ install" properly. It looks like you
also need to setenv PYTHON_MPI_INIT to some non-empty value as well;
otherwise raises an error at import time.

[7:53] svbu-mpi:/home/jsquyres/minimpi % sudo ./ install
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.3
copying -> build/lib.linux-x86_64-2.3
running build_ext
building 'minimpiext' extension
creating build/temp.linux-x86_64-2.3
gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 -g -pipe -m64 -
D_GNU_SOURCE -fPIC -fPIC -I/home/jsquyres/bogus/include -I/usr/include/
python2.3 -c minimpiext.c -o build/temp.linux-x86_64-2.3/minimpiext.o
minimpiext.c: In function `finalize':
minimpiext.c:91: warning: return makes pointer from integer without a
gcc -pthread -shared build/temp.linux-x86_64-2.3/minimpiext.o -L/home/
jsquyres/bogus/lib -lmpi -o build/lib.linux-x86_64-2.3/
running install_lib
copying build/lib.linux-x86_64-2.3/ -> /usr/lib64/
[7:54] svbu-mpi:/home/jsquyres/minimpi % python
Python 2.3.4 (#1, Feb 6 2006, 10:38:45)
[GCC 3.4.5 20051201 (Red Hat 3.4.5-2)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import minimpi

It didn't seem to crash for me -- is there something else I should
do? (I know little/nothing about Python)

Jeff Squyres
Cisco Systems