@@ -172,6 +172,12 @@ module m_rhs
172
172
type(int_bounds_info) :: ix, iy, iz
173
173
!$acc declare create(ix, iy, iz)
174
174
175
+ type(int_bounds_info) :: ibounds_interior(1 :3 )
176
+ !$acc declare create(ibounds_interior)
177
+
178
+ type(int_bounds_info) :: ibounds_wbuffer(1 :3 )
179
+ !$acc declare create(ibounds_wbuffer)
180
+
175
181
type(int_bounds_info) :: is1, is2, is3
176
182
!$acc declare create(is1, is2, is3)
177
183
@@ -236,15 +242,24 @@ contains
236
242
integer :: i, j, k, l, id !< Generic loop iterators
237
243
238
244
! Configuring Coordinate Direction Indexes =========================
239
- ix%beg = - buff_size; iy%beg = 0 ; iz%beg = 0
245
+ ibounds_interior(1 )%beg = 0 ; ibounds_interior(2 )%beg = 0 ; ibounds_interior(3 )%beg = 0
246
+ ibounds_interior(1 )%end = m; ibounds_interior(2 )%end = n; ibounds_interior(3 )%end = p
240
247
241
- if (n > 0 ) iy%beg = - buff_size; if (p > 0 ) iz%beg = - buff_size
248
+ ibounds_wbuffer(1 )%beg = - buff_size
249
+ ibounds_wbuffer(2 )%beg = 0
250
+ ibounds_wbuffer(3 )%beg = 0
251
+ if (num_dims > 1 ) then ibounds_wbuffer(2 )%beg = - buff_size; end if
252
+ if (num_dims > 2 ) then ibounds_wbuffer(3 )%beg = - buff_size; end if
242
253
243
- ix%end = m - ix%beg; iy%end = n - iy%beg; iz%end = p - iz%beg
254
+ ibounds_wbuffer(1 )%end = m + buff_size
255
+ ibounds_wbuffer(2 )%end = n + buff_size
256
+ ibounds_wbuffer(3 )%end = p + buff_size
257
+
258
+ ix = ibounds_interior(1 ); iy = ibounds_interior(2 ); iz = ibounds_interior(3 )
244
259
! ==================================================================
245
260
246
- !$acc enter data copyin(ix, iy, iz)
247
- !$acc update device(ix, iy, iz)
261
+ !$acc enter data copyin(ibounds_interior, ibounds_wbuffer, ix, iy, iz)
262
+ !$acc update device(ibounds_interior, ibounds_wbuffer, ix, iy, iz)
248
263
249
264
ixt = ix; iyt = iy; izt = iz
250
265
@@ -797,7 +812,7 @@ contains
797
812
q_cons_qp%vf, &
798
813
q_prim_qp%vf, &
799
814
gm_alpha_qp%vf, &
800
- ix, iy, iz )
815
+ ibounds_interior( 1 ), ibounds_interior( 2 ), ibounds_interior( 3 ) )
801
816
call nvtxEndRange
802
817
803
818
call nvtxStartRange(" RHS-MPI" )
0 commit comments