From b81c51f39702c28a4fd3b1f335781ab93df1226e Mon Sep 17 00:00:00 2001 From: Abishek Gopal Date: Tue, 18 Aug 2026 17:14:13 -0600 Subject: [PATCH] Fix for GPU-enabled restart runs 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. --- src/core_atmosphere/dynamics/mpas_atm_time_integration.F | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core_atmosphere/dynamics/mpas_atm_time_integration.F b/src/core_atmosphere/dynamics/mpas_atm_time_integration.F index 227fbde862..6f23b939b0 100644 --- a/src/core_atmosphere/dynamics/mpas_atm_time_integration.F +++ b/src/core_atmosphere/dynamics/mpas_atm_time_integration.F @@ -594,7 +594,7 @@ subroutine mpas_atm_pre_compute_solve_diagnostics(block) MPAS_ACC_TIMER_START('first_compute_solve_diagnostics [ACC_data_xfer]') call mpas_pool_get_array(state, 'rho_zz', h, 1) - !$acc enter data create(h) + !$acc enter data copyin(h) call mpas_pool_get_array(state, 'u', u, 1) !$acc enter data copyin(u)