@@ -839,17 +839,41 @@ contains
839839 ! statement and private variable from the pure- fluid emission, keeping its body and directive
840840 ! identical to the single kernel a build without hypoelasticity would compile. Sharing one kernel
841841 ! pinned it at the GPU register ceiling for every HLLC user.
842+ ! One source of truth for this kernel' s private variables: both emissions of the shared body take
843+ ! _hllc_s*, and only the hypoelastic one adds _hllc_e*. Two hand-written lists drifted apart once --
844+ ! c_sum_Yi_Phi was private in one and shared in the other, which races under OpenMP offload.
845+ ! Names are lists joined once, so no fragment carries a trailing separator to get wrong.
846+ #:set _hllc_s1 = [' i' , ' j' , ' k' , ' l' , ' q' , ' T_L' , ' T_R' , ' vel_L_rms' , ' vel_R_rms' , ' pres_L' , ' pres_R' , &
847+ & ' rho_L' , ' gamma_L' , ' pi_inf_L' , ' qv_L' , ' rho_R' , ' gamma_R' ]
848+ #:set _hllc_s2 = [' pi_inf_R' , ' qv_R' , ' alpha_L_sum' , ' alpha_R_sum' , ' E_L' , ' E_R' , ' MW_L' , ' MW_R' , &
849+ & ' R_gas_L' , ' R_gas_R' , ' Cp_L' , ' Cp_R' , ' Cv_L' , ' Cv_R' , ' c_sum_Yi_Phi' ]
850+ #:set _hllc_s3 = [' Gamm_L' , ' Gamm_R' , ' Y_L' , ' Y_R' , ' H_L' , ' H_R' , ' qv_avg' , ' rho_avg' , ' gamma_avg' , &
851+ & ' H_avg' , ' c_L' , ' c_R' , ' c_avg' , ' s_P' , ' s_M' , ' xi_P' , ' xi_M' , ' xi_L' ]
852+ #:set _hllc_s4 = [' xi_R' , ' xi_L_m1' , ' xi_R_m1' , ' Ms_L' , ' Ms_R' , ' pres_SL' , ' pres_SR' , ' vel_L' , ' vel_R' , &
853+ & ' Re_L' , ' Re_R' , ' alpha_L' , ' alpha_R' , ' alpha_rho_L' , ' alpha_rho_R' ]
854+ #:set _hllc_s5 = [' alpha_lim_L' , ' alpha_lim_R' , ' s_L' , ' s_R' , ' s_S' , ' vel_avg_rms' , ' pcorr' , ' Ys_L' , &
855+ & ' Ys_R' , ' Xs_L' , ' Xs_R' , ' Gamma_iL' , ' Gamma_iR' , ' Cp_iL' , ' Cp_iR' ]
856+ #:set _hllc_s6 = [' R_species' , ' h_iL' , ' h_iR' ]
857+ #:set _hllc_e1 = [' ptilde_L' , ' ptilde_R' , ' tau_e_L' , ' tau_e_R' , ' G_L' , ' G_R' , ' damage_L' , ' damage_R' , &
858+ & ' U_L' , ' U_R' , ' F_L' , ' F_R' , ' F_star_L' , ' F_star_R' , ' F_HLLC' ]
859+ #:set _hllc_e2 = [' u_n_HLLC' , ' u_t_HLLC' , ' u_t2_HLLC' , ' pres_tot_L' , ' pres_tot_R' , ' u_n_L' , ' u_n_R' , &
860+ & ' u_t_L' , ' u_t_R' , ' u_t2_L' , ' u_t2_R' , ' tau_nn_L' , ' tau_nn_R' ]
861+ #:set _hllc_e3 = [' tau_nt_L' , ' tau_nt_R' , ' tau_tt_L' , ' tau_tt_R' , ' tau_nt2_L' , ' tau_nt2_R' , ' tau_t2t2_L' , &
862+ & ' tau_t2t2_R' , ' tau_t1t2_L' , ' tau_t1t2_R' , ' tau_qq_L' , ' tau_qq_R' ]
863+ #:set _hllc_e4 = [' p_face' , ' tau_qq_face' , ' A_L' , ' A_R' , ' denom_A' , ' u_t_star' , ' tau_nt_star' , &
864+ & ' u_t2_star' , ' tau_nt2_star' , ' pres_tot_star' , ' F_HLL' , ' u_n_HLL_trace' ]
865+ #:set _hllc_e5 = [' u_t_HLL_trace' , ' u_t2_HLL_trace' , ' p_face_HLL' , ' tau_qq_face_HLL' , ' tau_nn_HLL' , &
866+ & ' phi' , ' Sigma_L' , ' Sigma_R' , ' dSigma' , ' Sigma_ref' , ' a_L_ref' ]
867+ #:set _hllc_e6 = [' a_R_ref' , ' a_ref' , ' du_t' , ' dtau_nt' , ' du_t2' , ' dtau_nt2' , ' sensor_ptot' , ' sensor_vt' , &
868+ & ' sensor_tnt' , ' sensor_combined' , ' idx_phys' ]
842869 #:if HYPO
843- ! Private list split across _hllc_p1/ p2/ p3 for Fypp line- length limits
844- #:set _hllc_p1 = ' [i, j, k, l, q, T_L, T_R, vel_L_rms, vel_R_rms, pres_L, pres_R, rho_L, gamma_L, pi_inf_L, qv_L, rho_R, gamma_R, pi_inf_R, qv_R, alpha_L_sum, alpha_R_sum, E_L, E_R, MW_L, MW_R, R_gas_L, R_gas_R, Cp_L, Cp_R, Cv_L, Cv_R, c_sum_Yi_Phi, Gamm_L, Gamm_R, Y_L, Y_R, H_L, H_R, qv_avg, rho_avg, gamma_avg, H_avg, c_L, c_R, c_avg, s_P, s_M, xi_P, xi_M, xi_L, xi_R, xi_L_m1, xi_R_m1, Ms_L, Ms_R, pres_SL, pres_SR, vel_L, vel_R, Re_L, Re_R, alpha_L, alpha_R, alpha_rho_L, alpha_rho_R, alpha_lim_L, alpha_lim_R, s_L, s_R, s_S, vel_avg_rms, pcorr, ptilde_L, ptilde_R, Ys_L, Ys_R, Xs_L, Xs_R, Gamma_iL, Gamma_iR, Cp_iL, Cp_iR, R_species, h_iL, h_iR, tau_e_L, tau_e_R, G_L, G_R, damage_L, damage_R,'
845- #:set _hllc_p2 = ' U_L, U_R, F_L, F_R, F_star_L, F_star_R, F_HLLC, u_n_HLLC, u_t_HLLC, u_t2_HLLC, pres_tot_L, pres_tot_R, u_n_L, u_n_R, u_t_L, u_t_R, u_t2_L, u_t2_R, tau_nn_L, tau_nn_R, tau_nt_L, tau_nt_R, tau_tt_L, tau_tt_R, tau_nt2_L, tau_nt2_R, tau_t2t2_L, tau_t2t2_R, tau_t1t2_L, tau_t1t2_R, tau_qq_L, tau_qq_R, p_face, tau_qq_face, A_L, A_R, denom_A, u_t_star, tau_nt_star, u_t2_star, tau_nt2_star, pres_tot_star,'
846- #:set _hllc_p3 = ' F_HLL, u_n_HLL_trace, u_t_HLL_trace, u_t2_HLL_trace, p_face_HLL, tau_qq_face_HLL, tau_nn_HLL, phi, Sigma_L, Sigma_R, dSigma, Sigma_ref, a_L_ref, a_R_ref, a_ref, du_t, dtau_nt, du_t2, dtau_nt2, sensor_ptot, sensor_vt, sensor_tnt, sensor_combined, idx_phys]'
847- #:set _hllc_priv = _hllc_p1 + _hllc_p2 + _hllc_p3
870+ #:set _hllc_priv = ' [' + ' , ' .join(_hllc_s1 + _hllc_s2 + _hllc_s3 + _hllc_s4 + _hllc_s5 + _hllc_s6 &
871+ & + _hllc_e1 + _hllc_e2 + _hllc_e3 + _hllc_e4 + _hllc_e5 &
872+ & + _hllc_e6) + ' ]'
848873 #:else
849- ! Master ' s pure-fluid private list, unchanged
850- #:set _hllc_priv = ' [i, T_L, T_R, vel_L_rms, vel_R_rms, pres_L, pres_R, rho_L, gamma_L, pi_inf_L, qv_L, rho_R, gamma_R, pi_inf_R, qv_R, alpha_L_sum, alpha_R_sum, E_L, E_R, MW_L, MW_R, R_gas_L, R_gas_R, Cp_L, Cp_R, Cv_L, Cv_R, Gamm_L, Gamm_R, Y_L, Y_R, H_L, H_R, qv_avg, rho_avg, gamma_avg, H_avg, c_L, c_R, c_avg, s_P, s_M, xi_P, xi_M, xi_L, xi_R, xi_L_m1, xi_R_m1, Ms_L, Ms_R, pres_SL, pres_SR, vel_L, vel_R, Re_L, Re_R, alpha_L, alpha_R, alpha_rho_L, alpha_rho_R, alpha_lim_L, alpha_lim_R, s_L, s_R, s_S, vel_avg_rms, pcorr, Ys_L, Ys_R, Xs_L, Xs_R, Gamma_iL, Gamma_iR, Cp_iL, Cp_iR, R_species, h_iL, h_iR ]'
874+ #:set _hllc_priv = ' [ ' + ' , ' .join(_hllc_s1 + _hllc_s2 + _hllc_s3 + _hllc_s4 + _hllc_s5 + _hllc_s6) &
875+ & + ' ]'
851876 #:endif
852- ! The two calls below are identical on purpose. An offload kernel is named
853877 ! after the .fpp line of its GPU_PARALLEL_LOOP, so one shared call would give
854878 ! both emissions the same name; amdflang then launches the wrong one and a
855879 ! hypoelastic run faults inside the pure-fluid kernel. Two call sites are what
0 commit comments