Skip to content

Commit 1343d93

Browse files
sbryngelsonSpencer BryngelsonSpencer Bryngelson
authored
Fix missing private clauses in 3D viscous GPU loops (#1225)
Co-authored-by: Spencer Bryngelson <sbryngelson@login11.frontier.olcf.ornl.gov> Co-authored-by: Spencer Bryngelson <sbryngelson@login10.frontier.olcf.ornl.gov>
1 parent 8c70cb1 commit 1343d93

2 files changed

Lines changed: 7 additions & 6 deletions

File tree

src/common/m_phase_change.fpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -754,6 +754,7 @@ contains
754754
! updating saturation temperature
755755
TSat = TSat - Om*FT/dFdT
756756

757+
if (abs(FT) <= ptgalpha_eps) exit
757758
end do
758759

759760
end if

src/simulation/m_viscous.fpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ contains
102102

103103
#:if not MFC_CASE_OPTIMIZATION or num_dims > 1
104104
if (shear_stress) then ! Shear stresses
105-
$:GPU_PARALLEL_LOOP(collapse=3, private='[i,j,k,l,rho_visc, gamma_visc, pi_inf_visc, alpha_visc_sum ,alpha_visc, alpha_rho_visc, Re_visc, tau_Re]')
105+
$:GPU_PARALLEL_LOOP(collapse=3, private='[i,j,k,l,q,rho_visc, gamma_visc, pi_inf_visc, alpha_visc_sum, alpha_visc, alpha_rho_visc, Re_visc, tau_Re]')
106106
do l = is3_viscous%beg, is3_viscous%end
107107
do k = -1, 1
108108
do j = is1_viscous%beg, is1_viscous%end
@@ -212,7 +212,7 @@ contains
212212

213213
#:if not MFC_CASE_OPTIMIZATION or num_dims > 1
214214
if (bulk_stress) then ! Bulk stresses
215-
$:GPU_PARALLEL_LOOP(collapse=3, private='[i,j,k,l,rho_visc, gamma_visc, pi_inf_visc, alpha_visc_sum ,alpha_visc, alpha_rho_visc, Re_visc, tau_Re]')
215+
$:GPU_PARALLEL_LOOP(collapse=3, private='[i,j,k,l,q,rho_visc, gamma_visc, pi_inf_visc, alpha_visc_sum, alpha_visc, alpha_rho_visc, Re_visc, tau_Re]')
216216
do l = is3_viscous%beg, is3_viscous%end
217217
do k = -1, 1
218218
do j = is1_viscous%beg, is1_viscous%end
@@ -319,7 +319,7 @@ contains
319319
#:if not MFC_CASE_OPTIMIZATION or num_dims > 2
320320

321321
if (shear_stress) then ! Shear stresses
322-
$:GPU_PARALLEL_LOOP(collapse=3, private='[alpha_visc, alpha_rho_visc, Re_visc, tau_Re]')
322+
$:GPU_PARALLEL_LOOP(collapse=3, private='[i,j,k,l,q,rho_visc, gamma_visc, pi_inf_visc, alpha_visc_sum, alpha_visc, alpha_rho_visc, Re_visc, tau_Re]')
323323
do l = is3_viscous%beg, is3_viscous%end
324324
do k = -1, 1
325325
do j = is1_viscous%beg, is1_viscous%end
@@ -428,7 +428,7 @@ contains
428428
end if
429429

430430
if (bulk_stress) then ! Bulk stresses
431-
$:GPU_PARALLEL_LOOP(collapse=3, private='[alpha_visc, alpha_rho_visc, Re_visc, tau_Re]')
431+
$:GPU_PARALLEL_LOOP(collapse=3, private='[i,j,k,l,q,rho_visc, gamma_visc, pi_inf_visc, alpha_visc_sum, alpha_visc, alpha_rho_visc, Re_visc, tau_Re]')
432432
do l = is3_viscous%beg, is3_viscous%end
433433
do k = -1, 1
434434
do j = is1_viscous%beg, is1_viscous%end
@@ -1564,12 +1564,12 @@ contains
15641564
real(wp) :: divergence
15651565
integer :: l, q ! iterators
15661566

1567-
! zero the viscous stress, collection of velocity diriviatives, and spacial finite differences
1567+
! zero the viscous stress, collection of velocity derivatives, and spatial finite differences
15681568
viscous_stress_tensor = 0._wp
15691569
velocity_gradient_tensor = 0._wp
15701570
dx = 0._wp
15711571

1572-
! get the change in x used in the finite difference equaiont
1572+
! get the change in x used in the finite difference equation
15731573
dx(1) = 0.5_wp*(x_cc(i + 1) - x_cc(i - 1))
15741574
dx(2) = 0.5_wp*(y_cc(j + 1) - y_cc(j - 1))
15751575
if (num_dims == 3) then

0 commit comments

Comments
 (0)