Skip to content

Commit 988effd

Browse files
committed
Fix testcase for get_convert_nums.f90. A part was still testing send() and not get().
1 parent 77bd4af commit 988effd

File tree

1 file changed

+18
-24
lines changed

1 file changed

+18
-24
lines changed

src/tests/unit/send-get/get_convert_nums.f90

Lines changed: 18 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -294,38 +294,32 @@ program get_convert_nums
294294

295295
! Now with strides
296296

297-
! Transfer to other image now.
297+
! Get from other image now.
298298
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)
303303
sync all
304304
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.'
318309

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)])) &
321313
& error stop 'strided send int kind=1 to kind=1 to image 2 failed.'
322314

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)) &
325318
& error stop 'strided send real kind=8 to kind=8 to image 2 failed.'
326319

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)) &
329323
& error stop 'strided send real kind=4 to kind=4 to image 2 failed.'
330324
end if
331325

0 commit comments

Comments
 (0)