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
> ".../mca_paffinity_linux.so: 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:
> http://www.open-mpi.org/community/lists/devel/2005/09/0359.php
> 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
> setup.py
> * Run "setup.py 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
         Py_RETURN_TRUE;
#else
         return PyBool_FromInt(1);
#endif

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

[7:53] svbu-mpi:/home/jsquyres/minimpi % sudo ./setup.py install
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.3
copying minimpi.py -> 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
cast
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/minimpiext.so
running install_lib
copying build/lib.linux-x86_64-2.3/minimpiext.so -> /usr/lib64/
python2.3/site-packages
[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