On Tru64 UNIX systems, the HPF data mapping (or placement) directives can be used to describe alignment of arrays with respect to each other and their distribution across one or more processors.
These directives describe storage allocation for data without changing the meaning or results of the original program. The compiler uses the directives to schedule efficient parallel execution of the computation.
The following are data mapping directives:
Specifies the relative placement of arrays with respect to a given array or a "virtual" array called a template.
!HPF$ ALIGN A(:,:) WITH B(:,:)
For more details on the ALIGN directive, see Section 15.3.2.
Describes the partitioning of data among distributed memory regions, typically in a multiple processor computer system. Distribution is on a dimension-by-dimension basis. Elements of a given dimension are distributed as follows:
|Format||Method of Distribution|
|BLOCK||In equal sized blocks, one to each processor|
|BLOCK(n)||In blocks of size n, one to each processor|
|CYCLIC||In round robin fashion to processors|
|CYCLIC(n)||In blocks of size n in round robin fashion to processors|
|*||All to a single processor|
!HPF$ DISTRIBUTE (BLOCK, BLOCK) :: B !HPF$ DISTRIBUTE (CYCLIC) :: D !HPF$ DISTRIBUTE (*, BLOCK) :: H
For more details on the DISTRIBUTE directive, see Section 15.3.3.
Describes a conceptual arrangement of the processors for use in a DISTRIBUTE directive.
!HPF$ PROCESSORS P(NUMBER_OF_PROCESSORS()) !HPF$ PROCESSORS SCALAR !HPF$ PROCESSORS TWO_D(2,NUMBER_OF_PROCESSORS()/2)
For more details on the PROCESSORS directive, see Section 15.3.6.
Creates a "virtual" array that can be used as a base for complex alignments of arrays.
!HPF$ TEMPLATE T(1000) REAL, DIMENSION(998) :: A, B, C !HPF$ ALIGN A(I) WITH T(I) !HPF$ ALIGN B(I) WITH T(I+1) !HPF$ ALIGN C(I) WITH T(I+2) ... B(2:997) = A(3:998) + B(2:997) + C(1:996)
For more details on the TEMPLATE directive, see Section 15.3.8.
A related directive is [NO]SEQUENCE, which lets you specify whether named (or all) data objects depend on array element order and storage association. For more information, see Sections 220.127.116.11 and 15.3.7.