next up previous
Next: HPJava an HPspmd language Up: Semantic Checking in HPJava Previous: Semantic Checking in HPJava

Introduction

HPJava [3] is a Java language binding of a programming model we call the HPspmd model. This is a particular version of the general SPMD programming model that adds special support for distributed arrays of the kind defined by the HPF standard. The arrays are bound to the base language through a series of syntax extensions. The assumption is that the syntax extensions will be handled by a relatively simple preprocessor which emits an SPMD program in the base language.

Of course this implementation strategy has been followed with varying degrees of success in many translation systems for HPF and similar languages [7,9]. The difference in the HPspmd approach is that it is assumed the source code is already written in an explicitly MIMD style. The HPspmd syntax provides only a thin veneer on low-level SPMD programming, and the transformations applied by the translator are relatively simple and direct--no non-trivial analysis should be needed to obtain good parallel performance. Meanwhile the language model provides a uniform model of a distributed array, which can be targetted by libraries for parallel communication and arithmetic.

SPMD programming has been very successful. There are countless applications written in the most basic SPMD style, using direct message-passing through MPI [10] or similar low-level packages. Many higher-level parallel programming environments and libraries assume the SPMD style as their basic model. Examples include ScaLAPACK [1], DAGH [13], Kelp [5] and the Global Array Toolkit [11]. While there remains a prejudice that HPF is best suited for problems with very regular data structures and regular data access patterns, SPMD frameworks like DAGH and Kelp have been designed to deal directly with irregularly distributed data, and other libraries like CHAOS/PARTI [4] and Global Arrays support unstructured access to distributed arrays.

These successes aside, the library-based SPMD approach to data-parallel programming lacks the uniformity and elegance of HPF. All the environments referred to above have some idea of a distributed array, but they all describe those arrays differently. Compared with HPF, creating distributed arrays and accessing their local and remote elements is clumsy and error-prone. Because the arrays are managed entirely in libraries, the compiler offers little support and no safety net of compile-time or compiler-generated run-time checking. These observations motivate our introduction of the HPspmd model.

This article concentrates in particular on the issue of semantic checking in HPspmd languages. The basic features of the HPspmd language model are introduced in the Java context in section 2. Section 3 adds a discussion of array sections. This discussion serves to introduce the ideas of subranges and general process groups in HPspmd. Building on these ideas, section 4 describes some general rules about access to distributed array elements, and section 5 describes how a translator can ensure these conditions are met.


next up previous
Next: HPJava an HPspmd language Up: Semantic Checking in HPJava Previous: Semantic Checking in HPJava
Bryan Carpenter 2002-07-11