(j3.2006) Assignment, coarrays, and coindexed objects
Van Snyder
van.snyder
Thu May 14 19:49:41 EDT 2015
Bill Long wrote:
>
> On May 14, 2015, at 5:35 PM, Van Snyder <van.snyder at jpl.nasa.gov> wrote:
>
>
>> Bill Long wrote:
>>
>>> On May 14, 2015, at 4:16 PM, Van Snyder <van.snyder at jpl.nasa.gov> wrote:
>>>
>>>
>>>
>>>> In 7.2.1.2p1(1,3,8) a variable is not permitted to be allocatable if it
>>>> is a coarray.
>>>>
>>>>
>>> Not so. Allocatable coarrays are common. The point of that text is to exclude allocatable coarrays from the automatic reallocation on assignment feature. Without that exclusion, whole array assignments to a coarray could turn into global syncs, which would be a disaster.
>>>
>>>
>> Sure, allocatable coarrays are common, but I was referring to those
>> specific cases in 7.2.1.2p1 where they are prohibited for exactly the
>> reason you cite. But what about assignments that reallocate allocatable
>> subobjects of coarrays or coindexed objects?
>>
>
> A coindexed object is not allocatable. That?s a constraint for the ALLOCATE statement. And the topic of 7.2.1.2p2.
>
I think I finally got it. Why did we put "coindexed object" in
7.2.1.2p1(3) instead of putting the requirement in 7.2.1.2p2?
> I don?t see a functional problem with reallocating a non-coarray allocatable component of a structure that is a coarray. That allocation is entirely local and not affected by the allocation status of the corresponding components on other images. So, no global allocation sync. Indeed, one of the main points of allocatable components of coarrays is to allow different sizes for the components on each image, and for the components to be allocated on some images and not others.
>
> Since the reallocation of the component would involve the component being defined as part of the assignment, the segment rules will require some synchronization with another image before that image tries to reference the component.
>
> Cheers,
> Bill
>
>
>
>> Wouldn't those be global
>> syncs too? Or would only the one in 7.2.1.2p1(3) result in a global
>> sync? I don't understand why the other two don't exclude allocatable
>> subobjects of coarrays or coindexed objects.
>>
>>
>>> Cheers,
>>> Bill
>>>
>>>
>>>
>>>
>>>> In In 7.2.1.2p1(3) it's also prohibited to be a coindexed
>>>> object. I presume the latter is to cover the case of an allocatable
>>>> subobject of a coarray. Why do we care about allocatable subobjects of
>>>> coarrays in 7.2.1.2p1(3), but not in 7.2.1.2p1(1,8)?
>>>> _______________________________________________
>>>> J3 mailing list
>>>> J3 at mailman.j3-fortran.org
>>>> http://mailman.j3-fortran.org/mailman/listinfo/j3
>>>>
>>>>
>>> Bill Long longb at cray.com
>>> Fortran Technical Support & voice: 651-605-9024
>>> Bioinformatics Software Development fax: 651-605-9142
>>> Cray Inc./ Cray Plaza, Suite 210/ 380 Jackson St./ St. Paul, MN 55101
>>>
>>>
>>> _______________________________________________
>>> J3 mailing list
>>> J3 at mailman.j3-fortran.org
>>> http://mailman.j3-fortran.org/mailman/listinfo/j3
>>>
>>>
>> _______________________________________________
>> J3 mailing list
>> J3 at mailman.j3-fortran.org
>> http://mailman.j3-fortran.org/mailman/listinfo/j3
>>
>
> Bill Long longb at cray.com
> Fortran Technical Support & voice: 651-605-9024
> Bioinformatics Software Development fax: 651-605-9142
> Cray Inc./ Cray Plaza, Suite 210/ 380 Jackson St./ St. Paul, MN 55101
>
>
> _______________________________________________
> J3 mailing list
> J3 at mailman.j3-fortran.org
> http://mailman.j3-fortran.org/mailman/listinfo/j3
>
More information about the J3
mailing list