Skip to content

Commit f5ac529

Browse files
author
Anand Radhakrishnan
committed
fix to make benchmark work on frontier
1 parent 8a66941 commit f5ac529

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

src/simulation/m_riemann_solvers.fpp

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1968,7 +1968,7 @@ contains
19681968
real(wp) :: flux_ene_e
19691969
real(wp) :: zcoef, pcorr !< low Mach number correction
19701970

1971-
integer :: i, j, k, l, q !< Generic loop iterators
1971+
integer :: Re_max, i, j, k, l, q !< Generic loop iterators
19721972
integer :: idx1, idxi
19731973

19741974
! Populating the buffers of the left and right Riemann problem
@@ -3090,7 +3090,7 @@ contains
30903090
#:endcall GPU_PARALLEL_LOOP
30913091
else
30923092
! 5-EQUATION MODEL WITH HLLC
3093-
#:call GPU_PARALLEL_LOOP(collapse=3, private='[i,q, T_L, T_R, idx1, idxi, 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, rho_avg, gamma_avg, H_avg, c_L, c_R, c_avg, s_P, s_M, xi_P, xi_M, xi_L, xi_R, Ms_L, Ms_R, pres_SL, pres_SR, vel_L, vel_R, Re_L, Re_R, alpha_L, alpha_R, s_L, s_R, s_S, vel_avg_rms, pcorr, zcoef, vel_L_tmp, vel_R_tmp, Ys_L, Ys_R, Xs_L, Xs_R, Gamma_iL, Gamma_iR, Cp_iL, Cp_iR, tau_e_L, tau_e_R, xi_field_L, xi_field_R, Yi_avg,Phi_avg, h_iL, h_iR, h_avg_2, G_L, G_R]', copyin='[is1, is2, is3]')
3093+
#:call GPU_PARALLEL_LOOP(collapse=3, private='[Re_max, i, q, T_L, T_R, idx1, idxi, 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, rho_avg, gamma_avg, H_avg, c_L, c_R, c_avg, s_P, s_M, xi_P, xi_M, xi_L, xi_R, Ms_L, Ms_R, pres_SL, pres_SR, vel_L, vel_R, Re_L, Re_R, alpha_L, alpha_R, s_L, s_R, s_S, vel_avg_rms, pcorr, zcoef, vel_L_tmp, vel_R_tmp, Ys_L, Ys_R, Xs_L, Xs_R, Gamma_iL, Gamma_iR, Cp_iL, Cp_iR, tau_e_L, tau_e_R, xi_field_L, xi_field_R, Yi_avg,Phi_avg, h_iL, h_iR, h_avg_2, G_L, G_R]', copyin='[is1, is2, is3]')
30943094
do l = is3%beg, is3%end
30953095
do k = is2%beg, is2%end
30963096
do j = is1%beg, is1%end
@@ -3154,22 +3154,24 @@ contains
31543154
qv_R = qv_R + qR_prim_rs${XYZ}$_vf(j + 1, k, l, i)*qvs(i)
31553155
end do
31563156

3157+
Re_max = 0
3158+
if(Re_size(1) > 0) Re_max = 1
3159+
if(Re_size(2) > 0) Re_max = 2
3160+
31573161
if (viscous) then
31583162
$:GPU_LOOP(parallelism='[seq]')
3159-
do i = 1, 2
3160-
Re_L(i) = dflt_real
3161-
Re_R(i) = dflt_real
3162-
3163-
if (Re_size(i) > 0) Re_L(i) = 0._wp
3164-
if (Re_size(i) > 0) Re_R(i) = 0._wp
3163+
do i = 1, Re_max
3164+
Re_L(i) = 0._wp
3165+
Re_R(i) = 0._wp
31653166

31663167
$:GPU_LOOP(parallelism='[seq]')
31673168
do q = 1, Re_size(i)
3168-
Re_L(i) = qL_prim_rs${XYZ}$_vf(j, k, l, E_idx + Re_idx(i, q))/Res_gs(i, q) &
3169+
Re_L(i) = alpha_L(Re_idx(i,q))/Res_gs(i, q) &
31693170
+ Re_L(i)
3170-
Re_R(i) = qR_prim_rs${XYZ}$_vf(j + 1, k, l, E_idx + Re_idx(i, q))/Res_gs(i, q) &
3171+
Re_R(i) = alpha_R(Re_idx(i,q))/Res_gs(i, q) &
31713172
+ Re_R(i)
31723173
end do
3174+
31733175
Re_L(i) = 1._wp/max(Re_L(i), sgm_eps)
31743176
Re_R(i) = 1._wp/max(Re_R(i), sgm_eps)
31753177
end do

0 commit comments

Comments
 (0)