The following program produces incorrect results. The line marked ! NOTE should print 1, 2, 3, 4, but instead I get "OpenCoarrays internal error on image 2: libcaf_mpi::caf_sendget_by_ref(): can not allocate 0 bytes of memory."
Versions:
GCC 11.2.0 OpenCoarrays 2.9.2 MPICH 3.2
program bug type :: container integer, allocatable :: stuff(:) end type type(container) :: co_containers(10)[*] if (this_image() == 1) then allocate(co_containers(2)%stuff(4)) co_containers(2)%stuff = [1,2,3,4] end if sync all if (this_image() == 2) then print *, co_containers(2)[1]%stuff ! NOTE end if end program