Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix type mismatch compiler error when gfortran 10 is used without '-fallow-argument-mismatch' flag #770

Merged
merged 75 commits into from
Mar 19, 2024

Conversation

DusanJovic-NOAA
Copy link
Collaborator

Description

(Instructions: this, and all subsequent sections of text should be removed and filled in as appropriate.)

Starting with version 10 of GNU Fortran compiler, subroutine argument mismatches are flagged as errors, and must be silenced by using '-fallow-argument-mismatch' flag, which can potentially hide actual bugs, which is undesirable.

This PR fixes all such mismatches, mostly by switching to use mpi_f08 MPI module, which provides generic interfaces or by passing correct type of arguments to w3lib calls.

What bug does it fix, or what feature does it add? Avoids the need to silence argument mismatch
Is a change of answers expected from this PR? No

Issue(s) addressed

Link the issues to be closed with this PR, whether in this repository, or in another repository.
(Remember, issues should always be created before starting work on a PR branch!)

  • fixes #<issue_number>
  • fixes noaa-emc/fv3atm/issues/<issue_number>

Testing

How were these changes tested? ufs-weather-model regression test
What compilers / HPCs was it tested with? GNU and Intel
Are the changes covered by regression tests? Yes
Have the ufs-weather-model regression test been run? Yes. On what platform? Hera

  • Will the code updates change regression test baseline? No.
  • Please commit the regression test log files in your ufs-weather-model branch

Dependencies

If testing this branch requires non-default branches in other repositories, list them.
Those branches should have matching names (ideally)

Do PRs in upstream repositories need to be merged first?
If so add the "waiting for other repos" label and list the upstream PRs

Switch from 'use mpi' to 'use mpi_f08'
If output grid is 'cubed_sphere_grid' AND inline post is turned on
print error and terminate the model.
@zach1221
Copy link
Collaborator

Hi, @DusanJovic-NOAA . Are you able to sync up this PR? Following that I can request reviews.

@DusanJovic-NOAA
Copy link
Collaborator Author

Hi, @DusanJovic-NOAA . Are you able to sync up this PR? Following that I can request reviews.

Done.

@zach1221
Copy link
Collaborator

@DusanJovic-NOAA ccpp-physics and framework sub-PRs have been merged. Hashes:
ufs-community/ccpp-physics@9839680
NCAR/ccpp-framework@011db4f

@jkbk2004
Copy link
Collaborator

@DusanJovic-NOAA can you check git action failures?

/home/runner/work/fv3atm/fv3atm/fv3atm/ccpp/framework/src/ccpp_types.F90:22:9:

   22 |     use mpi_f08, only: MPI_Comm
      |         1
Fatal Error: Cannot open module file ‘mpi_f08.mod’ for reading at (1): No such file or directory
compilation terminated.

@jkbk2004
Copy link
Collaborator

@DusanJovic-NOAA can you check git action failures?

/home/runner/work/fv3atm/fv3atm/fv3atm/ccpp/framework/src/ccpp_types.F90:22:9:

   22 |     use mpi_f08, only: MPI_Comm
      |         1
Fatal Error: Cannot open module file ‘mpi_f08.mod’ for reading at (1): No such file or directory
compilation terminated.

@DusanJovic-NOAA @climbfuji I am not sure if this is gcc or mpich version issue ?

@DusanJovic-NOAA
Copy link
Collaborator Author

@DusanJovic-NOAA can you check git action failures?

/home/runner/work/fv3atm/fv3atm/fv3atm/ccpp/framework/src/ccpp_types.F90:22:9:

   22 |     use mpi_f08, only: MPI_Comm
      |         1
Fatal Error: Cannot open module file ‘mpi_f08.mod’ for reading at (1): No such file or directory
compilation terminated.

@DusanJovic-NOAA @climbfuji I am not sure if this is gcc or mpich version issue ?

The mpi_f08 module is missing. Either mpich is compiled without f08 support or there's some issue with the installation. Also on two HPC platforms where we test the gnu compiler we use openmpi, mpich had some issues. I think this should be updated to use openmpi. @AlexanderRichert-NOAA added this CI action.

@jkbk2004 jkbk2004 merged commit 6942270 into NOAA-EMC:develop Mar 19, 2024
0 of 2 checks passed
@DusanJovic-NOAA
Copy link
Collaborator Author

I think this line:

key: spack-${{ hashFiles('fv3atm/ci/spack.yaml') }}-gcc${{ matrix.gcc_ver }}-2-${{ matrix.cmake_opts }}-${{ matrix.mpich }}

should end with ${{ matrix.mpi }} instead of ${{ matrix.mpich }}

@DusanJovic-NOAA DusanJovic-NOAA deleted the no_arg_mismatch branch March 28, 2024 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants