next up previous
Next: Parallel Statements Up: High Performance Fortran Previous: High Performance Fortran

Data Distribution Directives

TEMPLATE directive refers to an abstract, very fine-grain ``virtual processor'' space (in the language of the Connection Machine model), which labels independent objects (e.g. sites of a lattice) or data elements.

ALIGN directive specifies the lowest-level abstract alignment of array elements. These two directives are used for machine independent alignment of data structures.

2.0cm DIMENSION A(100), B(0:99)
2.0cm !HPF$ TEMPLATE X(100)
2.0cm !HPF$ ALIGN A WITH X
2.0cm !HPF$ ALIGN B(I) WITH X(I+1)

PROCESSORS directive specifies a coarse-grain processor grid, used for machine dependent partitioning of data structures.

DISTRIBUTE directive governs the data distribution (domain decomposition), and can be done in BLOCK or CYCLIC fashion.

2.0cm !HPF$ TEMPLATE X(1024), Y(512,512)
2.0cm !HPF$ PROCESSORS P(16)
2.0cm !HPF$ DISTRIBUTE X(CYCLIC) ONTO P
2.0cm !HPF$ DISTRIBUTE Y(BLOCK,BLOCK)

DYNAMIC and REDISTRIBUTE directives allow for dynamic data distribution.



Geoffrey Fox, Northeast Parallel Architectures Center at Syracuse University, gcf@npac.syr.edu