[Bug fortran/82471] do concurrent is much slower the ordinary do!
tkoenig at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sun Oct 8 08:35:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82471
Thomas Koenig <tkoenig at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |tkoenig at gcc dot gnu.org
--- Comment #1 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
There is a subtle problem with your test case, it is the
ordering of the variables in the DO concurrent statement.
DO CONCURRENT( K=1:N, J=1:M, I=1:L)
C(I,J,K) = A(I,J,K) + B(I,J,K)
END DO
This is probably not what you meant to write; this
will fail (with the variable bounds you gave above in
ALLOCATE( A(L,M,N), B(L,M,N), C(L,M,N) )
if any of L, M or N has a different value.
If you write
DO CONCURRENT( I=1:L, K=1:N, J=1:M)
things are much faster.
More information about the Gcc-bugs
mailing list