The programmer is expected to specify how program variables
are distributed over the memory areas associated with a set of
processors. So it is desirable for a
program to be able define some representation of the set of processors it
uses. This can be done through the PROCESSORS directive.
The syntax of a PROCESSORS definition is similar
to the syntax of an array definition in Fortran:
!HPF$ PROCESSORS P (10)This introduces a set of 10 abstract processors, assigning them the collective name
P.
Like arrays, abstract processor sets, or processor
arrangements, can be multi-dimensional. For example
!HPF$ PROCESSORS Q (4, 4)introduces 16 abstract processors in a 4 by 4 array. There are a couple of reasons why one might want to declare a processor arrangement to be multi-dimensional. Most importantly, the major data-structures in a program may be multi-dimensional arrays, and it may be that the best way to divide up this data over processors is by sub-dividing it into blocks of the same dimension as the whole arrays. In this situation it certainly simplifies matters if we can view the processor arrangement itself as an array of the relevant dimension.
An important point to appreciate is that a single program may
contain many PROCESSORS declarations. There is no
defined relation between two processor arrangements of different
shapes10.
Typically they will be independently mapped onto
the same set of underlying physical processors.