[J3] Questions about DO CONCURRENT and locality

Daniel C Chen cdchen at ca.ibm.com
Fri Jul 3 15:59:31 EDT 2020


This is a known issue that was first discussed in
https://j3-fortran.org/doc/year/15/15-150.txt
The problem is that the wording in F2008 makes it almost impossible for the
processor to
determine if an entity that appears in a DO CONCURRENT construct is shared
or local.
I said "almost" because there is a way to implement it that requires a lot
of
book keeping and copy-in/copy-out, which pretty much destroy the
performance
this feature is supposed to bring.

This finding is also the reason we added localities for DO CONCURRENT in
F2018 to
allow users to specify the locality by themselves.
However, due to the concerns of backward compatibility, F2018 didn't add
"default"
locality even though it was requested at the time.
As the result, there is still a hole in the standard that makes
determination of a SHARED variable very difficult. It will completely kill
the performance
if a processor has to implement it).

Daniel

XL Fortran Development, Fortran Standard Representative
IBM Toronto Software Lab
Phone: 905-413-3056
Tie: 969-3056
Email: cdchen at ca.ibm.com
http://www.ibm.com/software/awdtools/fortran/xlfortran



From:	Steve Lionel via J3 <j3 at mailman.j3-fortran.org>
To:	fortran standards email list for J3 <j3 at mailman.j3-fortran.org>
Cc:	Steve Lionel <steve at stevelionel.com>
Date:	2020-07-03 03:31 PM
Subject:	[EXTERNAL] [J3] Questions about DO CONCURRENT and locality
Sent by:	"J3" <j3-bounces at mailman.j3-fortran.org>



In
https://urldefense.proofpoint.com/v2/url?u=https-3A__j3-2Dfortran.org_doc_year_19_19-2D134.txt&d=DwIC-g&c=jf_iaSHvJObTbx-siA1ZOg&r=57cafTO2T1scnwZfrlLPsghkmjFH2AuUtlcWE5nRktg&m=HM06mhPiozeCeDvDw5fnD9e4oqxH5V26JG8xf8iCRA8&s=j_PMvEK7bFUr5OS2WKEXR0DM92vTW7RXI_Rc4y15c0Y&e=
  Peter Klausler asked
whether the words in the standard actually enabled parallelization of DO
CONCURRENT. I see that the paper was not taken up at 218 but I wasn't
aware of any discussion of the topic then or at later meetings. It came
up again today in discussions at the (online) FortranCon hosted by the
University of Zurich (which has been great so far - almost over.)

As I don't pretend to be a parallelization expert, I'd be interested in
hearing others' thoughts on the issues Peter raised. Thanks.

Steve



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.j3-fortran.org/pipermail/j3/attachments/20200703/b5677825/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: graycol.gif
Type: image/gif
Size: 105 bytes
Desc: not available
URL: <https://mailman.j3-fortran.org/pipermail/j3/attachments/20200703/b5677825/attachment.gif>


More information about the J3 mailing list