Research Article

MPI to Coarray Fortran: Experiences with a CFD Solver for Unstructured Meshes

Listing 3

Coarray declaration of an allocatable, derived data object coarray.
type CoData
integer  :: myrank
real, allocatable  :: sol(:)
end type
type (CoData), allocatable  :: Image[:]
allocate(Image[*]) !Allocate derived data type for all
  images
allocate( Image%sol(storeSize) ) !storeSize could have
  different values on all images
deallocate(Image)