Structured Parallel Programming : How Informatics Can Help Overcome the Software Dilemma

The state-of-the-art programming of parallel computers is far from being successful. The main challenge today is, therefore, the development of techniques and tools that improve programmers' productivity. Programmability, portability, and reusability are key issues to be solved. In this article we shall report about our ongoing efforts in this direction. After a short discussion of the software dilemma found today, we shall present the Basel approach. We shall summarize our algorithm description methodology and discuss the basic concepts of the proposed skeleton language. An algorithmic example and comments on implementation aspects will explain our work in more detail. We shall summarize the current state of the implementation and conclude with a discussion of related work. © 1996 by John Wiley & Sons, Inc. 1 SOFTWARE IS THE PROBLEM Computer power is a precondition to tackle sci entific problems. The term Grand Challenges has been coined for the variety of applications that need to be solved, and the discussion has sometimes been reduced to the question of who will have the first teraflop computer. However, this approach has already been critized [2]. We believe that the real challenge is to develop concepts that enable programmers to use parallel systems in a more productive way. Today, software development for parallel systems is still in its infancy. Programs are written by using low-level concepts, reReceived November 1994 Revised September 1995 © 1996 by John Wiley & Sons. Inc. Scientific Programming, Vol. 5. pp. 33-45 (1996) CCC 1058-9244/96/010033-13 suiting in software that is often neither portable, reusable, nor maintainable [3]. To overcome this software dilemma, sound software engineering techniques need to be applied. Structured programming was introduced by informaticians two decades ago to overcome the software crisis of sequential systems. Other techniques have since followed. It is high time to transfer successful software production techniques to parallel processing! What we need is progress toward the solution of the "big P" challenges: programmability portability performance. We like to have programmability at a high level of abstraction to get correct and maintainable software. However, this influences the performance because high-level constructs are always in danger of performance loss. We also prefer to have portable software to minimize software changes if the computer environment changes. But a very high level of portability is again a source of inefficient solutions. In a 34 BURKHART, FRANK, AND HACHLER word: These three attributes can only be optimized together. It is one of the main challenges today to develop high-level abstractions that still preserve the performance that users expect of parallel svstems. 2 THE BASEL APPROACH What basic elements are necessary for further progress in programming parallel systems? Below, we shall list the problem areas we consider to be priority topics. 2.1 Developing a Taxonomy Describing the Essential Elements of Parallel Algorithms Many research projects emphasize the need for more "programming tools." There is no doubt that tools are needed to develop parallel processor software (we. too, are building tools within our project as you will see). However. tools can easily become obsolete as soon as new generations of parallel systems are announced. Programming methodology. on the other hand, has to remain stable over a much longer period. This is the reason why the first step will have to be the investigation of methodological aspects, such as the development of a common terminology, algorithmic descriptions and classifications. as well as concepts on how to address software problems. As parallel processing projects are usually interdisciplinary, a common conceptual base used by people with different backgrounds is essential. 2.2 Supporting High-Level Abstractions for Parallel Programming Programming parallel systems at a mainly systemoriented level is a major weakness of today's environments. Having developed a methodology of the type mentioned above, the next step will have to consist of transferring these concepts into languages and programming tools. Instead of integrating these-concepts within a single language (e.g., High-Performance Fortran) we propose a separation into two language levels: 1. The core of a parallel application, we call it a skeleton, should be written in a language that as much as possible enforces programmability and correctness. This statement certainly applies to programming in general. For parallel systems it is, however, even more important because parallel programs arealways more complicated than sequential programs. Carriero and Gelernter [7] already introduced the notion of coordination languages for this level. The coordination of processes is certainly one aspect that is important. However, there are other aspects that are equally important: management of data, support of compositional programming using basic software building blocks, etc. This is the reason why we call it the layer of a skeleton programming language. 2. On the basic building block level traditional languages should be used for programming. Today, Fortran and C dominate science and engineering applications. The investment in existing software is tremendous, and informaticians should not ignore these economical aspects. 2.3 Make Parallel Software Reusable One challenge of software development is the software factory. i.e., the availability of building blocks that may he reused. \Ve cannot expect complete application programs to he reusable because there are always slight differences. even in the same problem domain, e.g .. different calculation sequences and different input/ output formats. We can. though, expect to get reusable component,; on two levels of granularity. 1. Reuse-in-the-large targets for reusable program parts that are building blocks for application programs. This is possible for regular problems using only a small number of coordination schemes. On massively parallel systems, this trend is emphasized because hundreds or thousands of different processes cannot possibly be managed individually. Libraries of algorithmic skeletons will play a central role. 2. If such a librarv offers no solution there is still a possibility to apply the reuse-in-thesmall concept. Reusable process topology and data distribution patterns will always be necessary for writing parallel programs. Such a support can be given either on the language or library level. 2.4 Make Parallel Software Portable The software dilemma mentioned above has been tackled from the system side. High-level interfaces, FIGUHE 1 The Basel approach. :-;o-called parallel virtual machines, have been defined to hide the existence of the different operating svstems and architectures. PAR\1ACS, EXPRESS, PlCL, PYM .. MPL and p4 are a subset of the models mentioned in the respective literature ([22] presents an up-to-date list). ~lost of these models are very similar because they address the same type of parallel computers. so-called message-passing systems. In the near future, standardization (e.g., ~IPI) will provide a technical basis. It is crucial that software researchers benefit from these developments and offer support in the form of libraries and tools. Our project provides answers to these four topics (Fig. 1 presents the core items): 1. BACS (Basel Algorithm Classification Scheme), the vocabulary and methodology for describing parallel algorithms and programs. 2. AL WAN, the language used for writing algorithmic skeletons offering reuse-in -thesmall constructs. 3. BALI, a library of reuse-in-the-large constructs: algorithmic skeletons that contain AL W AI'\ modules to be modified and extended by programmers. 4. TIANA, the program generator that produces portable source code sksletons for different target systems and programming languages. This integrated approach provides additional STRGCTURED P AHALLEL PROGRAYIMING 35 benefits. Different user groups may interact and profit from synergies by using common sy:-;tem elements: programmers (how to program?), benchmarkers (how to evaluate?). and students (how to learn?) who share common systern components. Both programmers and benchmarkers benefit from the skeleton approach because skeletons can be completed Pither into application programs or synthetic benchmark suites by adding artificial loads. Finally. teaching and resParch nicely interact because the library can offer both courseware and production software. In this article. we shall summarize BACS and concentrate on AL \VAl\" and TIAl\"A. 3 BACS: A FRAMEWORK FOR PARALLELISM BACS [ 4] is a framework for the de:,;cription and classification of parallel algorithms. As will be shown in Section 4, it also provides a terminological platform on which structured programming of parallel systems can be built.


