next up previous contents
Next: Local FORTRAN 77 Inquiry Routines Up: Global HPF Subgrid Inquiry Previous: HPF_SUBGRID_INFO (ARRAYIERR, DIM,

Subgrid Inquiries Involving Embedding Arrays

 

In the common case in which the elements of each local subgrid of the global array argument are distributed across processors, with no overlap, and allocated in local memory like a local FORTRAN 77 array, as a contiguous sequence of elements in Fortran array element order, these three last optional arguments would not be required.

However, some implementations may choose less common layouts in local memory, that involve ``embedding'' these elements in a larger array section of equal rank that is sequence-associated in serial memory. For example, alignment of axes of arrays in different orders may result in a permuting embedding of the subgrid. Or axes of subgrids map be padded with ghost cells, either for stencil optimizations or to achieve same-size subgrids on all nodes.

In variations such as these, we may still view the subgrid as being ``embedded'' in a sequence associated array which may be accessible in F77_LOCAL operations, if the permutation of axes, shape of any embedding array, and offsets into that array can be obtained at runtime. The last three arguments of HPF_SUBGRID_INFO are provided to allow programmers to obtain this information when it is appropriate, with the help of the IERR flag to signal when this is not the case.

In this mapping, local memory has been allocated for a larger array section, with coordinates (LB_EMBED : UB_EMBED : STRIDE). The coordinates of the actual computational elements are limited to the subset (LB : UB : STRIDE). The sequence association is generalized to an arbitrary mapping of axes. Here, AXIS_MAP numbers the axes from fastest varying to slowest varying. If LB_EMBED, UB_EMBED, or AXIS_MAP is specified in a call to HPF_SUBGRID_INFO but ARRAY does not satisfy the assumptions of this mapping model, then a nonzero value is returned for IERR.