By default, the nearest-neighbor compiler optimization is always on. This optimization recognizes constructs that perform regular, short- distance communication of neighboring array elements, and generates more efficient code. This kind of code occurs often when solving partial differential equations using a number of common methods.
The compiler automatically detects nearest-neighbor computations, and allocates shadow edges that are optimally sized for your algorithm. You can also size the shadow edges manually using the DISTRIBUTE directive. This is necessary to preserve the shadow edges when nearest-neighbor arrays are passed as arguments.
In general, shadow edges are allocated only for nearest-neighbor computations expressed with Fortran 90 array syntax or with FORALL. Nearest-neighbor computations in INDEPENDENT DO loops are not usually recognized.
If the additional storage required for this optimization cannot be
tolerated, you can adjust the maximum allowable shadow-edge width
using the -nearest_neighbor command-line option,
or completely disable the nearest-neighbor optimization using the
nonearest_neighbor option.
There are a number of conditions that must be satisfied in order to take advantage of the nearest-neighbor optimization. These conditions are listed in the Release Notes.
The -show hpf
option indicates which statements were recognized as nearest-
neighbor statements.
-show hpf option, see Section 8.1.1.7.