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 out-of-bounds access in module_diag_hailcast.F90 which crashes RRFS on WCOSS2 #746

Merged
merged 9 commits into from
Jan 17, 2024

Conversation

SamuelTrahanNOAA
Copy link
Contributor

Description

Fixes a bug that can crash the RRFS ensembles. When KBAS=1, there's an out-of-bounds write in an array. That corrupts memory and occasionally crashes the model.

Issue(s) addressed

FIXME: insert issue here.

Testing

How were these changes tested?

Reran the failed case on Hera and WCOSS2 Dogwood. It passed. Also ran the regression tests on Hera.

What compilers / HPCs was it tested with?

Intel WCOSS2, Intel Hera, GNU Hera.

Are the changes covered by regression tests? (If not, why? Do new tests need to be added?)

Existing regression tests are sufficient.

Have the ufs-weather-model regression test been run? On what platform?

Yes. Hera.

Will the code updates change regression test baseline? If yes, why? Please show the baseline directory below.

No.

Please commit the regression test log files in your ufs-weather-model branch

Done.

Dependencies

@SamuelTrahanNOAA SamuelTrahanNOAA changed the title Fix out-of-bounds write in module_diag_hailcast.F90 which crashes RRFS on WCOSS2 Fix out-of-bounds access in module_diag_hailcast.F90 which crashes RRFS on WCOSS2 Dec 27, 2023
@SamuelTrahanNOAA SamuelTrahanNOAA marked this pull request as draft December 27, 2023 20:05
@SamuelTrahanNOAA
Copy link
Contributor Author

This is a draft because I discovered I used the wrong fix. I need to do this instead:

-    DO k=KBAS,nz
+    DO k=KBAS+1,nz
        RWA_new(k) = RWA_new(k) / (h1d(k)-h1d(k-1))
     ENDDO

I'm testing this now on WCOSS2 and Hera.

@SamuelTrahanNOAA
Copy link
Contributor Author

The correct fix works too. This is ready for review.

@SamuelTrahanNOAA SamuelTrahanNOAA marked this pull request as ready for review December 28, 2023 02:23
@jkbk2004
Copy link
Collaborator

@SamuelTrahanNOAA cubed sphere pr was merged

@SamuelTrahanNOAA
Copy link
Contributor Author

I reverted .gitmodules and updated the atmos_cubed_sphere submodule hash to use dev/emc.

This PR is ready for final review and merge.

@jkbk2004 jkbk2004 merged commit 68980ad into NOAA-EMC:develop Jan 17, 2024
2 checks passed
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.

3 participants