MPJ Express: An Implementation of MPI in
Java
Windows User Guide
1
st
April, 2010
Table of Contents
1 Introduction ............................................................................................................. 3
1.1 Configurations ..................................................................................................................................... 3
1.1.1 Multicore configuration ........................................................................................................ 3
1.1.2 Cluster configuration ............................................................................................................ 4
2
Getting Started with MPJ Express ....................................................................... 5
2.1 Pre-requisites ...................................................................................................................................... 5
2.2 Running MPJ Express in the Multi-core Configuration ....................................................................... 6
2.3 Running MPJ Express in the Cluster Configuration ............................................................................. 8
3
MPJ Express Debugging....................................................................................12
3.1 The mpjrun Script .......................................................................................................................... 12
3.2 Core Library ....................................................................................................................................... 12
3.3 MPJ Express Daemons (Cluster configuration only) ......................................................................... 12
3.3.1 Step One: Modifying the wrapper.conf file ............................................................................... 13
3.3.2 Step Two: Modifying MPJDaemon.java file ............................................................................... 13
Additional Optional Information: Running daemons in console mode on compute nodes ................ 13
4
Known Issues and Limitations ..........................................................................13
5
Contact and Support ..........................................................................................17
6
Appendices.........................................................................................................18
Appendix A: Running MPJ Express without the runtime (manually) ...................................................... 18
Appendix B: Changing protocol limit switch ........................................................................................... 20
Appendix C: MPJ Express Testsuite ......................................................................................................... 20
1 Introduction
MPJ Express is a reference implementation of the mpiJava 1.2 API, which is an MPI-like API
for Java defined by the Java Grande forum. The mpiJava 1.2 API is the Java equivalent of the
MPI 1.1 specification document (http://www.mpi-forum.org/docs/mpi-11-html/mpi-report.html).
This release of the MPJ Express software contains the core library and the runtime infrastructure.
The software also contains a comprehensive test suite that is meant to test the functionality of
various communication functions.
MPJ Express is a message passing library that can be used by application developers to execute
their parallel Java applications on compute clusters or network of computers. Compute clusters is
a popular parallel platform, which is extensively used by the High Performance Computing
(HPC) community for large scale computational work. MPJ Express is essentially a middleware
that supports communication between individual processors of clusters. The programming model
followed by MPJ Express is Single Program Multiple Data (SPMD).
Although MPJ Express is designed for distributed memory machines like network of computers
or clusters, it is possible to efficiently execute parallel user applications on desktops or laptops
that contain shared memory or multicore processors.
The MPJ Express software can be configured in two ways. The first configuration—known as
the Multicore Configuration—is used to execute MPJ Express user programs on laptops and
desktops. The second configuration—known as the Cluster Configuration—is used to execute
MPJ Express user programs on clusters or network of computers.
1.1 Configurations
The MPJ Express software can be configured to work on clusters (network of computers) or on
laptops/desktops (multicore processors).
1.1.1 Multicore configuration
The multicore configuration is meant for users who plan to write and execute parallel Java
applications using MPJ Express on their desktops or laptops—typically such hardware contains
shared memory and multicore processors. In this configuration, users can write their message
passing parallel application using MPJ Express and it will be ported automatically on multicore
processors. We envisage that users can first develop applications on their laptops and desktops
using multicore configuration, and then take the same code to distributed memory platforms
including clusters. Also this configuration is preferred for teaching purposes since students can
execute message passing code on their personal laptops and desktops. It might be noted that user
applications stay the same when executing the code in multicore or cluster configuration.
Under the hoods, the MPJ Express library starts a single thread to represent MPI process. The
multicore communication device uses efficient inter-thread mechanism.
Figure 1: MPJ Express Multicore Configuration Targets the Shared Memory and Multicore Processor Laptops and
Desktops
1.1.2 Cluster configuration
The cluster configuration is meant for users who plan to execute their parallel Java applications
on distributed memory platforms including clusters or network of computers. Application
developers can opt to use either of the two communication devices in the cluster configuration:
the communication devices including Java New I/O (NIO) device or Myrinet device.
1. Java New I/O (NIO) device driver known as
niodev
2. Myrinet device driver known as
mxdev
The Java NIO device driver (also known as
niodev
) can be used to execute MPJ Express
programs on clusters or network of computers. The niodev device driver uses Ethernet-based
interconnect for message passing. On the other hand, many clusters today are equipped with
high-performance low-latency networks like Myrinet. MPJ Express also provides a
communication device for message passing using Myrinet interconnect—this device is known as
mxdev and is implemented using the Myrinet eXpress (MX) library by Myricom. These
communication drivers can be selected using command line switches.
As an example, consider a cluster or network of computers shown in Figure 2 that shows eight
compute nodes connected to each other via private interconnect. The MPJ Express cluster
configuration will start one MPJ Express process per node, which communicates to each other
using message passing
Figure 2: MPJ Express Cluster Configuration Targets the Distributed Memory Platforms Including Clusters and
Network of Computers
2 Getting Started with MPJ Express
This section shows how MPJ Express programs can be executed in the multicore and cluster
configuration
2.1 Pre-requisites
•
1 Java 1.5 (stable) or higher
• Apache ant 1.6.2 or higher (For those who are interested in Compiling source code)
• Perl (Optional): MPJ Express needs Perl for compiling source code because some of the Java
code is generated from Perl templates. The build file will generate Java files from Perl templates
if it detects perl on the machine. It is a good idea to install Perl if you want to do some
development with MPJ Express.