SOFTWARE IS THE PROBLEM
Computer power is a precondition to tackle sci entific problems.The term Grand Challenges has been coined for the variety of applications that need to be solved, and the discussion has sometimes been reduced to the question of who will have the first teraflop computer.However, this approach has already been critized [2].We believe that the real challenge is to develop concepts that enable programmers to use parallel systems in a more productive way.Today, software development for parallel systems is still in its infancy.Programs are written by using low-level concepts, re-suiting in software that is often neither portable, reusable, nor maintainable [3].
To overcome this software dilemma, sound software engineering techniques need to be applied.
Structured programming was introduced by informaticians two decades ago to overcome the software crisis of sequential systems.Other techniques have since followed.It is high time to transfer successful software production techniques to parallel processing!What we need is progress toward the solution of the "big P" challenges: programmabilityportability -performance.We like to have programmability at a high level of abstraction to get correct and maintainable software.However, this influences the performance because high-level constructs are always in danger of performance loss.We also prefer to have portable software to minimize software changes if the computer environment changes.But a very high level of portability is again a source of inefficient solutions.In a word: These three attributes can only be optimized together.It is one of the main challenges today to develop high-level abstractions that still preserve the performance that users expect of parallel svstems.

THE BASEL APPROACH
What basic elements are necessary for further progress in programming parallel systems?Below, we shall list the problem areas we consider to be priority topics.

