MPI001 request-never-completed
warning enabled by defaultA non-blocking MPI operation stores its request in a local variable that is never completed.
Why
A non-blocking operation (mpi_isend, mpi_irecv, mpi_iallreduce ...) is finished only by a completion call on its request (mpi_wait, mpi_waitall, mpi_test ...). If the request lives in a local variable that nothing uses afterwards, the buffer may be reused or deallocated while MPI still uses it, and the request leaks. Requests kept in dummy arguments or module variables are not reported (they may be completed elsewhere).
Reported
fortran
call mpi_isend(buf, n, MPI_DOUBLE_PRECISION, dest, tag, comm, req, ierr)
! ... returns without mpi_waitPreferred
fortran
call mpi_isend(buf, n, MPI_DOUBLE_PRECISION, dest, tag, comm, req, ierr)
...
call mpi_wait(req, MPI_STATUS_IGNORE, ierr)Suppressing
For one occurrence, with the reason on the same line (or alone on the line before the statement):
fortran
! fobis: ignore[MPI001] <why this occurrence is fine>For the whole project, ignore = MPI001 in the fobos [lint] section.
References
Sections of the shipped knowledge packs behind this rule:
mpi:ch02-terms-conventions#anti-patterns(fobis kb show mpi:ch02-terms-conventions#anti-patterns)