Next:
TEMPLATE Directive Up: Data Alignment and Previous: Allocatable Arrays and


PROCESSORS Directive

The PROCESSORS directive declares one or more rectilinear processor arrangements, specifying for each one its name, its rank (number of dimensions), and the extent in each dimension. It may appear only in the specification-part of a scoping unit. Every dimension of a processor arrangement must have nonzero extent; therefore a processor arrangement cannot be empty.

In the language of section 14.1.2 of the Fortran 90 standard, processor arrangements are local entities of class (1); therefore a processor arrangement may not have the same name as a variable, named constant, internal procedure, etc., in the same scoping unit. Names of processor arrangements obey the same rules for host and use association as other names in the long list in section 12.1.2.2.1 of the Fortran 90 standard.

If two processor arrangements have the same shape, then corresponding elements of the two arrangements are understood to refer to the same abstract processor. (It is anticipated that language-processor-dependent directives provided by some HPF implementations could overrule the default correspondence of processor arrangements that have the same shape.)

If directives collectively specify that two objects be mapped to the same abstract processor at a given instant during the program execution, the intent is that the two objects be mapped to the same physical processor at that instant.

The intrinsic functions NUMBER_OF_PROCESSORS and PROCESSORS_SHAPE may be used to inquire about the total number of actual physical processors used to execute the program. This information may then be used to calculate appropriate sizes for the declared abstract processor arrangements.

XBNF processors-directive -to -rule to to is PROCESSORS processors-decl-list

processors-decl -to -rule to to is processors-name [ ( explicit-shape-spec-list ) ]

processors-name -to -rule to to is object-name XBNF

Examples:

!HPF PROCESSORS Q(NUMBER_OF_PROCESSORS()), & !HPF PROCESSORS BIZARRO(1972:1997,-20:17) !HPF PROCESSORS :: RUBIK(3,3,3) !HPF PROCESSORS, DIMENSION(3,3,3) :: & !HPF PHYSICAL PROCESSORS(8) !Declaration for mpp by XYZ Incorporated !XYZ PHYSICAL PROCESSORS(2,2,2,2,2,2,2,2,2,2) !Declaration for two-dimensional grid machine by TLA GmbH !TLA PROCESSORS P(NUMBER_OF_PROCESSORS()) It may furthermore be desirable to have a way for the user to specify the precise mapping of the processor arrangement declared in a PROCESSORS statement to the physical processors of the executing hardware. Again, this might be specified either by a language-processor-dependent directive or through the programming environment (for example, as a UNIX command-line argument); such facilities are beyond the scope of the HPF specification, but as food for thought we offer the following illustrative hypothetical example: !PDQ PROCESSORS G(8,64,16) !PDQ MACHINE LAYOUT G(:GRAY(0:2),:GRAY(6:11),:BINARY(3:5,12)) This might specify that the first dimension of G should use hypercube axes 0, 1, 2 with a Gray-code ordering; the second dimension should use hypercube axes 6 through 11 with a Gray-code ordering; and the third dimension should use hypercube axes 3, 4, 5, and 12 with a binary ordering. (End of advice to implementors.) list



Next:
TEMPLATE Directive Up: Data Alignment and Previous: Allocatable Arrays and

paula@erc.msstate.edu
Thu Jul 21 17:05:43 CDT 1994