
                  mpiJava - A Java Interface to MPI
                  ---------------------------------

                     Version 1.2.5, January 2003

              Bryan Carpenter, Sung Hoon Ko, Sang Boem Lim
              Pervasive Technology Labs, Indiana University
              email {shko,slim,dbc}@grids.ucs.indiana.edu

                             Xinying Li
                         Syracuse University

                             Mark Baker
                   CSM, University of Portsmouth
                   email mark.baker@computer.org

                     Version 1.2.6, October 2010
            (Bugfixes/Additions, CMake based configure/build)
                            Blasius Czink
                     HLRS, University of Stuttgart
                     
                     
================================
 Prerequisites
================================

CMake v.2.4.6 on Windows
CMake v.2.6.0 on MacOS
CMake v.2.4.4 on all other OS

A recent JDK and the MPI implemetation of your choice.


================================
 Configuring mpijava with cmake
================================

For CMake "out-of-source" builds are the recomended way of usage i.e. a separate
directory should be created for all the configuration and build files.
Then cmake is used to create platform specific make files or project files.

CMake provides a command line tool and also graphical user interfaces (ccmake or
cmake-gui) for an easy configuration process. For easier access to all of the
cmake and mpijava related variables usage of cmake-gui is recomended.
Please enable "Grouped" and "Advanced" view in order to have full control over
all aspects of the configuration process.

Example:

- Create a directory for the build and configurations files and change to it.

- Issue the command:

  cmake -D CMAKE_INSTALL_PREFIX=<install-prefix> <mpijava-source-directory>

  Please replace <install-prefix> with the path where mpijava should be
  installed to and <mpijava-source-directory> with the path where the mpijava
  sources are located. If you only specify <mpijava-source-directory> on the
  cmake command line then mpijava will be installed to
  <mpijava-source-directory>/installed. In order to configure MPIJAVA with
  examples, tests and docs ("full install") you could use the following command
  line.
   
  cmake -D CMAKE_INSTALL_PREFIX=<install-prefix> -D MPIJAVA_BUILD_DOCS=ON \
        -D MPIJAVA_BUILD_EXAMPLES=ON -D MPIJAVA_BUILD_TESTS=ON            \
        <mpijava-source-directory>

- cmake generates makefiles by default so after configuration with cmake
  issuing:
  
  make install
  
  will build mpijava and install it.
  
  make test
  
  will perform all the mpijava tests
  

================================
 Usage
================================
Set an environment variable MPIJAVA_HOME to the mpijava installation directory
(this is not mandatory but simplifies compilation command lines a bit).

Compile your programs for example with:

  javac -cp .:$MPIJAVA_HOME/mpi.jar myapp.java
  
For running mpijava programs there is a new "prunjava" application and
on operating systems other than windows also a new shell-script prunjava.sh.
These files are located in $MPIJAVA_HOME/bin so you should add this directory to
your PATH environment variable.

For example to run the mpijava "PingPong" example change directory to
$MPIJAVA_HOME/share/mpijava/examples/PingPong
and run it with
prunjava 2 -cp ./PingPong.jar PingPong

