Next: Array Assignment Parallelism Up: Architecture of the Previous: Building Array Descriptors

Code Generation

Finally, the code generator targets an Single Program Multiple Data (SPMD) programming model. The SPMD model provides for a system where each processor executes the same program, but operates on different data. This is implemented by loading the same program image into each processor. Each processor allocates and operates on its own local portion of distributed arrays, according to the distributions, array sizes and number of processors as determined at runtime.

The generated code is structured as alternating phases of local computation and calls to communication primitives. Communication primitives are synchronization points. Most of the time the compiler does not know until run-time which groups of processors may communicate, so it guarantees that communication primitives will be called by all processors.

The following sections provide examples showing code generation for parallel statements, such as array assignment, and statements.



zbozkus@
Thu Jul 6 21:09:19 EDT 1995