next up previous
Next: Example and data types Up: The MPJ API Specification Previous: The MPJ API Specification

Rationale

The MPI standard is explicitly object-based. The C and Fortran bindings rely on ``opaque objects'' that can be manipulated only by acquiring object handles from constructor functions, and passing the handles to suitable functions in the library. The C++ binding specified in the MPI-2 standard collects these objects into suitable class hierarchies and defines most of the library functions as class member functions. The draft MPJ API specification follows this model, lifting the structure of its class hierarchy directly from the C++ binding.

The initial specification builds directly on the MPI-1 infrastructure provided by the MPI Forum, together with language bindings motivated by the C++ bindings of MPI-2. The purpose of this phase of the effort is to provide an immediate, ad hoc standardization for common message passing programs in Java, as well as to provide a basis for conversion between C, C++, Fortran 77, and Java. Eventually, support for other parts of MPI-2 also belong here, particularly dynamic process management2. The position of the working group was that the initial MPI-centric API should subsequently be extended with more object-oriented, Java-centric features, although the exact requirements for this later phase have not yet been established.

Figure 1: Principal classes of MPJ
\begin{figure}\centerline{\psfig
{figure=MPJ.eps,width=4.5in}}\end{figure}

The major classes of the MPJ specification are illustrated in Figure 1. The class MPJ only has static members. It acts as a module containing global services, such as initialization, and many global constants including the default communicator COMM_WORLD. The most important class in the package is the communicator class Comm. All communication functions in MPJ are members of Comm or its subclasses. As usual in MPI, a communicator stands for a ``collective object'' logically shared by a group of processors. The processes communicate, typically by addressing messages to their peers through the common communicator. A class that will be important in the following discussion is the Datatype class. This describes the type of the elements in the message buffers passed to send, receive, and all other communication functions.


next up previous
Next: Example and data types Up: The MPJ API Specification Previous: The MPJ API Specification
Bryan Carpenter 2004-04-24