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 usingVampirServer
From: michael.meinel_at_[hidden]
Date: 2009-02-24 11:32:26

> > Upon further investigation, it seems to be a problem similar to
> >
> > 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?

The minimpi(.py) Python module loads the minimpiext(.c) module and calls
its minimpiext.init() method (defined in minimpiext.c) which in turn
calls MPI_Init(). "minimpiext.c" is linked against libmpi. Libmpi is
loaded as soon as Python evaluates "import minimpi".

> > 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
> #else
> return PyBool_FromInt(1);
> #endif
> 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.

You source fix looks good, I will pass it to the minimpi maintainer.
BUT: The PYTHON_MPI_INIT environment variable is used to control our
patched Python interpreter and should not be needed. The exception is
generated just after the loading of the minimpiext(.c) module already

If you replace the following line in

    except ImportError: # couldn't load the .so

with the following lines:

    except ImportError, e: # couldn't load the .so
        print e

you should get an idea why loading minimpiext failed in the first place.
These might be other incompatibilities of your platform as we usually
require Python 2.4 in our project.

Regards, Michael Meinel