From b1dc5c9971a0ae5afc858030886fbd3e37d23a89 Mon Sep 17 00:00:00 2001 From: Spencer Bryngelson Date: Sun, 1 Mar 2026 18:39:05 -0500 Subject: [PATCH] Remove dead ACC loop directives in s_derive_center_of_mass The two $:GPU_LOOP(parallelism='[seq]') directives before the c_m zero-initialization loops in s_derive_center_of_mass were outside any GPU parallel region and were silently ignored by the compiler (CCE 19.0.0 warns ftn-7255: "loop marked for accelerator worksharing but not inside an accelerator region"). The initialization runs on CPU before the GPU_UPDATE that pushes c_m to device. Replace the nested loop with a simple Fortran array assignment, which is idiomatic and eliminates the dead directives. Co-Authored-By: Claude Sonnet 4.6 --- src/simulation/m_derived_variables.fpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/simulation/m_derived_variables.fpp b/src/simulation/m_derived_variables.fpp index fb6236595f..53a8396cbf 100644 --- a/src/simulation/m_derived_variables.fpp +++ b/src/simulation/m_derived_variables.fpp @@ -428,13 +428,7 @@ contains real(wp) :: tmp, tmp_out !< Temporary variable to store quantity for mpi_allreduce real(wp) :: dV !< Discrete cell volume - $:GPU_LOOP(parallelism='[seq]') - do i = 1, num_fluids - $:GPU_LOOP(parallelism='[seq]') - do j = 1, 5 - c_m(i, j) = 0.0_wp - end do - end do + c_m(:, :) = 0.0_wp $:GPU_UPDATE(device='[c_m]')