test/mpi: add implicit none to Fortran tests - #7912
Open
jeffhammond wants to merge 2 commits into
Open
Conversation
Goal: address issue pmodels#6318 by making the Fortran MPI tests require explicit declarations across the f77, f90, f08, errors, and shared utility test sources. Reasoning: without implicit none, missing or misspelled MPI Fortran names can compile as implicit variables, which hides coverage gaps. The F77-to-F90 converter and F90 IO harness generation were updated so generated sources keep the correct declaration order: F77 keeps implicit none before mpif.h includes, while generated F90 emits use mpi before implicit none. Verification: regenerated MPICH with ./autogen.sh, configured with CC=gcc CXX=g++ FC=gfortran F77=gfortran ../configure --with-device=ch4:ofi --with-libfabric=embedded --enable-g --enable-f77 --enable-f90 --enable-f08, built with make -j50, and installed locally. Regenerated test metadata with ./autogen.sh -do=test, configured the MPI test suite against the local install, forced the F90 IO harness generation path, and verified the test suite builds with make -j50 in build-gcc-ch4-ofi-g/test/mpi-verify-4. Also ran git diff --check -- test/mpi and a structural scan that reported files 337 missing 0. Context: the F90 IO harness output is generated and ignored, so this commit changes the tracked generator rule instead of committing generated files. Local build, install, log, and generated wrapper outputs are intentionally left untracked.
Goal: keep the implicit-none conversion buildable with compilers that do not implicitly type the nonstandard iargc routine. Reasoning: the spawn argument tests intentionally use the legacy getarg/iargc interface. After adding implicit none, nvfortran rejects iargc unless it has an explicit type declaration. Declaring iargc as integer is the smallest source change and matches the existing call sites without altering test behavior or formatting. Verification: configured, built, and installed MPICH in build-gcc-nvfortran-ch4-ofi-g with CC=gcc CXX=g++ FC=nvfortran F77=nvfortran, --with-device=ch4:ofi, --with-libfabric=embedded, --enable-g, --enable-f77, --enable-f90, and --enable-f08. Then configured test/mpi against install-gcc-nvfortran-ch4-ofi-g and rebuilt the MPI test suite with make -j50. Also ran git diff --check -- test/mpi.
Collaborator
|
test:mpich/ch3/most |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Goal: address issue #6318 by making the Fortran MPI tests require explicit declarations across the f77, f90, f08, errors, and shared utility test sources.
Reasoning: without
implicit none, missing or misspelled MPI Fortran names can compile as implicit variables, which hides coverage gaps. The F77-to-F90 converter and F90 IO harness generation were updated so generated sources keep the correct declaration order: F77 keepsimplicit nonebefore mpif.h includes, while generated F90 emits use mpi before implicit none.Verification: regenerated MPICH with
./autogen.sh, configured withCC=gcc CXX=g++ FC=gfortran F77=gfortran ../configure --with-device=ch4:ofi --with-libfabric=embedded --enable-g --enable-f77 --enable-f90 --enable-f08, built withmake -j50, and installed locally. Regenerated test metadata with./autogen.sh -do=test, configured the MPI test suite against the local install, forced the F90 IO harness generation path, and verified the test suite builds withmake -j50in build-gcc-ch4-ofi-g/test/mpi-verify-4. Also rangit diff --check -- test/mpiand a structural scan that reported files 337 missing 0.Context: the F90 IO harness output is generated and ignored, so this commit changes the tracked generator rule instead of committing generated files. Local build, install, log, and generated wrapper outputs are intentionally left untracked.
Pull Request Description
Author Checklist
Particularly focus on why, not what. Reference background, issues, test failures, xfail entries, etc.
Commits are self-contained and do not do two things at once.
Commit message is of the form:
module: short descriptionCommit message explains what's in the commit.
Whitespace checker. Warnings test. Additional tests via comments.
For non-Argonne authors, check contribution agreement.
If necessary, request an explicit comment from your companies PR approval manager.
Resolves #6318.