xeroqu
xeroqu

Reputation: 435

Open MPI's Java bindings

I'm trying to build the new Java bindings of Open MPI (v.openmpi-1.9a1r29661) on Macbook Pro running Mavericks (OSX 10.9). I have the JDK 7 installed:

^_^:examples demirelo $ java -version
java version "1.7.0_45"
Java(TM) SE Runtime Environment (build 1.7.0_45-b18)
Java HotSpot(TM) 64-Bit Server VM (build 24.45-b08, mixed mode)

I configured the OMPI with that command:

./configure --enable-mpi-java --with-platform=optimized --with-jdk-dir=/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home --prefix=/Users/demirelo/libs/openmpi

which is followed by the usual suspect:

make all install

When I tried to run the HelloWorld example, I received the following runtime error:

^_^:examples demirelo $ ../bin/mpijavac Hello.java 
^_^:examples demirelo $ ../bin/mpirun -np 1 java Hello 
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.

Moreover, the ~/.bash_profile has the correct path to the /lib folder.

export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:/Users/demirelo/libs/openmpi/lib/

It's quite mysterious which libraries failed. Previously, I was able to build slightly older version (openmpi-1.9a1r28578) on Lion and still use it on Mavericks. This time I needed a freshly compiled OMPI but didn't work out. I'm wondering if anyone else had the same issue with Mavericks and was able to fix it.

Upvotes: 0

Views: 1102

Answers (1)

Jeff Squyres
Jeff Squyres

Reputation: 764

This appears to be a bug in Open MPI that is comprised of at least two issues:

  1. OMPI is hard-coded to try to dlopen libmpi.so, which is the wrong name on OS X (it should be libmpi.dylib).
  2. Even after I fix that, I'm running into another Java error that I need to run by the Java programmers.

Apparently, we haven't tested the OMPI Java bindings on OS X in a long time. :-(

Such is the life of running against the SVN trunk. Sorry!

Upvotes: 2

Related Questions