20.1.20. Comparison with C

PreviousUpNext
Up: Support for Fortran Next: Support for Large Count and Large Byte Displacement in MPI Language Bindings Previous: Permanent Data Movement

In C, subroutines that modify variables that are not in the argument list will not cause register optimization problems. This is because taking pointers to storage objects by using the & operator and later referencing the objects by indirection on the pointer is an integral part of the language. A C compiler understands the implications, so that the problem should not occur, in general. However, some compilers do offer optional aggressive optimization levels that may not be safe. Problems due to temporary memory modifications can also occur in C. As above, the best advice is to avoid the problem: use different variables for buffers in nonblocking MPI operations and computation that is executed while a nonblocking communication operation is pending.


Example Protecting GPU optimizations with the ASYNCHRONOUS attribute.

Image file


PreviousUpNext
Up: Support for Fortran Next: Support for Large Count and Large Byte Displacement in MPI Language Bindings Previous: Permanent Data Movement


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