Developing a Taxonomy Describing the Essential Elements of Parallel Algorithms
Many research projects emphasize the need for more "programming tools."There is no doubt that tools are needed to develop parallel processor software (we.too, are building tools within our project as you will see).However.tools can easily become obsolete as soon as new generations of parallel systems are announced.Programming methodology.on the other hand, has to remain stable over a much longer period.This is the reason why the first step will have to be the investigation of methodological aspects, such as the development of a common terminology, algorithmic descriptions and classifications.as well as concepts on how to address software problems.As parallel processing projects are usually interdisciplinary, a common conceptual base used by people with different backgrounds is essential.

Supporting High-Level Abstractions for Parallel Programming
Programming parallel systems at a mainly systemoriented level is a major weakness of today's environments.Having developed a methodology of the type mentioned above, the next step will have to consist of transferring these concepts into languages and programming tools.Instead of integrating these-concepts within a single language (e.g., High-Performance Fortran) we propose a separation into two language levels: 1.The core of a parallel application, we call it a skeleton, should be written in a language that as much as possible enforces programmability and correctness.This statement certainly applies to programming in general.
For parallel systems it is, however, even more important because parallel programs arealways more complicated than sequential programs.Carriero and Gelernter [7] already introduced the notion of coordination languages for this level.The coordination of processes is certainly one aspect that is important.However, there are other aspects that are equally important: management of data, support of compositional programming using basic software building blocks, etc.This is the reason why we call it the layer of a skeleton programming language.2. On the basic building block level traditional languages should be used for programming.Today, Fortran and C dominate science and engineering applications.The investment in existing software is tremendous, and informaticians should not ignore these economical aspects.

Make Parallel Software Reusable
One challenge of software development is the software factory.i.e., the availability of building blocks that may he reused.\Ve cannot expect complete application programs to he reusable because there are always slight differences.even in the same problem domain, e.g .. different calculation sequences and different input/ output formats.We can.though, expect to get reusable component,; on two levels of granularity.
1. Reuse-in-the-large targets for reusable program parts that are building blocks for application programs.This is possible for regular problems using only a small number of coordination schemes.On massively parallel systems, this trend is emphasized because hundreds or thousands of different processes cannot possibly be managed individually.Libraries of algorithmic skeletons will play a central role.2. If such a librarv offers no solution there is still a possibility to apply the reuse-in-thesmall concept.Reusable process topology and data distribution patterns will always be necessary for writing parallel programs.Such a support can be given either on the language or library level.
:-;o-called parallel virtual machines, have been defined to hide the existence of the different operating svstems and architectures.PAR\1ACS, EX-PRESS, PlCL, PYM . .MPL and p4 are a subset of the models mentioned in the respective literature ( [22] presents an up-to-date list).~lost of these models are very similar because they address the same type of parallel computers.so-called message-passing systems.In the near future, standardization (e.g., ~IPI) will provide a technical basis.It is crucial that software researchers benefit from these developments and offer support in the form of libraries and tools.
Our project provides answers to these four topics (Fig. 1 presents the core items): 1. BACS (Basel Algorithm Classification Scheme), the vocabulary and methodology for describing parallel algorithms and programs.2. AL WAN, the language used for writing algorithmic skeletons offering reuse-in -thesmall constructs.3. BALI, a library of reuse-in-the-large constructs: algorithmic skeletons that contain AL W AI'\ modules to be modified and extended by programmers.4. TIANA, the program generator that produces portable source code sksletons for different target systems and programming languages.
This integrated approach provides additional benefits.Different user groups may interact and profit from synergies by using common sy:-;tem elements: programmers (how to program?), benchmarkers (how to evaluate?). and students (how to learn?) who share common systern components.Both programmers and benchmarkers benefit from the skeleton approach because skeletons can be completed Pither into application programs or synthetic benchmark suites by adding artificial loads.
Finally.teaching and resParch nicely interact because the library can offer both courseware and production software.
In this article.we shall summarize BACS and concentrate on AL \VAl\" and TIAl\"A.

