@@ -294,38 +294,32 @@ program get_convert_nums
294
294
295
295
! Now with strides
296
296
297
- ! Transfer to other image now.
297
+ ! Get from other image now.
298
298
sync all
299
- co_int_k4 = - 1
300
- co_int_k1 = INT (- 1 , 1 )
301
- co_real_k8 = - 1.0
302
- co_real_k4 = REAL (- 1.0 , 4 )
299
+ int_k4 = - 1
300
+ int_k1 = INT (- 1 , 1 )
301
+ real_k8 = - 1.0
302
+ real_k4 = REAL (- 1.0 , 4 )
303
303
sync all
304
304
if (me == 1 ) then
305
- co_int_k4(:: 2 )[2 ] = [ 15 , 13 , 11 ]
306
-
307
- co_int_k1(:: 2 )[2 ] = [INT (- 15 , 1 ), INT (- 13 , 1 ), INT (- 11 , 1 )]
308
-
309
- co_real_k8(:: 2 )[2 ] = [REAL (1.3 , 8 ), REAL (1.5 , 8 ), REAL (1.7 , 8 )]
310
-
311
- co_real_k4(:: 2 )[2 ] = [REAL (1.3 , 4 ), REAL (1.5 , 4 ), REAL (1.7 , 4 )]
312
- end if
313
-
314
- sync all
315
- if (me == 2 ) then
316
- print * , co_int_k4
317
- if (any (co_int_k4 /= [15 , - 1 , 13 , - 1 , 11 ])) error stop ' strided send int kind=4 to kind=4 to image 2 failed.'
305
+ int_k4(1 :3 ) = co_int_k4(:: 2 )[2 ]
306
+ print * , int_k4
307
+ if (any (int_k4 /= [co_int_k4(1 ), co_int_k4(3 ), co_int_k4(5 ), - 1 , - 1 ])) &
308
+ & error stop ' strided send int kind=4 to kind=4 to image 2 failed.'
318
309
319
- print * , co_int_k1
320
- if (any (co_int_k1 /= [INT (- 15 , 1 ), INT (- 1 , 1 ), INT (- 13 , 1 ), INT (- 1 , 1 ), INT (- 11 , 1 )])) &
310
+ int_k1(3 :5 ) = co_int_k1(:: 2 )[2 ]
311
+ print * , int_k1
312
+ if (any (int_k1 /= [INT (- 1 , 1 ), INT (- 1 , 1 ), co_int_k1(1 ), co_int_k1(3 ), co_int_k1(5 )])) &
321
313
& error stop ' strided send int kind=1 to kind=1 to image 2 failed.'
322
314
323
- print * , co_real_k8
324
- if (any (abs (co_real_k8 - [1.3 , - 1.0 , 1.5 , - 1.0 , 1.7 ]) > tolerance8)) &
315
+ real_k8(1 :3 ) = co_real_k8(:: 2 )[2 ]
316
+ print * , real_k8
317
+ if (any (abs (real_k8 - [co_real_k8(1 ), co_real_k8(3 ), co_real_k8(5 ), REAL (- 1.0 , 8 ), REAL (- 1.0 , 8 )]) > tolerance8)) &
325
318
& error stop ' strided send real kind=8 to kind=8 to image 2 failed.'
326
319
327
- print * , co_real_k4
328
- if (any (abs (co_real_k4 - [REAL (1.3 , 4 ), REAL (- 1.0 , 4 ), REAL (1.5 , 4 ), REAL (- 1.0 , 4 ), REAL (1.7 , 4 )]) > tolerance4)) &
320
+ real_k4(3 :5 ) = co_real_k4(:: 2 )[2 ]
321
+ print * , real_k4
322
+ if (any (abs (real_k4 - [- 1.0 , - 1.0 , co_real_k4(1 ), co_real_k4(3 ), co_real_k4(5 )]) > tolerance4)) &
329
323
& error stop ' strided send real kind=4 to kind=4 to image 2 failed.'
330
324
end if
331
325
0 commit comments