Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Open MPI User's mailing list

Subject: Re: [OMPI users] Java bindings failed to load required libraries
From: Georg Ruzicka (82ruge1bif_at_[hidden])
Date: 2012-11-06 12:13:12


I installed everything like it is described in the hacking file.
So I have libtool installed.
I installed it in ~/tools/installed, added .../installed/lib to LD_LIBRARY_PATH
and .../installed/bin to PATH

and after 'autogen.pl' i added '--with-libltdl=/home/georg/tools/installed' to configure.

See

../configure --prefix=/home/georg/ompi-svn/build-debug --with-platform=optimized --enable-mpi-java --with-libltdl=/home/georg/tools/installed --with-jdk-dir=/opt/jdk1.7.0_09 --enable-debug

Now I tried it many times, but since the first installation i have this fault.

I think the problem is in mpi_MPI.c.

#if OPAL_HAVE_LTDL_ADVISE
    /* open the library into the global namespace */
    if (lt_dladvise_init(&advise)) {
        opal_output(0, "LT_DLADVISE INIT FAILED - CANNOT LOAD LIBOMPI");
        return JNI_FALSE;
    }

    if (lt_dladvise_ext(&advise)) {
        opal_output(0, "LT_DLADVISE EXT FAILED - CANNOT LOAD LIBOMPI");
        lt_dladvise_destroy(&advise);
        return JNI_FALSE;
    }

    if (lt_dladvise_global(&advise)) {
        opal_output(0, "LT_DLADVISE GLOBAL FAILED - CANNOT LOAD LIBOMPI");
        lt_dladvise_destroy(&advise);
        return JNI_FALSE;
    }

    /* we don't care about the return value
     * on dlopen - it might return an error
     * because the lib is already loaded,
     * depending on the way we were built
     */
    lt_dlopenadvise("libmpi", advise);
    lt_dladvise_destroy(&advise);

    return JNI_TRUE;
#endif
    opal_output(0, "NO LT_DLADVISE - CANNOT LOAD LIBOMPI");
    /* need to balance the ltdl inits */
    lt_dlexit();
    /* if we don't have advise, then we are hosed */
    return JNI_FALSE;

I looked in the config.log and there stand:
#define OPAL_HAVE_LTDL_ADVISE 0

I think this meens no advice?

So how can I activate advise?
In the configure --help is only the --enable-dlopen option.
But it should be enabled by default.

----- Ursprüngliche Mail -----
Von: "Ralph Castain" <rhc_at_[hidden]>
An: "Open MPI Users" <users_at_[hidden]>
Gesendet: Mittwoch, 31. Oktober 2012 15:26:45 GMT +01:00 Amsterdam/Berlin/Bern/Rom/Stockholm/Wien
Betreff: Re: [OMPI users] Java bindings failed to load required libraries

The "libompi" was just a shorthand way of saying it can't load the OMPI libraries - it actually is looking for the libopen-rte in your /lib directory.

But that isn't the problem. The problem is that we require ltdladvise in order to correctly load those libraries. Given that you are building from an svn checkout, we require that this be installed on your machine. Ubuntu does not install this by default, so you have to do it yourself.

You can do this in two ways:

1. you could look for a libtool package and install it. For example, yum shows it has "libtool-ltdl" that you could load

2. you could go to the gnu site and download libtool yourself, build it, and then ensure it is in your default path

Either way will work.

On Oct 31, 2012, at 7:11 AM, Georg Ruzicka <82ruge1bif_at_[hidden]> wrote:

> Hello again.
>
> The fault is still there and I can't locate it.
>
> It seem's the first part of the message came from the file
> ompi/mpi/java/c/mpi_MPI.c : NO LT_DLADVISE - CANNOT LOAD LIBOMPI
> and the second part from
> ompi/mpi/java/java/MPI.java
>
> I run a 'make install' in both directories.
> As the result I get a mpi.jar and the libmpi_java libraries installed in
> /buildpath/lib
> of my open mpi installation.
>
> I also searched for the libompi but can't find anything.
> I have a 'libmpi.la' library in my /lib directory but no libompi.
>
>
> Any ideas?
>
> Thanks Georg
>
>
>
>
>
> ----- Ursprüngliche Mail -----
> Betreff: Java bindings failed to load required libraries
>
> Hello.
>
> I installed open mpi and try to run the examples.
> I used the developer trunk.
> C, C++ and Fortran90 examples compiling and running well.
>
> When i tried to run the compiled Hello.java class
> i get this messages:
>
> georg_at_ThinkPad-R61:~/ompi-svn/examples$ mpirun java Hello
> [ThinkPad-R61:19720] NO LT_DLADVISE - CANNOT LOAD LIBOMPI
> JAVA BINDINGS FAILED TO LOAD REQUIRED LIBRARIES
> -------------------------------------------------------
> Primary job terminated normally, but 1 process returned
> a non-zero exit code.. Per user-direction, the job has been aborted.
> -------------------------------------------------------
> --------------------------------------------------------------------------
> mpirun detected that one or more processes exited with non-zero status, thus causing
> the job to be terminated. The first process to do so was:
>
> Process name: [[43465,1],0]
> Exit code: 1
> --------------------------------------------------------------------------
>
>
> I configure with:
> ./configure --prefix=/home/georg/ompi-install1 --with-platform=optimized --enable-mpi-java --with-jdk-dir=/opt/jdk1.7.0_09
>
> I work with ubuntu 10.10.
>
> I added to .bashrc:
> export PATH=$PATH:/home/georg/tools/installed/bin:/home/georg/ompi-install1/bin:/opt/jdk1.7.0_09/bin:/opt/jdk1.7.0_09
> export LD_LIBRARY_PATH=$LB_LIBRARY_PATH:/home/georg/ompi-install1/lib:/home/georg/ompi-install1/lib/openmpi:/home/georg/ompi-install1/lib/pkgconfig
>
> I can compile and run java progs
>
> Did anyone know the fault?
>
> Thanks.
>
>
>
>
> _______________________________________________
> users mailing list
> users_at_[hidden]
> http://www.open-mpi.org/mailman/listinfo.cgi/users

_______________________________________________
users mailing list
users_at_[hidden]
http://www.open-mpi.org/mailman/listinfo.cgi/users