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.
Link time optimization is turned on by default in the MPI-wrapped compilers under MPICH 4.0, the version of MPICH available from the package manager in Ubuntu LTS image version 22.04:
In separate experiments it has been determined that this optimization appears to lead to differences between the fortran executable and a Python-wrapped version of SHiELD (since a separate linking step is required to produce each, giving the optimizer the opportunity to change results). This PR is just an experiment to see if disabling link time optimization also leads to reproducible builds with version 11.4 GNU compilers (in a quick hacky way it just adds the
-fno-lto
flag to theFFLAGS
andCFLAGS
used in the GNU Makefile template in SHiELD_build). We'll see if repeatedly triggered builds succeed (update: through one build locally to generate the checksums and four consecutive successful builds in CI, this experiment appears to have been successful).Note that with MPICH installed in our other environments, link time optimization is not enabled by default, which I believe is why we have not encountered issues like this with FV3GFS, either in our nix development environment in the fv3gfs-fortran repository or with the version of MPICH available in Ubuntu LTS image 20.04, used for the fv3net prognostic run.