@@ -47,8 +47,6 @@ program test_mpp_pelist_gatscat_gen_ind
4747 3 , 1 , 2 , &
4848 3 , 2 , 1 ], [3 , 6 ])
4949
50- dim_order = (/ 2 , 3 , 1 / )
51-
5250 if (pe == root) print * , ' --- PELIST SCATTER/GATHER TESTS ---'
5351
5452 do p = 1 , 6
@@ -61,10 +59,7 @@ program test_mpp_pelist_gatscat_gen_ind
6159 endif
6260
6361 call test_scatter(npes, pe, root, dim_order)
64- call mpp_sync()
65-
6662 call test_gather(npes, pe, root, dim_order)
67- call mpp_sync()
6863
6964 enddo
7065
@@ -229,6 +224,7 @@ subroutine test_scatter(npes, pe, root, dim_order)
229224
230225 call get_decomp(pe, npes, NI, NJ, is, ie, js, je)
231226 call build_pelist(npes, pelist)
227+ ! call mpp_get_pelist(pelist)
232228
233229 call alloc_field(global_perm, dim_order, (/ NI, NJ, NK/ ), pe, root, .true. )
234230 call alloc_field(segment, dim_order, (/ ie- is+1 , NJ, NK/ ), pe, root, .false. )
@@ -240,14 +236,15 @@ subroutine test_scatter(npes, pe, root, dim_order)
240236 endif
241237
242238 ! --- scatter ---
239+ call mpp_sync()
243240 if (pe == root) then
244241 call mpp_scatter(is, ie, js, je, NK, pelist, segment, global_perm, dim_order, .true. )
245242 else
246243 call mpp_scatter(is, ie, js, je, NK, pelist, segment, global_perm, dim_order, .false. )
247244 endif
245+ call mpp_sync()
248246
249247 call check_answer(segment, is, ie, NI, NJ, NK, dim_order, .false. )
250- call mpp_sync()
251248
252249 if (pe == root) print * , ' SCATTER PASS'
253250
@@ -279,12 +276,12 @@ subroutine test_gather(npes, pe, root, dim_order)
279276 call fill_from_val(segment, is, ie, NJ, NK, dim_order)
280277
281278 ! --- GATHER ---
279+ call mpp_sync()
282280 if (pe == root) then
283281 call mpp_gather(is, ie, js, je, NK, pelist, segment, gather_data, dim_order, .true. )
284282 else
285283 call mpp_gather(is, ie, js, je, NK, pelist, segment, gather_data, dim_order, .false. )
286284 endif
287-
288285 call mpp_sync()
289286
290287 if (pe == root) then
0 commit comments