BACS: A FRAMEWORK FOR PARALLELISM
BACS [ 4] is a framework for the de:,;cription and classification of parallel algorithms.As will be shown in Section 4, it also provides a terminological platform on which structured programming of parallel systems can be built.

BACS Summary
Parallel algorithms can be classified regarding process properties (administration and binding), interaction properties (coordination of processes).and data properties (partitioning and placement).
In BACS, we are refining this list and end up with a generic description tuple that fully characterizes a parallel algorithm (Fig. 2).

Process Properties
The process topology defines the geometric structure and connectivity of the process set.\Ve concentrate on regular topologies such as grids, hypercubes.trees, farms, etc.And we distinguish between static and dynamic process structures.A process structure is called static if a process topology remains unchanged during the execution of the actual algorithm.As of today, static algorithms are dominating the field of numerical applications.The execution structure defines the compositing order of calculation and interaction building blocks.This can be expressed using control structures such as sequences, conditions, and iterations.We created a formula -like notation to provide the algorithm with a kind of signature.

Interaction
Interactions define the coordination of the processes at run-time.Coordination operators are used for data exchange, the signaling of events, and for consistency purposes.BACS identifies direct interactions that link exactly two processes and global interactions involving more than two processes.Global interactions are called total if all processes of a topology are interacting.They are called partial if only a subset of the processes is involved.

Data Properties
Parallel algorithms normally work with distributed data.The data distribution consists of the data partitioning and the data placement, i.e., mapping the partitioned data to processes.Arrays are typically partitioned in a blockwise or cyclic manner.
Each dimension of an array may be partitioned separately, e.g., a two-dimensional array may be split in rows, columns, or subblocks.

Example: Systolic Matrix Multiplication
Systolic algorithms are well-known candidates for massively parallel execution.Our sample multiplication algorithm makes use of blockwise distributions of two input matrices A and B, and an output matrix C. The process topology used is a static torus.All processes operate on their matrix blocks and compute an intermediate C block.The regular execution pattern, where interactions (here in two dimensions) are followed by local computations, is typical for systolic design.Thus, the execution structure consists of several parts: a prerotation of the A matrix, a prerotation of the B matrix, and the systolic part, a fixed loop consisting of the calculation and the rotation of one position both for A and B. The BACS tuple is a compact description of these algorithmic properties (Fig. 3).We shall elaborate this example in Section 4.6.

TINA: The Skeleton Generator Prototype
The tuple information provides a first, coarsegrained view of a parallel algorithm.However, it is too informal to be usable as input for a program generator tool.In his dissertation, Stephan Gutzwiller [6,16] elaborated the BACS terminology into a script-like, C-hased language that can be used to specify all parallel aspects of a program.The script contains entries for the specification of process topologies, data partitions and distributions, and the overall execution structure.Within the script, the programmer also specifies the parallel virtual machine and the programming language for which the code is used.The program generator, called TINA, reads the input script and produces a source code output.TINA is a kind of text merger.Predefined templates (stored in supporting libraries) are filled with the relevant parameter information.The TINA prototype supports PV"'1 and EXPRESS in a C language environment.
Tll\A was a rapid prototype used for first portability studies.The script language also bridged the gap between our environment and the more problem-oriented descriptions of an SPP partnership project [10].Although the prototype was quite useful, we decided to redesign the skeleton language and to put even more emphasis on enhanced programmability.While knowledge collected in the support libraries was reused, the language itself changed completely.The next section will introduce the basic language aspects and an example.

