Skip to content

Commit 9b70f9d

Browse files
committed
bug fixes for indexing and GPU communication
1 parent 58a0cba commit 9b70f9d

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

src/simulation/m_bubbles_EL.fpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,12 +114,15 @@ contains
114114
115115
pcomm_coords(1)%beg = x_cb(buff_size - fd_number - 1)
116116
pcomm_coords(1)%end = x_cb(m - buff_size + fd_number)
117+
$:GPU_UPDATE(device='[pcomm_coords(1)]')
117118
if (n > 0) then
118119
pcomm_coords(2)%beg = y_cb(buff_size - fd_number - 1)
119120
pcomm_coords(2)%end = y_cb(n - buff_size + fd_number)
121+
$:GPU_UPDATE(device='[pcomm_coords(2)]')
120122
if (p > 0) then
121123
pcomm_coords(3)%beg = z_cb(buff_size - fd_number - 1)
122124
pcomm_coords(3)%end = z_cb(p - buff_size + fd_number)
125+
$:GPU_UPDATE(device='[pcomm_coords(3)]')
123126
end if
124127
end if
125128
@@ -1482,8 +1485,8 @@ contains
14821485
$:GPU_UPDATE(host='[bub_R0, Rmax_stats, Rmin_stats, gas_mg, gas_betaT, &
14831486
& gas_betaC, bub_dphidt, lag_id, gas_p, gas_mv, intfc_rad, intfc_vel, &
14841487
& mtn_pos, mtn_posPrev, mtn_vel, mtn_s, intfc_draddt, intfc_dveldt, &
1485-
& gas_dpdt, gas_dmvdt, mtn_dposdt, mtn_dveldt, keep_bubble, &
1486-
& nBubs]')
1488+
& gas_dpdt, gas_dmvdt, mtn_dposdt, mtn_dveldt, keep_bubble, nBubs, &
1489+
& wrap_bubble_dir, wrap_bubble_loc]')
14871490
call nvtxEndRange
14881491

14891492
if (nBubs > 0) then

src/simulation/m_bubbles_EL_kernels.fpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -593,11 +593,11 @@ contains
593593
eta(1) = (q_prim_vf(E_idx)%sf(cell(1), cell(2), cell(3)) - &
594594
q_prim_vf(E_idx)%sf(cell(1), cell(2), cell(3) - 2))/ &
595595
(z_cc(cell(3)) - z_cc(cell(3) - 2))
596-
xi(2) = y_cc(cell(3))
596+
xi(2) = z_cc(cell(3))
597597
eta(2) = (q_prim_vf(E_idx)%sf(cell(1), cell(2), cell(3) + 1) - &
598598
q_prim_vf(E_idx)%sf(cell(1), cell(2), cell(3) - 1))/ &
599599
(z_cc(cell(3) + 1) - z_cc(cell(3) - 1))
600-
xi(3) = y_cc(cell(3) + 1)
600+
xi(3) = z_cc(cell(3) + 1)
601601
eta(3) = (q_prim_vf(E_idx)%sf(cell(1), cell(2), cell(3) + 2) - &
602602
q_prim_vf(E_idx)%sf(cell(1), cell(2), cell(3)))/ &
603603
(z_cc(cell(3) + 2) - z_cc(cell(3)))

src/simulation/m_global_parameters.fpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,7 @@ module m_global_parameters
250250
!! Processor coordinates in MPI_CART_COMM
251251

252252
type(bounds_info), allocatable, dimension(:) :: pcomm_coords
253+
$:GPU_DECLARE(create='[pcomm_coords]')
253254
!! Coordinates for EL particle transfer
254255

255256
type(int_bounds_info), dimension(3) :: nidx !< Indices for neighboring processors
@@ -1389,7 +1390,7 @@ contains
13891390
#:endif
13901391
13911392
allocate (proc_coords(1:num_dims))
1392-
allocate (pcomm_coords(1:num_dims))
1393+
@:ALLOCATE(pcomm_coords(1:num_dims))
13931394
13941395
if (parallel_io .neqv. .true.) return
13951396
@@ -1426,7 +1427,7 @@ contains
14261427
end if
14271428
14281429
deallocate (proc_coords)
1429-
deallocate (pcomm_coords)
1430+
@:DEALLOCATE(pcomm_coords)
14301431
if (parallel_io) then
14311432
deallocate (start_idx)
14321433

0 commit comments

Comments
 (0)