Hi Tobias!

On 20.02.2014 03:51, Tobias Burnus wrote:
On 10.02.2014 02:22, Tobias Burnus wrote:

a) Does this part work well when both -fopenmp and -fopenacc is used? I mean: "!$acc loop" followed/preceded by "!$omp do"? I could imagine that there could be clashes, especially when - e.g. - collapse doesn't match.
PGI: Silently ignores OpenMP pragmas.
CAPS: Ignored option '--define' (_OPENMP=).

I like how Cray handles it: It permits both - but neither OpenMP -> OpenACC nesting nor vice versa. (It might not always detectable.)

ERROR:
The !$OMP PARALLEL DO directive cannot be specified within a !$ACC PARALLEL region.

And adding OpenACC to an OpenMP loop fails with:

ERROR:
The !$ACC LOOP directive cannot be specified within a !$OMP PARALLEL DO region.

(One gets the same error independent whether one tries to place the pragma on the same loop or just nested in the parallel pragma or on different loops.)

I think doing likewise would be best.
I agree.


+  if (gfc_implicit_pure (NULL))
+    gfc_current_ns->proc_name->attr.implicit_pure = 0;

I believe that will fail with BLOCK - cf. gfc_implicit_pure()
Fortunally, it doesn't.

Are you sure that it works? A block starts a new namespace, hence, gfc_implicit_pure() does:

After your notice about namespaces, I tested !$acc declare attribute. Viola, it fails. However, other directives work.


Side question: Do we also need to unset implicit_pure for OpenMP?
As you can see in decode_omp_directive function, the flag is already unset.

--
Ilmir.

Reply via email to