[J3] Questions about DO CONCURRENT and locality

Daniel C Chen cdchen at ca.ibm.com
Fri Jul 3 21:54:54 EDT 2020

I think the question of "CAN all DO CONCURRENT loops be parallelized"
should be a
question for the vendors, not the standard committee as it is an
implementation detail.
The standard does (should) not specify how a feature is implemented.
The processor can choose to implement it in parallel whenever it is
possible or
sequentially as long as the result is the same (as Bob said).

DEFAULT(NONE) will force users to specify
the locality of all variables that appear in a DO CONCURRENT construct. The
processor should be able to parallelize the loops accordingly. That being
it would be users responsibility to specify the correct locality. For
not marking a variable that is defined in two different iterations SHARED.


XL Fortran Development, Fortran Standard Representative
IBM Toronto Software Lab
Phone: 905-413-3056
Tie: 969-3056
Email: cdchen at ca.ibm.com

From:	"Ondřej Čertík via J3" <j3 at mailman.j3-fortran.org>
To:	"J3 Mailinglist" <j3 at mailman.j3-fortran.org>
Cc:	"Ondřej Čertík" <ondrej at certik.us>
Date:	2020-07-03 09:03 PM
Subject:	[EXTERNAL] Re: [J3] Questions about DO CONCURRENT and locality
Sent by:	"J3" <j3-bounces at mailman.j3-fortran.org>


On Fri, Jul 3, 2020, at 6:23 PM, Robert Corbett via J3 wrote:
> I am not sure of the question here.
> If the question is "can all DO
> CONCURRENT loops be
> parallelized?", the answer is
> clearly "no". The Fortran 2008
> and 2018 standards specify that
> the iterations of a DO
> CONCURRENT loop can be
> executed in any order. They do
> not specify that the
> executions of the iterations of
> a DO CONCURRENT loop can
> be intermingled. Each iteration
> is executed to completion
> before the next iteration begins.

Thanks a lot for this excellent clarification.

Not being a native speaker, my understanding of the word concurrent is
either "occurring at the same time" or "parallel", as I just looked up


But according to the current interpretation of the standard, "do
concurrent" doesn't specify concurrent execution. Is my understanding

I would be in favor to change the standard to ensure "do concurrent"
specifies concurrent execution. As expected by a lot of people as well as
the meaning of the word.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.j3-fortran.org/pipermail/j3/attachments/20200703/ab646351/attachment-0001.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/ab646351/attachment-0001.gif>

More information about the J3 mailing list