From ae7c02bc950052bb66fc7a95c6930e92290475dd Mon Sep 17 00:00:00 2001 From: wilfonba Date: Mon, 23 Dec 2024 16:20:17 -0500 Subject: [PATCH] fix frontier --- src/simulation/m_bubbles_EL.fpp | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/src/simulation/m_bubbles_EL.fpp b/src/simulation/m_bubbles_EL.fpp index 704a0e0d4..49361def7 100644 --- a/src/simulation/m_bubbles_EL.fpp +++ b/src/simulation/m_bubbles_EL.fpp @@ -1166,7 +1166,8 @@ contains lag_largestep = 0._wp remove_id = 0 - !$acc parallel loop gang vector default(present) reduction(+: lag_largestep) reduction(MAX: remove_id) private(k) copyin(RKstep) + !$acc parallel loop gang vector default(present) reduction(+:lag_largestep) & + !$acc reduction(MAX: remove_id) copyin(RKstep) copy(lag_largestep, remove_id) do k = 1, nBubs radiusOld = intfc_rad(k, 2) @@ -1238,7 +1239,7 @@ contains integer :: i, j, k rkck_errmax = 0._wp - !$acc parallel loop gang vector default(present) reduction(MAX: rkck_errmax) private(k) + !$acc parallel loop gang vector default(present) reduction(MAX: rkck_errmax) copy(rkck_errmax) do k = 1, nBubs errb = 0._wp @@ -1662,15 +1663,12 @@ contains lag_void_avg = 0._wp lag_vol = 0._wp !$acc parallel loop collapse(3) gang vector default(present) reduction(+:lag_vol,lag_void_avg) & - !$acc reduction(MAX:lag_void_max) private(cell) - do i = 0, m + !$acc reduction(MAX:lag_void_max) copy(lag_vol, lag_void_avg, lag_void_max) + do k = 0, p do j = 0, n - do k = 0, p + do i = 0, m lag_void_max = max(lag_void_max, 1._wp - q_beta%vf(1)%sf(i, j, k)) - cell(1) = i - cell(2) = j - cell(3) = k - call s_get_char_vol(cell(1), cell(2), cell(3), volcell) + call s_get_char_vol(i, j, k, volcell) if ((1._wp - q_beta%vf(1)%sf(i, j, k)) > 5.0d-11) then lag_void_avg = lag_void_avg + (1._wp - q_beta%vf(1)%sf(i, j, k))*volcell lag_vol = lag_vol + volcell @@ -1848,7 +1846,8 @@ contains integer :: k - !$acc parallel loop gang vector default(present) reduction(MAX: Rmax_glb) reduction(MIN: Rmin_glb) private(k) + !$acc parallel loop gang vector default(present) reduction(MAX:Rmax_glb) & + !$acc reduction(MIN: Rmin_glb) copy(Rmax_glb, Rmin_glb) do k = 1, nBubs Rmax_glb = max(Rmax_glb, intfc_rad(k, 1)/bub_R0(k)) Rmin_glb = min(Rmin_glb, intfc_rad(k, 1)/bub_R0(k))