Opened 11 years ago

Last modified 10 years ago

#6580 new Bugs

problem with OpenMP > 1.3I and boost-mpi-python

Reported by: anonymous Owned by: Douglas Gregor
Milestone: To Be Determined Component: mpi
Version: Boost 1.48.0 Severity: Problem
Keywords: Cc: rrossi@…

Description

when installing with bjam and using openmpi for MPI, the bjam generated mpi.so can not be loaded from within python.

the packagers for ubuntu solve this problem by putting

mpi.so within a subdirectory boost

so something like my_boost/lib/boost/mpi.so

together with a init.py file that contains:

import sys if sys.platform == 'linux2':

import DLFCN as dl flags = sys.getdlopenflags() sys.setdlopenflags(dl.RTLD_NOW|dl.RTLD_GLOBAL) import mpi sys.setdlopenflags(flags)

else:

import mpi

this way the mpi library can be imported as

import boost.mpi

this will open the init.py and ensure that the lib can be correctly loaded

without this the lib should be imported as import mpi

which fails with openmpi

Change History (2)

comment:1 by rrossi@…, 11 years ago

note that init.py should be written as double-underscore init double-underscore

comment:2 by viboes, 10 years ago

Component: Nonempi
Owner: set to Douglas Gregor

Please set the component in the future if you want it to be analyzed.

Note: See TracTickets for help on using tickets.