0

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.

xeroqu
  • 425
  • 5
  • 14
  • 1 - Check that `mpirun` launches the same version of Java: `mpirun -np 1 java -version`. 2 - Make sure that you set the Java `CLASSPATH` environment variable or provide `java` with the correct path on the command line. – Hristo Iliev Nov 12 '13 at 11:44
  • The java versions are the same. Both "1.7.0_45". IMHO, the path has no influence here. – xeroqu Nov 12 '13 at 11:51
  • Next test: what does `mpirun -np 1 echo \$DYLD_LIBRARY_PATH` show (note the backslash)? If it doesn't show the correct path, then you have to append `-x DYLD_LIBRARY_PATH` to the `mpirun` options. – Hristo Iliev Nov 12 '13 at 12:51
  • I think the path has to include `[OMPI]\lib` folder, which is correct when I echo the `DYLD_LIBRARY_PATH`. The problem lies somewhere else probably... – xeroqu Nov 12 '13 at 13:50

1 Answers1

2

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!

Jeff Squyres
  • 744
  • 4
  • 6
  • Thanks for the answer & clarification, Jeff! I'm sure many people would be glad to have this fixed asap =) – xeroqu Nov 13 '13 at 08:01