Skip to content

Commit e17151c

Browse files
committed
Add comments to testcase.
1 parent 78b7910 commit e17151c

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/tests/regression/reported/issue-654-send_by_ref_rank_2.f90

+8
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
! Check transfering data from one to a different remote image works.
2+
13
program test_sendget_by_ref
24
implicit none
35
type :: rank1_type
@@ -18,6 +20,8 @@ program test_sendget_by_ref
1820

1921
sync all
2022

23+
! Send data from image j to image i's j-th column.
24+
! This ensures that sendget_by_ref works as expected.
2125
do i = 1, num_images()
2226
do j = 1, num_images()
2327
R_send[i]%A(j,this_image()) = R_get[j]%A(j)
@@ -26,10 +30,14 @@ program test_sendget_by_ref
2630

2731
sync all
2832

33+
! Check that each image has the correct data in its R_send array,
34+
! which in fact is the receiver here.
2935
do i = 1, num_images()
3036
if (any(R_send%A(:,i) /= (/(j, j = 1, num_images())/))) res = .False.
3137
end do
3238

39+
! Recude the result. both() is just a logical scalar and, because there
40+
! is no predefined operator for this.
3341
call co_reduce(res, both)
3442
write(*,*) this_image(), ':', R_get%A, '|', R_send%A
3543

0 commit comments

Comments
 (0)