On 13 December 2007 at 13:17, Lisandro Dalcin wrote:
| Perhaps I was not clear enough. There are many public ways of
| importing modules in Python. Modules can came mainly from two sources:
| pure Python code, or C compiled code. In the later case (called
| extension modules), they are normally a shared object
| (.so,.dylib,.dll) exporting only a simbol: 'void
| init<modulename>(void)', this functions bootstraps the initialization
| of the extension module. What is somewhat hidden is the actual way
| Python loads this shared object and calls the init function. I believe
| the reason for this is related to de gory details of dlopen()ing in
| different OS's/archs combination.
| Anyway, Python enables you to temporarily change the flags to be used
| in dlopen() calls, what is not (currently) so easy is to get the value
| of RTLD_GLOBAL in a portable way.
| Jeff, in short: I believe I solved (with the help of Brian) the issue
| in the context of Python and the platforms we have access to. So, from
| our side, things are working.
| However, I believe this issue is going to cause trouble to any other
| guy trying to load shared objects using MPI. This makes me think that
| Open MPI should be in charge or solving this, but I understand the
| situation is complex and all us are usually out of time. I'll try to
| re-read all the stuff to better understand the beast.
Just to recap: when we tried to address the same issue for the 'Rmpi' package
for GNU R, it was actually the hint in FAQ for Open MPI itself (!!) that lead
Hao (ie Rmpi's author) to the use of the RTLD_GLOBAL flag. So what Lisandro
is asking for is already (at least somewhat) addressed and documented at the
Open MPI site.
Anyway, great to hear that things work for Python too. It's always good to
have more tools.
Three out of two people have difficulties with fractions.