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 #74

Merged
merged 10 commits into from
Mar 19, 2024

Conversation

DusanJovic-NOAA
Copy link
Contributor

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 by switching to use mpi_f08 MPI module.

@pjpegion
Copy link
Collaborator

@DusanJovic-NOAA does anything need to be changed on the compile side because of the addition "use mpi_f08"?
I ask because the stochastic physics code is also being used in branches of CESM and other models.

@DusanJovic-NOAA
Copy link
Contributor Author

@DusanJovic-NOAA does anything need to be changed on the compile side because of the addition "use mpi_f08"? I ask because the stochastic physics code is also being used in branches of CESM and other models.

Nothing needs to be changed in the build, but the mpi library used must provide mpi_f08 module, which most of the recent mpi libraries do provide. But just to be sure it would be great if other models (CESM) can test this change, because the type of the mpi communicator is changed from integer to MPI_Comm, which means other models will probably need to make that change. If that is not possible for whatever reason we'll need to find a way to support both versions either by some kind of compile time macro or something else.

@pjpegion
Copy link
Collaborator

I will see if we can get this tested in CESM, but since it is currently only in a one branch, and they are using a much older version of stochastic physics. I think it would be difficult for them to test this version. At this point I just want to be aware that there may be an issue if they update to the newest code.

@zach1221
Copy link
Collaborator

Hello, @pjpegion . This PR is ready to merge. Testing is complete on ufs-wm PR #1147.

@pjpegion pjpegion merged commit 7dc4d9b into NOAA-PSL:master Mar 19, 2024
@DusanJovic-NOAA DusanJovic-NOAA deleted the no_arg_mismatch branch March 28, 2024 13:34
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.

None yet

3 participants