ALWAN: A PROGRAMMING LANGUAGE FOR SKELETON PARALLELISM
Below, part of a language called AL WAN is described, with which it is possible to implement an algorithm, starting with a BACS tuple, in a most platform-independent way [5].
ALWAN is based on MODULA-2, a structured high-levellanguage.As ALW AN is a skeleton pro-  gramming language, only a subset of MODULA-2 is used to which a few new concepts had to be introduced reflecting the necessities of parallel programming.Furthermore.AL \VAl'\ allows calling external procedures for the actual calculation parts (which may already be present) or input and output.

Topologies
Topologies are the core of programming with AL-W AI'\ on a parallel machine.A topology specifies the geometric structure of a nurnber of processes as well as the neighborhoods and possible communication paths.A topology is declared very much like a procedure and. on the parallel machine . . it can in fact be viewed as the procedure running on each parallel proceso;.All statements within a topology are executed in paralleL all other statements are executed only by one process (the controller).
It would prevent reusability if the programmer needed to specify all topology properties each time a slightly different topology is declared.Thus AL-W AI'\ introduces a mechanism (INHERIT) allowing it to inherit properties from a given topology.
w• e provide a library of frequently used topologies.so the programmer simply needs to inherit one of these topologies and expand the inherited definitions with the data definitions necessarv for the given algorithm.

Communication
Communication is essential on any parallel machine.Shared memory systems define implicit communication while message-passing systems define an explicit one.AL WAI'\ also requires explicit communication, but while message-passing mechanisms quite often require a well-paired send and receive function.AL WAI'\ requires only a special assignment construct that includes both the send and the receive function.Communication in AL WAI'\ is initiated by a simple assignment with the location of the communication data being specified by the variable@ location construct.
Depending on whether the location specifier is on the left side of the assignment or on the right side, the data will be sent or fetched from the view of the initiating process.The directions in which communication takes place (e.g., west) depend on topology and may either be inherited from a predefined topology or specified by the DIRECTION construct not explained here.The following example describes a communication where processes store the contents of their local variables ' a' from their western neighbors in their local variables ' a' .Occasionally, not all processes have to participate in an interaction.The set of processes that initiate this communication may be specified by the AC-TIVE ... DO construct which acts as a selector.ACTIVE row_id <= i DO a: =a@west; END This statement defines three groups of processes: the initiating processes that will start a com-munication, the passive processes that are the communication partners of the former, and the processes not participating in the communication.Obviously, the active and the passive groups are not necessarily disjunct.

