Skip to content

Commit af7969b

Browse files
author
Damian Rouson
committed
Demonstrate alloc component co_broadcast failure
1 parent 169bd6c commit af7969b

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
program main
2+
!! This test seg faults for if num_images() > 1
3+
implicit none
4+
5+
type dynamic
6+
integer, allocatable :: vector(:)
7+
end type
8+
type(dynamic) alloc_message, alloc_content
9+
10+
integer, parameter :: sender=1 !! co_broadcast source_image
11+
12+
alloc_content%vector = [1,2,3,4]
13+
14+
if (this_image()==sender) alloc_message = alloc_content
15+
16+
call co_broadcast(alloc_message,source_image=sender)
17+
if ( any(alloc_message%vector /= alloc_content%vector) ) error stop "Test failed."
18+
19+
sync all ! Wait for each image to pass the test
20+
if (this_image()==sender) print *,"Test passed."
21+
22+
end program main

0 commit comments

Comments
 (0)