next up previous contents
Next: 5 Data Types Up: No Title Previous: 4 Test Program Descriptions

Reduction Operations

  This section amounts to internal documentation for reduction routine generation. It has turned out that to generate the direct FORTRAN77 logic from Pfortran reduction operations is tedious at best. Instead, the translator now generates interfaces, rather than the routine itself. We are not out of the soup yet, however; there a large number of possible routines, and with Fortran, there is a problem with user-define reduction operations.

Upon encountering a global operation, the compiler creates a routine for that global operation that implements the data exchange and reduction operator. A template featuring an algorithm for a target architecture is used. Textual substitution of the "operator space holder" with the actual text of the operator used for the global operation is performed.

For a base communication algorithm there are a number of cases, e.g.,

  - Base algorithm (e.g., hypercube, divide & conquer, variants) (~4 cases)
      - full or partial groups  (2 cases)
            - vector or scalar (2 cases)
            - user defined function  (x cases)
            - data types    (7 cases)
These variants can result in thirty or more instances.

The final, desired case is extracted from the template by pattern substitution and conditional compilation. This procedure is outlined below.



 
next up previous contents
Next: 5 Data Types Up: No Title Previous: 4 Test Program Descriptions

Terry Clark
8/2/1998