(j3.2006) (j3-members.2015) Question about DO CONCURRENT
Malcolm Cohen
malcolm
Thu Feb 5 19:08:23 EST 2015
Hi Daniel,
You sent this to the ?members-only? list, presumably that was unintentional.
No, this example is not valid as it violates the very first requirement of DO CONCURRENT:
?A variable that is referenced in an iteration shall either be previously defined during that iteration, or shall not be defined or become undefined during any other iteration.?
Obviously, iterations 1-3 do not define B at all, but reference it, whilst iterations 4+ define B, breaking the quoted rule.
Cheers,
From: Daniel C Chen
Date: ?? 27?2?6? 6:45
To: j3-members at mailman.j3-fortran.org
Subject: (j3-members.2015) Question about DO CONCURRENT
Hello,
Is the following code standard conforming?
Subroutine sub(n)
Integer n
Integer :: a, b, arr(10, 10)
a = n
b = 4
...
Do Concurrent (integer :: i = 1:10, j = 1:10)
If (a > 3) then
b = 5
End if
arr(i,j) = b
End Do
End
It seems OK from all the restrictions that the standard has.
If it is legal, the compiler will be forced to do copies as the value of b can be from the intrinsic assignment outside of the DO CONCURRENT.
Is it the intention of the standard?
Thanks,
Daniel
XL Fortran Development - 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
________________________________________________________________________
This e-mail has been scanned for all viruses by Star.
________________________________________________________________________
--------------------------------------------------------------------------------
_______________________________________________
j3-members mailing list
j3-members at mailman.j3-fortran.org
http://mailman.j3-fortran.org/mailman/listinfo/j3-members
--
................................Malcolm Cohen, Nihon NAG, Tokyo.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.j3-fortran.org/pipermail/j3/attachments/20150206/2a6803d0/attachment.html
More information about the J3
mailing list