FYI, you can also see what they have done in mpi4py to by-pass this problem. I would actually highly recommend you to use mpi4py rather than implementing this from scratch your-self ;)
2015-09-17 15:21 GMT+00:00 Jeff Squyres (jsquyres) <jsquy...@cisco.com>: > Short version: > > The easiest way to do this is to configure your Open MPI installation with > --disable-dlopen. > > More detail: > > Open MPI uses a bunch of plugins for its functionality. When you dlopen > libmpi in a private namespace (like Python does), and then libmpi tries to > dlopen its plugins, the plugins can't find the symbols that they need in > the main libmpi library (because they're in a private namespace). > > The workaround is to build Open MPI with all of its plugins slurped up > into the libmpi library itself (i.e., so that Open MPI doesn't have to > dlopen its plugins). > > > > On Sep 17, 2015, at 11:08 AM, Joel Hermanns <joel.herma...@gmail.com> > wrote: > > > > Hi all, > > > > I’m currently trying to use MPI within a Python extension (written in > C++). I was able to compile the extension and import it correctly, but as > soon as I run the function, which contains the MPI code, I get the > following error: > > > > ``` > > [aia256:15841] mca: base: component_find: unable to open > /pds/opt/openmpi-1.8.7/lib64/openmpi/mca_shmem_posix: > /pds/opt/openmpi-1.8.7/lib64/openmpi/mca_shmem_posix.so: undefined symbol: > opal_shmem_base_framework (ignored) > > [aia256:15841] mca: base: component_find: unable to open > /pds/opt/openmpi-1.8.7/lib64/openmpi/mca_shmem_mmap: > /pds/opt/openmpi-1.8.7/lib64/openmpi/mca_shmem_mmap.so: undefined symbol: > opal_show_help (ignored) > > [aia256:15841] mca: base: component_find: unable to open > /pds/opt/openmpi-1.8.7/lib64/openmpi/mca_shmem_sysv: > /pds/opt/openmpi-1.8.7/lib64/openmpi/mca_shmem_sysv.so: undefined symbol: > opal_show_help (ignored) > > > > ... > > ``` > > > > (for the full message please have a look at [1]) > > > > > > I put together a minimal example to reproduce this problem, which can be > found at [1]. Essentially, it is an extension that consist of only one > function. The function basically just runs MPI_Init and MPI_Finalize. > > > > Maybe someone has some ideas what I could try to do. > > > > Thanks in advance! > > > > > > Best, > > Joel > > > > > > [1] https://github.com/jhedev/mpi_python > > _______________________________________________ > > users mailing list > > us...@open-mpi.org > > Subscription: http://www.open-mpi.org/mailman/listinfo.cgi/users > > Link to this post: > http://www.open-mpi.org/community/lists/users/2015/09/27607.php > > > -- > Jeff Squyres > jsquy...@cisco.com > For corporate legal information go to: > http://www.cisco.com/web/about/doing_business/legal/cri/ > > _______________________________________________ > users mailing list > us...@open-mpi.org > Subscription: http://www.open-mpi.org/mailman/listinfo.cgi/users > Link to this post: > http://www.open-mpi.org/community/lists/users/2015/09/27608.php > -- Kind regards Nick