20.1.16. Optimization Problems, an Overview

PreviousUpNext
Up: Support for Fortran Next: Problems with Code Movement and Register Optimization Previous: Fortran Derived Types

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):


The following compiler optimization strategies (valid for serial code) may cause problems in MPI applications:
Table 29 shows the only usage areas where these optimization problems may occur.


Table 29: Occurrence of Fortran optimization problems in several usage areas

Optimization ... ... may cause a problem in
following usage areas
Nonbl.1-sidedSplitBottom
Code movementyesyesnoyes
and register optimization
Temporary data movementyesyesyesno
Permanent data movementyesyesyesyes
The solutions in the following sections are based on compromises:


PreviousUpNext
Up: Support for Fortran Next: Problems with Code Movement and Register Optimization Previous: Fortran Derived Types


Return to MPI-4.1 Standard Index
Return to MPI Forum Home Page

(Unofficial) MPI-4.1 of November 2, 2023
HTML Generated on November 19, 2023