fortran: Fix MPI_ARGV(S)_NULL compilation error
#3401
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fortran constants
MPI_ARGV_NULLandMPI_ARGVS_NULLare defined in MPI-3.1 p.680 as below.MPI_ARGV_NULLandMPI_ARGVS_NULLare used as an argument ofMPI_COMM_SPAWNandMPI_COMM_SPAWN_MULTIPLErespectively and their argumentargvandarray_of_argvare defined as below forUSE mpi_f08binding in MPI-3.1.Defining them as
INTEGERinmpi_f08module will cause a compilation error of user programs like "There is no specific subroutine for the generic 'mpi_comm_spawn'".@ggouaillardet @jsquyres I'm not so familiar with Fortran and I don't know whether they are intentionally defined as
INTEGERin 9c77c6b. Could you confirm my change?USE mpiandinclude 'mpif.h'bindings useompi/include/mpif-sentinels.hand the two variables are defined correctly:This commit may break ABI compatibility. But it affects only Fortran
mpi_f08module andMPI_ARGV_NULLandMPI_ARGVS_NULLwithmpi_f08have not been able to use for their purpose (argument ofMPI_COMM_SPAWN(_MULTIPLE)) ever. So I'll create PRs for release branches.