Skip to content

Fix for GPU-enabled restart runs - #1503

Open
abishekg7 wants to merge 1 commit into
MPAS-Dev:hotfix-v8.4.2from
abishekg7:atmosphere/fix_acc_data_movement
Open

Fix for GPU-enabled restart runs#1503
abishekg7 wants to merge 1 commit into
MPAS-Dev:hotfix-v8.4.2from
abishekg7:atmosphere/fix_acc_data_movement

Conversation

@abishekg7

@abishekg7 abishekg7 commented Aug 19, 2026

Copy link
Copy Markdown
Collaborator

This PR corrects the OpenACC data movement for the field rho_zz in routine mpas_atm_pre_compute_solve_diagnostics. Previously, an OpenACC create statement was used for this field. This is still correct for the cold initialization case, but produces incorrect results in the case of a restarted run. This is now changed to a copyin statement.

If the following condition is met .not. config_do_restart .or. (config_do_restart .and. config_do_DAcycling) then the call to atm_init_coupled_diagnostics in atm_mpas_init_block computes the first time level of rho_zz. Allowing us to use a create statement in mpas_atm_pre_compute_solve_diagnostics. However, in the case of a restart run with no DA cycling, the usage of the create statement is incorrect.

This issue was discovered as a result of restarted real simulations on GPUs crashing. The unphysical values from the dynamical core lead to a segmentation fault occuring in the SW radiation calls. Furthermore, the Jablonowski-Williamson baroclinic wave case also showed discrepancies between the cold initialization and the restarted test case. Both of these issues have been addressed by this PR.

@abishekg7
abishekg7 force-pushed the atmosphere/fix_acc_data_movement branch from e2c174a to 9aaf86e Compare August 19, 2026 16:50
@abishekg7
abishekg7 marked this pull request as ready for review August 19, 2026 16:50
@mgduda

mgduda commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

@abishekg7 This looks like a fix we should include in the upcoming v8.4.2 release. If you agree, could you set the base branch to hotfix-v8.4.2?

This commit fixes the OpenACC data movement for the field rho_zz in routine
mpas_atm_pre_compute_solve_diagnostics. Previously, an OpenACC create statement
was used for this field. This is still correct for the cold initialization case
, but produces incorrect results in the case of a restarted run. This has now
been changed to a copyin statement.

This issue was discovered as a result of restarted real simulations on GPUs
crashing. The unphysical values from the dynamical core lead to a segmentation
fault occuring in the SW radiation calls. Furthermore, the Jablonowski-
Williamson baroclinic wave case also showed discrepancies between the cold
initialization and the restarted test case. Both of these issues have been
addressed by this commit.
@abishekg7
abishekg7 changed the base branch from develop to hotfix-v8.4.2 August 19, 2026 19:16
@abishekg7
abishekg7 force-pushed the atmosphere/fix_acc_data_movement branch from 9aaf86e to b81c51f Compare August 19, 2026 19:17
@abishekg7

Copy link
Copy Markdown
Collaborator Author

@abishekg7 This looks like a fix we should include in the upcoming v8.4.2 release. If you agree, could you set the base branch to hotfix-v8.4.2?

Rebased it to hotfix-v8.4.2 now.

@mgduda mgduda added Atmosphere bug fix OpenACC Work related to OpenACC acceleration of code labels Aug 19, 2026
@mgduda
mgduda self-requested a review August 19, 2026 20:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Atmosphere bug fix OpenACC Work related to OpenACC acceleration of code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants