Hi Nathan! On Tue, 28 Jul 2015 08:19:17 -0400, Nathan Sidwell <nat...@codesourcery.com> wrote: > On 07/28/15 06:14, Thomas Schwinge wrote: > > On Sat, 25 Jul 2015 16:02:01 -0400, Nathan Sidwell <nat...@acm.org> wrote: > >> I've committed this to gomp4 branch. It fixes some tests that were > >> incorrect > > > > Hmm, I fail to see what you deem incorrect in the following two Fortran > > test cases? Implicit present_or_copy clauses should be added by the > > compiler, basically equal to your explicit present clauses. > > > >> and fail with some development I am working on. > > > > Fail in what way? I'd expect the original code still to be valid? > > > acc enter data creates a dynamic scope with no associated static scope. As > such > it is therefore not visible by a later acc parallel, even if both are in the > same static scope. If a data object used within the parallel is not > mentioned > in a data clause on the parallel, the default behaviour of the parallel then > occurs. That means we get another copy clause generated (not > copy_or_present), > which fails at runtime because the data is already present on the device.
I do agree that a copy clause is wrong (expected to fail at runtime), but why do you say an implicit copy clause is created? OpenACC 2.0a, 2.5.1 Parallel Construct, says that »[...] An array or variable of aggregate data type referenced in the parallel construct that does not appear in a data clause for the construct or any enclosing data construct will be treated as if it appeared in a present_or_copy clause for the parallel construct [...]«. > This is different to if a data/end data pair were used. Grüße, Thomas
pgppxS1LtL1Zt.pgp
Description: PGP signature