As Java is a platform-neutral language there is much interest in 'porting' mpiJava to PC-based systems, in particular Windows NT and Linux. To 'port' mpiJava onto a PC environment it is necessary to have a native MPI library, a version of the Java Development Toolkit (JDK) and a C compiler. mpiJava consists of two main parts: the MPI Java classes and the C stubs that binds the MPI Java classes to the underlying native MPI implementation. We create these C stubs using JNI - the means by which Java can call and pass parameters to and from a native API. Figure 4 provides a simple schematic view of the software layers involved.
To 'port' mpiJava onto a new platform, generally two steps need to be undertaken:
The development and testing of mpiJava was undertaken on various Sun and SGI UNIX platforms using MPICH. As interfacing Java to MPI is not always trivial, in earlier implementation we often saw low-level conflicts between the Java runtime and the interrupt mechanisms used in the MPI implementations. The situation is improving as the JDK matures, in particular version 1.2 allows the use of green or native threads, which have eliminated the interrupt problem that we encountered with earlier releases of the JDK. mpiJava is now stable on NT platforms using WMPI and JDK 1.1 or later as well as UNIX platforms using MPICH and JDK 1.2.