Data Partitioning and Distribution
To use a parallel machine efficiently, it is necessary to distribute the usually large amount of data to the different processes.To distribute data, they must first be partitioned.With a new construct (PARTITIONED AS), each index of an array can be indicated as split blockwise (BLOCK) , split in a cyclic manner (CYCLE), or not partitioned (NONE).The following array declaration shows how to partition a matrix into rectangular data blocks: The mapping of partitioned data onto the processes depends on the process topology.Once the data are distributed, they can be viewed in two ways: globally, with each process able to access its part using the global index (e.g., considering the array declared above: the first process can access

4.51nput and Output
Parallel input and output are nontrivial.In generaL this is highly specific to hardware and has to consider several issues such as byte sex for heterogeneous systems, host-node communication, true parallel 1/0, etc.To provide a certain level of portability, AL WAJ\" defines two constructs (IN-PUT and OUTPUT) that are completely independent of the platform and allow the input or output of distributed variables.Instead of building a huge library of special lowlevel input-output routines, AL W M requires the programmer to supply a procedure to write to or read from media using a buffer.The AL WAN input and output statements will then take care of distributing or collecting the data.INPUT  Any user-specific l/0 routines have to be declared.If declared as EXTERJ\"AL, they are written in another language such as C. The corresponding function prototype will be generated by the skeleton generator and may look like this: short int readElement(float *e, short int *Coord, unsigned short int length) ;

Example Skeleton-Systolic Matrix Multiplication
Figure 4 shows the AL W Al\" program for the systolic matrix multiplication algorithm described in

S TIANA: THE PORTABILITY PLATFORM
Algorithms specified in AL \\'AI\" can be transformed into programs for various parallel architectures.This section provides a brief survey of how to transform an algorithm description into an executable program suitable for running on a parallel machine.This transformation process is outlined in Figure 5 to which the roman numerals refer.
First.one has to describe the algorithm skeleton (l) using the AL WAl\" notation, or even better, retrieve a similar description from the skeleton library.BALl (II).and change it according to needs.The BACS methodology can assist in finding appropriate descriptions.
From this description a skeleton source code (III) is generated using the skeleton generator TI-ANA (IV).As AL WAl\" supports the module concept, each AL WAl\" program can use predefined modules, where frequently used topologies or routines are collected in libraries (V).
The gaps in the generated source code skeleton are exactly the procedures declared as EXTER-NAL: a well-defined interface (funetion prototype) is generated for each of them.These procedures have to be implemented (VI) but may often be extracted from an existing sequential program requiring few changes.These routines normally form the dominant part of the entire program code.
Finally, all code parts are compiled on a specific target machine (VII) and linked with the TIANA library (VIII) to form an exeeutable program (IX).The TIANA library is implemented for various machines.It is the interface to the virtual machine available on the given platform.
Porting an application to a different platform only requires a recompilation on the target machine.replaeing the TIAl\A library with the appropriate new one.Changes in the (external) computation code segment also only require a recompilation on the target system, provided that the interfaces did not change.A complete recompilation is only required after modifying the AL WAN source, e.g .. when ehanging interfaces or distribution patterns.

THE TIANA PROGRAMMING SYSTEM
The compiler translates AL W Al\" programs to C source code which makes calls to the TIANA library to connect to a virtual parallel machine.The translation of the sequential AL WAl\" parts (a subset oL\10DCLA-2) is straightforward.The translation scheme of the parallel extensions and the dynamic arrays is explained below.
TIANA is designed as a two-pass compiler in which the first pass builds symbol tables and syntax trees of a program and does syntactical and semantical analysis.whereas the seeond pass generates the actual target source code.
AL \\'AI\" enforces a strong typing concept allowing the compiler to catch many possible errors during the first pass.Run-time checks can be enabled which verify the integrity of index ranges and assignments.By specifying appropriate switches.references can be induded into the target C code. which allow tracing errors back to the AL \VAN code for debugging.as well as instructions which allow recording tracing or timing information.
As AL W Al\" supports the module concept.information of the imported modules is required.The compiler uses the output of the first pass when importing a module, preventing subsequent recompilations.Thus, the output of the first pass is stored to an intermediate file (the reference file).

Topologies
Parallel programs consist of parallel code, which is exeeuted on different nodes in parallel, and sequential code, which is executed only by a special node (controller).Such a program can be implemented in at least two wavs: 1. Controller and parallel parts are written in separate programs (host-node paradigm).TIANA will support both paradigms.In the following.we will refer to the SP.YID paradigm.

Only one program exists (SPMD paradigm).
In an AL W AI'< program it is easy to distinguish between parallel and controller code: All statements within a topology belong to the parallel parL all other statements to the controller.The implementation is more complex.Whenever shifting from controller to parallel mode, modified data have to be updated on all nodes.Two schemes seem to be feasible: 1. Onlv one process executes the controller parts and marks the modified data to be broadcast on transition to parallel execution.2. All nodes execute the controller parts simultaneously preventing broadcasts but causing redundant computations.
Both schemes have their advantages and dis advantages depending on the context in which they are implemented.

Svstem overview.
Each topology is translated into a C function.The inherited topology's function is called as the first statement of the inheriting topology function.Exported topology variables cannot be translated into local function variables as thev have to be accessible by both the inherited and the inheriting function.In the current implementation they are thus translated into variables in the global name space.To prevent naming conflicts, these variables are prefixed by the topology's name.
The system provides a set of topologies for convenience.These are written in AL WAN and collected in a library called TopoLib.Currently defined are farm, pipe, ring, mesh (2 and 3 dimensions), torus (2 and 3 dimensions), hypercube, and tree.

Communication
In AL WAN, communication is described by an ACTIVE statement and an assignment statement with a direction or group specification.This simple description must be transformed into tht> usually complex procedure required by the target system.
Three communication patterns are possible when a group constructor is given.ACTIVE TRUE DO dst: = src@group END is mapped to an all-to-all communication, where dst has to be an array the size of the number of members in the group.(In this case.the ACTIVE TRUE DO and END may be omitted.)ACTIVE <condition> DO ds t: = src@group END is mapped to a rnany-to-one communication, where dst again is an array as above.
ACTIVE <condition> DO dst@group; = src END is mapped to a one-to-many communication.The contents of dst are not determined if the condition evaluates to TRUE on more than one process per group.
TIANA maps the ACTIVE condition to code specifying whether a process will participate in a communication and whether it will send, receive, or send and receive data.Other parameters such as subrange descriptors and those of partner processes (DIRECTION, GROUP) are produced and passed to a library call.This library must be implemented for each virtual machine.Again, the high level of abstraction of these library calls facilitates an efficient implementation.

Dynamic and Partitioned Arrays
In Section 4 we introduced the concept of dynamic and partitioned data.Some parameters describing the shape of these data will only be available at run-time.Memory to hold these parameters as well as the actual data needs to be allocated.It is possi-ble to describe the shape of any partitioned array in a finite set of parameters as shown in Figure 6.

Subrange Assignment
Subrange assignments allow moving parts of arrays.e.g"' when exchanging borders.These assignments are translated into a code section defining appropriate descriptors and a library calL which performs the actual data movemenL using the previously constructed de,;criptors.This implementation works equally well for sub ranges in local assignments.communication.and l/0.This very high level of describing data movement allows optimized adaptations to the target environments.

Input and Output
TIA:\A generates descriptors and library calls for the diverse input and output functions.Three kinds of I/0 are distinguished: 1. I/0 on global data . . declared outside a topol-Og)•-handled only by the controller process, possibly requiring a broadcast.
2. l/0 on local data.declared within a topology-may be done independently (where a special scheme has to be implemented for target systems not supporting parallel I/0).:3.l/0 on partitioned data-is handled either independently or by the controller, using the parameters dt>scribing the partitioned data as explained in Section 6.3.

