MPI-programming with Java

    MPI stands for Message Passing Interface, it is the standard API for message-passing programs.
    Java is our main programming language since 2008. Documentation for MPI under C/C++ can be found here.


 Documentation

The MPI standard: MPI reference manual & MPI 2.0 extensions

MPJ Express: the MPI implementation for java that we are using
MPJ API doc
List of MPJ Express methods
Blog with all the news

Usage documentation

MPI Quick Reference page 1, MPI Quick Reference page 2

   Installation

MPJ Express (or download directly from here) A new version (0.38) is out

    Under Windows (see Readme.html):
On our Linux cluster (see Readme.html)
   
Work on our cluster

 Run your parallel program on Windows machines

      Multicore configuration:
  1. Open a CMD window (type cmd in "Search programs and files"), go to root directory of your program
  2. Execute in the root directory of your program:
  3. To stop your parallel program: Ctrl+C
      Multicore configuration:

  1. open CMD window => start mpj daemon with C:\mpj\bin\mpjdaemon.bat
  2. put a machines file in the folder containing your code.
  3. Open a CMD window, go to root directory of your program
  4. Execute in the root directory of your program:
  5. To stop your parallel program: Ctrl+C

 Run your parallel program on our Linux cluster

On our LINUX system: Computers you can use to run in parallel: node01, node02 ... node08
Work on our cluster

 Troubleshooting

please mail unlisted problems to me

Problem
Solution
Comment
Exception in thread "main" mpi.MPIException: Usage: java MPI <myrank> <conf_file> <device_name>
You cannot directly run your java code, but should start the processes via mpjrun, as explained here.

Unrecognized option: -np5
put a space between -np and 5

Nothing happens after calling mpjrun


After calling mpjrun I get events (things like 11:23:56 EVENT Starting Jetty), but nothing more (Starting process <x> on <xx> does not appear)
restart daemon

Error MPJRuntimeException: <machines> file cannot be found
make sure there is a file named machines (no extension like .txt) in the folder in which you are calling mpjrun

InvocationTargetException followed by NullPointerException on first call to an MPI function
make sure that you called MPI.Init(args); first

InvocationTargetException
followed by
Caused by: java.lang.NullPointerException
 at <a place in your program>
there is an error or bug in your program

Bad version number in .class file
you're code is compiled with a newer version of java. Set compiler compliance level in Project Properties => Java compiler. Determine the java version by running java -version.

NullPointerException  at runtime.daemon.Wrapper.execute(Wrapper.java:158)
followed by
ClassNotFoundException: <class>
with <class> the main class that you called with mpjrun
the class file must be in the folder in which you call mpjrun, or in subfolders if class is in a package

ClassNotFoundException: <class> make sure the class is in the current folder, in a folder of the classpath or in the lib/ext folder of the current java version

runtime.MPJRuntimeException: Cannot connect to the daemon at machine <x> and port <10000>
 - there is no machine with the given address in the network (check it with ping <ip-address>)
 - there is no daemon running on that machine