From: Jorge D'Elia <jdelia@intec.unl.edu.ar>
To: Thomas Koenig <tkoenig@netcologne.de>
Cc: Gfortran List <fortran@gcc.gnu.org>
Subject: Re: A question about coarrays and -Warray-temporaries
Date: Mon, 1 Feb 2021 07:43:03 -0300 (ART) [thread overview]
Message-ID: <137874305.574.1612176183217.JavaMail.zimbra@intec.unl.edu.ar> (raw)
In-Reply-To: <9d298701-38a5-c2c5-1daf-7a2dad754369@netcologne.de>
Hi Thomas,
----- Mensaje original -----
> De: "Thomas Koenig" <tkoenig@netcologne.de>
> Para: "jdelia" <jdelia@cimec.unl.edu.ar>, "Gfortran List" <fortran@gcc.gnu.org>
> CC: "Jorge D'Elia" <jdelia@intec.unl.edu.ar>
> Enviados: Lunes, 1 de Febrero 2021 4:42:19
> Asunto: Re: A question about coarrays and -Warray-temporaries
>
> Hi Jorge,
>
>> I have a question with -Warray-temporaries in the test below.
>>
>> With the AA coarray that warning appears in the first loop (on its local part),
>> but not with the BB array with the same task, i.e.
>>
>>
>> $ gfortran --version
>> GNU Fortran (GCC) 11.0.0 20210125 (experimental)
>> Copyright (C) 2021 Free Software Foundation, Inc.
>>
>> $ gfortran -march=native -mtune=native -Ofast -fcheck=all -fcoarray=single
>> -std=f2018 -Wall -Wextra -Warray-temporaries -o test.exe test.f90
>> test.f90:37:19:
>>
>> 37 | AA (k1:nn,j) = AA (k1:nn,j) - UU (k1:nn) * AA (k,j)
>> | 1
>> Warning: Creating array temporary at (1) [-Warray-temporaries]
>>
>>
>> Why this difference in behavior? Is it ok?
>
> It seems that dependency checking does not detect that no overlap
> can exist in that case, and so generates a temporary. Probably,
> dependency checking was not updated when coarrays were introduced.
Ok.
> This is a missed optimization, not a correctness issue.
Yes, you're right. Nevertheless it would be very interesting in
the (near?) future to have that optimization for coarrays.
> Best regards
>
> Thomas
Thanks for your reply.
Regards.
Jorge.
--
next prev parent reply other threads:[~2021-02-01 10:40 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-31 15:51 Jorge D'Elia
2021-02-01 7:42 ` Thomas Koenig
2021-02-01 10:43 ` Jorge D'Elia [this message]
2021-02-01 11:52 ` Tobias Burnus
2021-02-02 11:46 ` [Patch] Fortran: Fix Array dependency with local coarrays [PR98913] (was: Re: A question about coarrays and -Warray-temporaries) Tobias Burnus
2021-02-02 14:32 ` Jorge D'Elia
2021-02-02 14:54 ` Thomas Koenig
2021-02-02 17:15 ` Tobias Burnus
2021-02-09 11:52 ` [Patch] Fortran: Fix coarray handling for gfc_dep_resolver [PR99010] (was: Re: [Patch] Fortran: Fix Array dependency with local coarrays [PR98913] Tobias Burnus
2021-02-13 19:57 ` Tobias Burnus
2021-02-19 9:33 ` *PING**2 " Tobias Burnus
2021-02-19 16:25 ` Jerry DeLisle
2021-03-21 16:18 ` A doubt about lbound and ubound of an array inside a coarray Jorge D'Elia
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=137874305.574.1612176183217.JavaMail.zimbra@intec.unl.edu.ar \
--to=jdelia@intec.unl.edu.ar \
--cc=fortran@gcc.gnu.org \
--cc=jdelia@cimec.unl.edu.ar \
--cc=tkoenig@netcologne.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).