Boost C++ Libraries: Ticket #6580: problem with OpenMP > 1.3I and boost-mpi-python https://svn.boost.org/trac10/ticket/6580 <p> when installing with bjam and using openmpi for MPI, the bjam generated mpi.so can not be loaded from within python. </p> <p> the packagers for ubuntu solve this problem by putting </p> <p> mpi.so within a subdirectory boost </p> <p> so something like my_boost/lib/boost/mpi.so </p> <p> together with a <span class="underline">init</span>.py file that contains: </p> <p> import sys if sys.platform == 'linux2': </p> <blockquote> <p> import DLFCN as dl flags = sys.getdlopenflags() sys.setdlopenflags(dl.RTLD_NOW|dl.RTLD_GLOBAL) import mpi sys.setdlopenflags(flags) </p> </blockquote> <p> else: </p> <blockquote> <p> import mpi </p> </blockquote> <p> this way the mpi library can be imported as </p> <p> import boost.mpi </p> <p> this will open the <span class="underline">init</span>.py and ensure that the lib can be correctly loaded </p> <p> without this the lib should be imported as import mpi </p> <p> which fails with openmpi </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/6580 Trac 1.4.3 rrossi@… Sun, 19 Feb 2012 17:17:24 GMT <link>https://svn.boost.org/trac10/ticket/6580#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6580#comment:1</guid> <description> <p> note that <span class="underline">init</span>.py should be written as double-underscore init double-underscore </p> </description> <category>Ticket</category> </item> <item> <dc:creator>viboes</dc:creator> <pubDate>Mon, 28 May 2012 17:32:25 GMT</pubDate> <title>component changed; owner set https://svn.boost.org/trac10/ticket/6580#comment:2 https://svn.boost.org/trac10/ticket/6580#comment:2 <ul> <li><strong>owner</strong> set to <span class="trac-author">Douglas Gregor</span> </li> <li><strong>component</strong> <span class="trac-field-old">None</span> → <span class="trac-field-new">mpi</span> </li> </ul> <p> Please set the component in the future if you want it to be analyzed. </p> Ticket