CURRENT STATE OF THE IMPLEMENTATION
A first version of the TIAl'~A compiler is implemented and produced both ANSI and K&R C code.Compile-time errors are detected but currently no code for run-time checks is generated.Both passes of the compiler are written in a recursive-descent manner.The result of the first pass is stored in an intermediate reference file on which the second pass of the compiler is based.The first pass consists of approximately 7,000 lines of C code including the scanner and routines for storing and loading the reference file.The implemented parts of the second pass add up to approximately 3.500 lines.
The example in Figure 4, which is 74 lines of AL WA~ code, is translated to 134lines of C code.The TIANA libraries containing communication The generated codP was successfully compiled without any changes on a C:\15.SP1.Paragon.and a workstation cluster containing 1\eXTs and Suns.
Other algorithms.such as the LL-decomposition, the con1putation of a transitive closure of a graph . .and stencil computations have been proven to work.~-e also use the system for teaching parallel programming on the undergraduate level.
Detail analysis of the performance is necessary and one of our goals (see Section 1).Other shortterm goals are further virtual machine interfaces and mixed language support.

RELATED WORK
Other projects at our Parallel Processing Laboratory have similar goals.PEYIPI is a programming environment based on :\1Pl that uses the BACS terminology to increase programmability by providing higher abstracts compared to :Y1Pl [ 12].The ALPSTO:\E project uses AL WAl\ and TIAl\A for performance prediction and portable benchmark generation [20 ].The BALI project targets for software reuse by collecting AL ~'AN programs together with descriptive information [21

