> On Nov 28, 2017, at 5:06 PM, Clune, Thomas L. (GSFC-6101) <[log in to unmask]> wrote:
>
>
>> On Nov 28, 2017, at 6:01 PM, Bill Long <[log in to unmask]> wrote:
>>
>>> On Nov 28, 2017, at 4:17 PM, Vipul Parekh <[log in to unmask]> wrote:
>>>
>>> Bill,
>>>
>>> Thanks very much for your response.
>>>
>>> Is it fair to correct to think the number of images is going to be 1
>>> or greater in a coarray program and the following code variant with
>>> explicit reference to image 1 is standard-conforming and the program
>>> built using a conforming processor should execute?
>>
>> Yes. There is always an image number 1. If the total number of images is 1, then the one numbered 1 is the only image. Running with the total number of images less than one makes no sense, since nothing executes.
>
>
> Though the mathematician in me wants to declare that any zero-images program produces correct results on all of its images.
Easy argument to make. But in the statement "The image index that identifies an image is an integer value in the range one to the number of images in a team.”, the phrase “in the range one to…” sort of implies that the smallest number of images is 1.
Cheers,
Bill
>
> - Tom
>
>
>>
>> Cheers,
>> Bill
>>
>>>
>>> --- begin snippet ---
>>> use, intrinsic :: iso_fortran_env, only : atomic_int_kind
>>>
>>> type :: t
>>> integer(kind=atomic_int_kind) :: i
>>> end type
>>>
>>> integer(kind=atomic_int_kind) :: vali
>>> type(t), save :: foo[*]
>>>
>>> call atomic_define( atom=foo[1]%i, value=42 )
>>>
>>> sync memory
>>>
>>> call atomic_ref( value=vali, atom=foo[1]%i )
>>>
>>> end
>>> --- end snippet ---
>>>
>>> Because this too compiles ok but encounters a run-time exception.
>>>
>>> Thanks and regards,
>>> Vipul Parekh
>>
>> Bill Long [log in to unmask]
>> Principal Engineer, Fortran Technical Support & voice: 651-605-9024
>> Bioinformatics Software Development fax: 651-605-9143
>> Cray Inc./ 2131 Lindau Lane/ Suite 1000/ Bloomington, MN 55425
>
Bill Long [log in to unmask]
Principal Engineer, Fortran Technical Support & voice: 651-605-9024
Bioinformatics Software Development fax: 651-605-9143
Cray Inc./ 2131 Lindau Lane/ Suite 1000/ Bloomington, MN 55425
|