next up previous contents index
Next: Java Language Binding Up: The HPspmd Model and Previous: The HPspmd Model and   Contents   Index

Introduction

In this chapter we introduce the HPJava HPJava language, a programming language that extends Java for parallel programming on message passing systems -- from multiprocessor systems to workstation clusters.

HPJava owes much to High Performanace Fortran (HPF) [4]. Its model of data distribution is adapted directly from the HPF model. The heritage of HPF can be traced back to Fortran dialects that were implemented most successfully on SIMD and other tightly-coupled MPP architectures. While it was always a goal of the HPF designers that the language should be efficiently implementable on the more loosely coupled MIMD clusters that dominate today, the complexity of the language -- and notably the design goal of emulating exactly the semantics of a sequential Fortran program -- have made efficient implementation on today's architectures quite hard.

HPJava, in contrast, starts from the assumption that the target hardware is a set of interacting MIMD processors, and exposes that assumption explictly in its programming model. This greatly simplifies the task of the compiler, and increases the chance of obtaining efficient implementations on architectures including PC and workstation clusters. Instead of the HPF programming model, the language introduces a high-level structured SPMD programming style -- the HPspmd HPspmd model. A program written in this class of language explicitly coordinates well-defined process groups. These cooperate in a loosely synchronous manner, sharing logical threads of control. As in a conventional distributed-memory SPMD program, only a process owning a data item such as an array element is allowed to access the item directly. The language provides special constructs that allow programmers to meet this constraint conveniently.

Besides the normal variables of the sequential base language, the language model introduces classes of global variables that are stored collectively across process groups. Primarily, these are distributed arrays. They provide a global name space in the form of globally subscripted arrays, with assorted distribution patterns. This helps to relieve programmers of error-prone activities such as the local-to-global, global-to-local subscript translations which occur in data parallel applications.

In addition to special data types, the language provides special constructs to facilitate both data parallel and task parallel programming. Through these constructs different processors can work either simultaneously on globally addressed data, or independently to execute complex procedures on locally held data. The conversion between these phases is seamless.

In the traditional SPMD mold, the language itself does not provide implicit data movement semantics. This greatly simplifies the task of the compiler, and should encourage programmers to use algorithms that exploit locality. Data on remote processors is accessed exclusively through explicit library calls. In particular, the initial HPJava implementation relies on a library of collective communication routines originally developed as part of an HPF run-time library. Other distributed-array-oriented communication libraries may be bound to the language later. Due to the explicit SPMD programming model, low level MPI communication is always available as a fallback. The language itself only provides basic concepts to organize data arrays and process groups. Different communication patterns are implemented as library functions. This allows the possibility that if a new communication pattern is needed, it is relatively easily integrated through new libraries.

In our earlier work on HPF compilation [10] the role of run-time support was emphasized. Difficulties in compiling HPF efficiently suggested to make the run-time communication library directly visible in the programming model. Since Java is a simple, elegant language, we are implementing our prototype based upon this language.

Section 1.2 reviews the HPspmd model in the context of the HPJava language. Section 1.3 describes the class library packages used in code generated by the HPJava translator, and thus exposes many of the implementation issues. Some examples of simple algorithms expressed in HPJava are given in Section 1.4. Then Section 1.5 discusses the rationale of various design decisions in the language. The status of the project and future goals are summarized in Sections 1.6 and 1.7.


next up previous contents index
Next: Java Language Binding Up: The HPspmd Model and Previous: The HPspmd Model and   Contents   Index
Bryan Carpenter 2002-07-11