CONCLUSIONS
Software engineering for parallel systems is a new field as yet.Because productivity of parallel pro-cessing has to increase dramatically, many of the concepts applied within "sequential" environments need to be revised.Portability and reusability are two of the key issues to be solved.Application platforms representing system designs that are extended by application-and organization-specific code are well known in business software environments (e.g., financial application architecture, insurance application architecture, frequent-flyer applications template).Skeleton-oriented parallel programming is a technique based on similar ideas.We proposed a methodology that guarantees reuse-in-the-small (e.g .. reusable process topology and data distribution patterns) and targets toward reuse-in-the-large (reusable program blocks that are composed and parameterized toward complete application programs).Our approach addresses the P-P-P challenge: 1. Programmability improves because a basic set of concepts (BACS) serves as the basis of a language design (AL W AJ'II) and a library design (BALI).Structured parallel programming is particularly emphasized by language extensions that reflect well-accepted design principles.2. Portability is enhanced because TIANA, our program generator, acts as a portability platform.3. Of course, performance is the ultimate measure for our approach and initial results are very promising.
Ken Kennedy [18] claims that programming massively parallel systems today shows most of the disadvantages of programming in an assembly language.We agree, but hope that the Basel approach is a step in the right direction.

FIGURE 2
FIGURE 2 Tuple for the classification of parallel algorithms.

FIGURE 3
FIGURE 3 Classification tuple of systolic matrix multiplication.

[ 0 ,
OJ . . .[0, m CDIV p -1], the next one [0.m CDIV p] . . .[0, 2 * (m CDIV p) -1], and so on), or locally when declared as PART OF, with allprocesses able to access their parts with each index starting at 0.In the example below, PART OF refers to a distributed variable A, making it an alias to the corresponding local part of A:AL WAN provides the possibility to declare "data templates," called dynamic types.The syntax is very similar to that of a normal type declaration except that the identifier has a parameter list just like a procedure and that the range indexes and the arguments of the partitioning functions are composed of the variables listed in the parameter list as well as any constant expressions.Dynamic variables are dimensioned at run-time with the DIM ( ... ) function.TYPE PMatrix(n,m,p:CARDINAL) VAR ARRAY [0 .. n-1], [0 .. m-1] OF LONGREAL PARTITIONED AS BLOCK(n CDIV p),BLOCK(m CDIV p); A : PMatrix; DIM(A,p.nA,p.mA,p.proc); FIGURE 4  The AL W A:\' program: systolic matrix multiplication. FIGURE5
~.Our research is . . of course.influenced by developments at other sites: 1. PC:l\ and Strand are coordination languages that provide compositionality of parallel programs [13.14].Like PC:\', ALWA:\ will sup-port mixed-language computations and compositional programming.Similar developments have been reported for the CAPER programming environment [241.[2~)] is a recent summary of innovative parallel languages that have been proposed.2. Iligh-level abstractions similar to AL WAl\ constructs are reported in the literature.For instance.the scientific modeling language DPML [15] has a similar interaction construct.the C-HELP language [111 includes process topologies.and high -performance Fortran has similar data distribution primitives [19].3. Software erz[!:incerirzg aspects have been emphasized in many projects.For instance.portability has been exploited in ,;everal Esprit projeets.such as PPPE.G~-MI:\1D.GE~ESlS.and Pl.VlA.See also [17j for a collection of papers addressing both portability and performance aspects.Reusahilizv is. for instance.emphasized within the Archetype project where a program library similar to BALI is built [ 8:. 4. Skeleton-oriented programming was introduced by Cole [9 J within a functional programming context.For procedural language environments, the P4 methodology (P:3L language and P3:\1 machine model) developed at the L'niversity of Pisa addresses portability and abstract machine issues [ 11.