5.1 - coindexed access to a pointer or allocatable component of the coindexed coarray at (1) is not yet supported

Anton Shterenlikht mexas@bris.ac.uk
Wed Nov 25 08:40:00 GMT 2015


>From sgk@troutmask.apl.washington.edu Tue Nov 24 18:12:36 2015
>
>Need a compilable piece of code to test.

A complete program:

type t
  real, allocatable :: r(:,:)
end type t
 type( t ) :: c[*], l
   allocate( c%r(10,10), source=0.0 )
   allocate( l%r(10,10), source=1.0 )
   sync all
   if ( this_image() .eq. 1 ) l = c[ num_images() ]
   write (*,*) this_image(), sum( l%r )
end

$ gfortran6 -fcoarray=lib z.f90

    if ( this_image() .eq. 1 ) l = c[ num_images() ]
                                  1

Error: Sorry, coindexed coarray at (1) with allocatable component is not yet supported

I cannot think of any workaround.

In my program c%r is allocated differently on each image.
The dimensions of r can be calculated by each image
and passed between images as scalars. This allows
allocating non-coarray arrays l%r of the same size as
the array on remote image. However, there seem to be
no way to pull the data.

Please help

Thanks

Anton



More information about the Fortran mailing list