A simple Java application to call native MPI library
====================================================
Bibrak Qamar
----------------------------------------------------


1. Compile the Java class file: javac simpleJNI_MPI.java

2. Compile the JNI wrapper library: make
	 Be sure to set the MPI_HOME, JAVA_HOME the Makefile

3. Run the app: mpirun -np 2 java -cp . -Djava.library.path=/home/user/path/to/JNI_to_MPI/ simpleJNI_MPI


Output:
Hi from 1 out of 2
Hi from 0 out of 2

(Tested on MVAPICH2.2)
	


Known Issues
============

1. java.lang.UnsatisfiedLinkError: (This occured with Open MPI. MPICH3 and MVAPICH2.2 work fine)

	 If it gives --> Exception in thread "main" java.lang.UnsatisfiedLinkError: no simpleJNI_MPI in java.library.path

	 use the full path in the simpleJNI_MPI.java code as below:

   System.load("/home/bibrak/work/JNI_to_MPI/libsimpleJNI_MPI.so");
