Next: ZPL
Up: Related Systems
Previous: Related Systems
Contents
Co-Array Fortran
Co-Array Fortran [36], formerly called F
, is a
simple and small set of extensions to Fortran 95 for Single Program
Multiple Data, SPMD, parallel processing. It feels and look similar to
Fortran and has a few new extensions associated with
work distribution and data distribution.
We review the work distribution first. A single program is replicated a
fixed number of times. Each replication, called an image
, has its own data objects. Each image is asynchronously executed with the
normal rules of Fortran, so the execution path may differ from image
to image. The programmer decides the actual path for
the image through a unique image index, by using normal Fortran
control constructs and by explicit synchronizations.
For data distribution, Co-Array Fortran lets the programmer
choose data distribution in a syntax very much like normal
Fortran array syntax.
Array indices in parentheses follow the normal Fortran rules within
one memory image. Array indices in square brackets provide
convenient notation for accessing objects across images and follow
similar rules.
The programmer uses co-array syntax only
where it is needed. A reference to a co-array with no square brackets
attached to it is a reference to the object in the local memory of the
executing image. Since most references to data objects in a parallel
code should be to the local part, co-array syntax should appear only
in isolated parts of the code. If not, the syntax acts as a visual
flag to the programmer that too much communication among images may be
taking place. It also acts as a flag to the compiler to generate code
that avoids latency whenever possible.
Co-arrays provides a way of expressing remote memory operations. For
example:
The approach is different to HPJava. In Co-Array
Fortran, array subscripting is local by default, or involves a
combination of local subscripts and explicit process ids. There is no
analogue of global subscripts, or HPF-like distribution formats. In
Co-Array Fortran the logical model of communication is built into the
language--remote memory access with intrinsics for synchronization. In
HPJava, there are no communication primitives in the language
itself. We follow the MPI philosophy of providing communication
through separate libraries. While Co-Array Fortran and HPJava share an
underlying programming model, we claim that our framework may offer
greater opportunities for exploiting established software
technologies.
Next: ZPL
Up: Related Systems
Previous: Related Systems
Contents
Bryan Carpenter
2004-06-09