Skip to content

Conversation

ndkeen
Copy link
Contributor

@ndkeen ndkeen commented Sep 4, 2024

For SCM cases, we compute area and register it, but as it's a local copy, the value is not available at writing time to netcdf.
This results in the code writing a value for area that is uninitialized and different compilers can have different behavior, which could result in a DIFF between runs (and the incorrect area written to the file).

BFB for all cases, except SCM. And the results are still BFB for SCM, just affects the area written to file.

Fixes #6556

correct what looks like an incorrect if conditional for scm and convert it to positive.
only nullify is scm
@ndkeen ndkeen added GNU GNU compiler related issues EAM Fortran-based E3SM Atmosphere Model SCM single column model labels Sep 4, 2024
@rljacob rljacob requested a review from bogensch September 4, 2024 20:31
@ndkeen
Copy link
Contributor Author

ndkeen commented Sep 4, 2024

Note the first commit here is cleaning up white-space.
The next commits are the actual change.

I also think there is incorrect logic for when SCM is enabled. I changed

if (.not.single_column .or. scm_multcols) then  ! which i think will be ok for single_column, but not scm_multcols ?

to

if (single_column .or. scm_multcols) then  ! do this when SCM case and use positive logic 

Nope that was wrong as I misunderstood what scm_multcols was for. Switched back to way it was.

@ndkeen
Copy link
Contributor Author

ndkeen commented Sep 7, 2024

I think I incorrectly did the logic for scm -- will fix.

Copy link

github-actions bot commented Sep 7, 2024

PR Preview Action v1.4.7
🚀 Deployed preview to https://E3SM-Project.github.io/E3SM/pr-preview/pr-6585/
on branch gh-pages at 2024-09-07 18:39 UTC

Copy link
Contributor

@bogensch bogensch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this @ndkeen

ndkeen added a commit that referenced this pull request Sep 9, 2024
…(PR #6585)

For SCM cases, we compute area and register it, but as it's a local copy, the value is not available at writing time to netcdf.
This results in the code writing a value for area that is uninitialized and different compilers can have different behavior, which could result in a DIFF between runs (and the incorrect area written to the file).

BFB for all cases, except SCM. And the results are still BFB for SCM, just affects the area written to file.

Fixes #6556
@ndkeen
Copy link
Contributor Author

ndkeen commented Sep 9, 2024

merged to next
The only test it should impact is SMS_R_Ld5.ne4_ne4.FSCM-ARM97.pm-cpu_gnu.eam-scm

However, it will still show a DIFF. We will have to bless and then see if it stays passing after that...

@ndkeen ndkeen merged commit 5521409 into master Sep 10, 2024
3 checks passed
@ndkeen ndkeen deleted the ndk/eam/fix-setting-writing-of-area-for-SCM branch September 10, 2024 21:29
@ndkeen
Copy link
Contributor Author

ndkeen commented Sep 10, 2024

merged to master, submitted bless request (for pm-cpu with GNU only)

@rljacob
Copy link
Member

rljacob commented Sep 12, 2024

@ndkeen did you bless on mappy? Its still diffing.

@ndkeen
Copy link
Contributor Author

ndkeen commented Sep 12, 2024

No I did not. I was actually not aware that this was an issue on any other machine. I can't even login to mappy. Glad it fixed more than one. Should I make bless request?

@rljacob
Copy link
Member

rljacob commented Sep 12, 2024

Yes please do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug fix PR EAM Fortran-based E3SM Atmosphere Model GNU GNU compiler related issues SCM single column model
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Non-reproducible results with SMS_R_Ld5.ne4_ne4.FSCM-ARM97.pm-cpu_gnu after newer GNU compilers on pm-cpu
3 participants