[Bug fortran/83064] DO CONCURRENT inconsistent results

dominiq at lps dot ens.fr gcc-bugzilla@gcc.gnu.org
Fri Nov 24 10:10:00 GMT 2017


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83064

--- Comment #13 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
> > I confirm that using
> >
> >         pik = compute( low(i), high(i) )
> >         pi(i) = sum(pik)
> >
> > gives the right result.
> >
> > Does it means that the 'sum' in 'sum(compute( low(i), high(i) ))'
> > is not part of the parallelization?

> no idea, I can't do the above, pik is not declared.

As said in comment 5,

    real(real64), dimension(nsplit) :: pi

has to be replaced with

    real(real64), dimension(nsplit) :: pi, pik

With my limited understanding of DO CONCURRENT,

    do concurrent (i = 1:nsplit)
        body(i)
    end do

the evaluations of 'body' for different values of 'i' are independent. I think
that implied that all the temporaries generated in body have to be local.


More information about the Gcc-bugs mailing list