Bundling OpenMPI may be problematic and give users more trouble than you save them as OpenMPI is very configurable and usually works best when adapted to the available communication hardware. You might consider asking users to install an MPI library and then install your software. For desktop/laptop linux users, MPI is usually in a package repository, so can be installed without too much pain. Some programs, for example Gromacs use a dummy MPI library,
https://gitlab.com/gromacs/gromacs/-/tree/main/src/external/thread_mpi

On 8/10/22 17:18, Jeff Squyres (jsquyres) via users wrote:
Let's keep the users list in the CC so that the discussion is google-able for others who may have the same questions.

It looks like the error is described in the first line: it can't find libnl-3.so.200 (provided by the distro / not part of Open MPI), which is needed by libopen-rte.so.40 (part of Open MPI).

For example, if you build+install Open MPI on a machine with libnl-3.so.200 and then transplant that Open MPI install to an equivalent machine that does not have libnl-3.so.200, you'll see this kind of error.

You should also be able to see this by running "ldd" on libopen-rte.so.40 -- it should show "not found" for libnl-3.so.200 if that library is actually unavailable.

--
Jeff Squyres
jsquy...@cisco.com
------------------------------------------------------------------------
*From:* Sebastian Gutierrez <sebasgu...@gmail.com>
*Sent:* Wednesday, August 10, 2022 3:26 AM
*To:* Jeff Squyres (jsquyres) <jsquy...@cisco.com>
*Subject:* Re: [OMPI users] Problem with OpenMPI as Third pary library
Hello,

I tried what is explained there (changed OPAL_PREFIX to the new location and changed the rpath of my executable), I even added the flags --with-hwloc and the other one because when I tried to run my program it said that it did not find the libraries. Now I got a new error that says something like this
imagen.png
Do you know why is this happening?

Thanks,

Sebastian


On Tue, Aug 9, 2022, 16:04 Jeff Squyres (jsquyres) <jsquy...@cisco.com <mailto:jsquy...@cisco.com>> wrote:

    I can't see the image that you sent; it seems to be broken.

    But I think you're asking about this:
    https://www.open-mpi.org/faq/?category=building#installdirs
    <https://www.open-mpi.org/faq/?category=building#installdirs>

-- Jeff Squyres
    jsquy...@cisco.com <mailto:jsquy...@cisco.com>
    ------------------------------------------------------------------------
    *From:* users <users-boun...@lists.open-mpi.org
    <mailto:users-boun...@lists.open-mpi.org>> on behalf of Sebastian
    Gutierrez via users <users@lists.open-mpi.org
    <mailto:users@lists.open-mpi.org>>
    *Sent:* Tuesday, August 9, 2022 9:52 AM
    *To:* users@lists.open-mpi.org <mailto:users@lists.open-mpi.org>
    <users@lists.open-mpi.org <mailto:users@lists.open-mpi.org>>
    *Cc:* Sebastian Gutierrez <sebasgu...@gmail.com
    <mailto:sebasgu...@gmail.com>>
    *Subject:* [OMPI users] Problem with OpenMPI as Third pary library

    Good morning Open-MPI organization,

    __ __

    I have been trying to distribute your program as third party library
    in my CMake Project. Because I do not want to my Linux users to have
    to install OpenMPI by their own. I just want them to use my final
    product that uses OPenMPI dependencies. When I execute make install
      of my Project in my own machine, it works perfectly but the
    problem appears when I move the executable to another machine that
    does not have installed OpenMPI (see image attached); as you can see
    when I run my executable appear this error message trying to find a
    file of yours but in an absolute path in which OpenMPI was
    installed, in fact this file does exist but not in that path, I
    would like to make everything relative to my Project origin folder.
    I used the the CMake macro ExternalProject, so that OpenMPI will be
    installed inside my project as an external dependency. Here is a
    piece of code of the config that I used to install OpenMPI

    ExternalProject_Add(____

             openmpi_external____

    __ __

             URL
    https://download.open-mpi.org/release/open-mpi/v4.1/openmpi-4.1.2.tar.gz
    
<https://download.open-mpi.org/release/open-mpi/v4.1/openmpi-4.1.2.tar.gz>____

             URL_MD5 2f86dc37b7a00b96ca964637ee68826e____

    __ __

             BUILD_IN_SOURCE 1____

             SOURCE_DIR ${CMAKE_BINARY_DIR}/toyapp/external/openmpi____

    __ __

             CONFIGURE_COMMAND____

    ${CMAKE_BINARY_DIR}/toyapp/external/openmpi/configure____

             --prefix=${CMAKE_BINARY_DIR}/toyapp/external/openmpi____

    __ __

             BUILD_COMMAND____

             make all____

    __ __

             INSTALL_COMMAND ____

             make install____

    )____

    I honestly have no idea to solve this. I wrote this email in hopes
    that you kindly help me out with this.

    I am looking forward to your answer.

    Best regards,

    Sebastian


Reply via email to