Skip to content

Commit 01a0e33

Browse files
sbryngelsonclaude
andcommitted
Fix missing private clauses in 3D viscous GPU loops
The 3D shear stress and bulk stress GPU parallel loops were missing rho_visc, gamma_visc, pi_inf_visc, and alpha_visc_sum from their private clauses. The corresponding 2D loops already had these variables listed. Without privatization, these variables could cause race conditions on GPU. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 4ff0bef commit 01a0e33

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/simulation/m_viscous.fpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ contains
318318
#:if not MFC_CASE_OPTIMIZATION or num_dims > 2
319319

320320
if (shear_stress) then ! Shear stresses
321-
$:GPU_PARALLEL_LOOP(collapse=3, private='[alpha_visc, alpha_rho_visc, Re_visc, tau_Re]')
321+
$:GPU_PARALLEL_LOOP(collapse=3, private='[rho_visc, gamma_visc, pi_inf_visc, alpha_visc_sum, alpha_visc, alpha_rho_visc, Re_visc, tau_Re]')
322322
do l = is3_viscous%beg, is3_viscous%end
323323
do k = -1, 1
324324
do j = is1_viscous%beg, is1_viscous%end
@@ -427,7 +427,7 @@ contains
427427
end if
428428

429429
if (bulk_stress) then ! Bulk stresses
430-
$:GPU_PARALLEL_LOOP(collapse=3, private='[alpha_visc, alpha_rho_visc, Re_visc, tau_Re]')
430+
$:GPU_PARALLEL_LOOP(collapse=3, private='[rho_visc, gamma_visc, pi_inf_visc, alpha_visc_sum, alpha_visc, alpha_rho_visc, Re_visc, tau_Re]')
431431
do l = is3_viscous%beg, is3_viscous%end
432432
do k = -1, 1
433433
do j = is1_viscous%beg, is1_viscous%end

0 commit comments

Comments
 (0)