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:
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 "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):
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
copying minimpi.py -> build/lib.linux-x86_64-2.3
building 'minimpiext' extension
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/minimpiext.so
copying build/lib.linux-x86_64-2.3/minimpiext.so -> /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)