[J3] [EXTERNAL] Questions about DO CONCURRENT and locality

Damian Rouson damian at sourceryinstitute.org
Tue Jul 7 17:41:01 EDT 2020


Thanks, Bill.  That’s exactly the advice I was seeking.

Damian

On Tue, Jul 7, 2020 at 14:29 Bill Long via J3 <j3 at mailman.j3-fortran.org>
wrote:

> I see DEFAULT(NONE) for DO CONCURRENT in the same was I see IMPLICIT
> NONE.  It is a good documentation idea, as well as a handy way to catch
> typos in variable names.  Additionally, for DO CONCURRENT, having to
> specify SHARED, LOCAL, or LOCAL_INIT for each variable can help the
> compiler generate optimal code for the loop.
>
> Cheers,
> Bill
>
>
>
> > On Jul 7, 2020, at 4:16 PM, Damian Rouson via J3 <
> j3 at mailman.j3-fortran.org> wrote:
> >
> > Steve suggested adding a note to the standard earlier in the
> discussion.  Given the amount of discussion this has generated, it would be
> great if a note could be added.  I'm trying to distill from this discussion
> what useful advice to incorporate into upcoming Fortran 2018 courses.  Is
> it correct to take away from this discussion that DEFAULT(NONE) is a good
> practice to ensure that the programmer thinks through locality and
> explicitly specifies it?
> >
> > Damian
> >
> > On Tue, Jul 7, 2020 at 9:29 AM Steve Lionel via J3 <
> j3 at mailman.j3-fortran.org> wrote:
> > On 7/6/2020 10:47 PM, Malcolm Cohen via J3 wrote:
> > > Someone who prefers the OpenMP “pedal-to-the-metal and no brakes”
> > > approach can just add DEFAULT(SHARED) to the DO CONCURRENT statement;
> > > yes, that does require writing something marginally different, but it
> > > is hardly a huge imposition.
> >
> > Nit - there is no DEFAULT(SHARED), and I think it's good that there
> > isn't as I'd rather that all localities be explicitly specified.
> >
> > Steve
> >
>
> Bill Long
>      longb at cray.com
> Principal Engineer, Fortran Technical Support &   voice:  651-605-9024
> Bioinformatics Software Development                      fax:  651-605-9143
> Cray, a Hewlett Packard Enterprise company/ 2131 Linda
> <https://www.google.com/maps/search/Cray,+a+Hewlett+Packard+Enterprise+company%2F+2131+Linda?entry=gmail&source=g>u
> Lane/  Suite 1000/  Bloomington, MN  55425
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.j3-fortran.org/pipermail/j3/attachments/20200707/74433389/attachment-0001.htm>


More information about the J3 mailing list