Next: COMPARISON OF EXAMPLE PROGRAMS
Up: THE CONNECTION MACHINE
Previous: THE CONNECTION MACHINE
CM-users have the choice between three programming languages: C*,
Fortran and
*LISP.
I used only CM-Fortran.
CM-Fortran is an extension of Fortran77. It includes the array facilities
of Fortran8x but has some restrictions where the storage order would be crucial
to the program.
CM Fortran features are, among others,
intrinsic functions, and arithmetic and logical operations involving
whole arrays or array portions.
The code generated by the CM Fortran compiler generates code that
directly calls the parallel instruction
set (Paris) and therefore allows
computations to be made
on the CM.
Explicit use
of Paris allows a direct control over how parallel operations are done.
But to produce more efficient code than the Fortran compiler does automatically,
the programmer needs some experience.
Important restrictions for a parallelization are
-
Statements that affect the flow of execution within a program
must translate into code that is executed entirely on the front-end machine.
-
Where an instruction is executed depends on where its operands have been
allocated memory space. Scalars are always allocated on the front end and
arrays can be allocated either on the CM or on the front end, or on both.
Arrays can be stored on the CM explicitly, when compiler directives
are used, or implicitly, if an array is used in
an explicit Paris call,
an intrinsic CM array function,
or a Fortran8x array command. Examples of compiler directives can be found
in the program on the next page.
Next: COMPARISON OF EXAMPLE PROGRAMS
Up: THE CONNECTION MACHINE
Previous: THE CONNECTION MACHINE
Stanford Exploration Project
1/13/1998