[patch,gomp4] make fortran loop variables implicitly private in openacc

Thomas Schwinge thomas@codesourcery.com
Thu Aug 14 11:15:00 GMT 2014


Hi!

On Wed, 13 Aug 2014 22:41:47 +0200, Tobias Burnus <burnus@net-b.de> wrote:
> Cesar Philippidis wrote:
> > According to section 2.6.1 in the openacc spec, fortran loop variables
> > should be implicitly private like in openmp. This patch does just so.
> 
> Makes sense. Looking at the patch, I wonder whether the context is 
> properly handled when mixing OpenMP and OpenACC. I have the feeling that 
> one then might end up using the OpenACC context when one should use the 
> OpenMP context. However, I have not fully followed the program flow. For 
> instance, would something like
> 
> !$oacc parallel
> !$omp simd private(i) reduction(+:c)
> do i = 1, n
> ...
> end do
> 
> be properly handled?

While that isn't something we're currently focussing on supporting, my
intuition tells me that there shouldn't be a separate oacc_current_ctx,
and omp_current_ctx should be used instead for OpenACC contexts, too.
(If you guys agree, don't let fixing that hold up the patch as posted.)


Grüße,
 Thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 472 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20140814/d4670ea3/attachment.sig>


More information about the Fortran mailing list