OBS020 deprecated-mpi-include
warning enabled by defaultinclude 'mpif.h' instead of the mpi_f08 module.
Why
mpif.h declares no interfaces: no MPI call is checked by the compiler, and it is deprecated by the MPI standard (4.1). use mpi_f08 gives type-checked, ierror-optional bindings.
Reported
fortran
include 'mpif.h'Preferred
fortran
use mpi_f08Suppressing
For one occurrence, with the reason on the same line (or alone on the line before the statement):
fortran
! fobis: ignore[OBS020] <why this occurrence is fine>For the whole project, ignore = OBS020 in the fobos [lint] section.
References
Sections of the shipped knowledge packs behind this rule:
mpi:ch16-deprecated-removed#common-deprecated-modern-replacements(fobis kb show mpi:ch16-deprecated-removed#common-deprecated-modern-replacements)
Equivalent
Fortitude rule OB201 (see Lint Rules).