Problem with coarrays of derived types with allocatable components

Problem with coarrays of derived types with allocatable components

Hello,The release notes ofFortran Composer XE 2011 Update 6 suggest that coarrays of derived types with allocatable components are allowed (therelease notes ofprevious version listed 'Coarrays of derived type where the type contains an ultimate component that isALLOCATABLE or POINTER'under 'Coarray Known Issues').
Yet, this still seems to be a problem in my Update 6 version.
For example:

program test implicit none type :: new_type integer :: a(2) integer,allocatable :: b(:) end type new_type type(new_type) :: t[*] integer :: k,tmp(2) allocate(t%b(2)) t%a = [1:2]+2*(this_image()-1) t%b = [1:2]+2*(this_image()-1) sync all if (this_image().eq.1) then do k=1,num_images() print *, 'img: ', k tmp = t[k]%a print *, ' a: ', tmp end do do k=1,num_images() print *, 'img: ', k tmp = t[k]%b print *, ' b: ', tmp end do end if end program test
The first loop executes without any problems, but problem terminates with 'segmentation fault' on line 27 ('tmp = t[k]%b') when the number of images is greater than 1.I copied the arrays 't[k]%a' and 't[k]%b' to 'tmp' before printing because of the known issues with writing anarray slice (or entire array) of a coarray referencing another image.I'm new to coarrays, but I believe the above example compiled with Update 6 should work.
Thanks,Sebastian Liska

4 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Thanks - we'll take a look at this.

Steve - Intel Developer Support

We have another open issue with a similar look - the issue ID is DPD200173725. I have added your test case to that - thanks.

Steve - Intel Developer Support

This problem is fixed in the current compiler version.

Steve - Intel Developer Support

Leave a Comment

Please sign in to add a comment. Not a member? Join today