MPI provides operations that may be hidden from the user code and run concurrently with it, accessing the same memory as user code. Examples include the data transfer for an MPI_IRECV. The optimizer of a compiler will assume that it can recognize periods when a copy of a variable can be kept in a register without reloading from or storing to memory. When the user code is working with a register copy of some variable while the hidden operation reads or writes the memory copy, problems occur. These problems are independent of the Fortran support method; i.e., they occur with the mpi_f08 module, the mpi module, and the (deprecated) mpif.h include file.
This section shows four problematic usage areas (the abbrevations in parentheses are used in the table below):
Table 29: Occurrence of Fortran optimization problems in several usage areas
Optimization ... | ... may cause a problem in | ||||
following usage areas | |||||
Nonbl. | 1-sided | Split | Bottom | ||
Code movement | yes | yes | no | yes | |
and register optimization | |||||
Temporary data movement | yes | yes | yes | no | |
Permanent data movement | yes | yes | yes | yes | |