Developers of parallel applications generally use the Single Program Multiple Data (SPMD) model of parallel computing, wherein a group of processes cooperate by executing identical program images on local data values. A programmer using the SPMD model has a choice of explicit or implicit means to move data between the cooperating processes. Today, the normal explicit means is via message passing and the a typical implicit means might be via data-parallel languages, such as HPF. Although using implicit means to develop parallel applications is generally thought to be easier, explicit message passing is more often used since currently developers can produce more efficient and effective parallel applications using message passing.
A basic prerequisite for message passing is a good communication API. Java comes with various ready-made packages for communication, notably an interface to BSD sockets, and the Remote Method Invocation (RMI) mechanism. Both these communication models are optimized for client-server programming, whereas the parallel computing world is mainly concerned with ``symmetric'' communication, occurring in groups of interacting peers.
This symmetric model of communication is captured in the successful Message Passing Interface standard (MPI), established a few years ago [#!MPIFORUM!#]. MPI directly supports SPMD model of parallel computing. Reliable point-to-point communication is provided through a shared, group-wide communicator, instead of socket pairs. MPI allows numerous blocking, non-blocking, buffered or synchronous communication modes. It also provides a library of true collective operations (broadcast is the most trivial example). An extended standard, MPI 2, allows for dynamic process creation and access to memory in remote processes.
The existing MPI standards specify language bindings for Fortran, C and C++. In this chapter we discuss a binding of MPI 1.1 for Java, and describe an implementation using Java wrappers to invoke C MPI calls through the Java Native Interface(JNI) [#!LIANG!#,#!GORDON!#]. The software was originally publically available from:
http://www.npac.syr.edu/projects/pcrc/mpiJavaIt has moved to
The releases of mpiJava include complete source, makefiles, configuration scripts, compiled libraries for WMPI, release test codes (based on the IBM MPI test suite), example applications, javadoc documentation, and installation and usage notes.