Is nvfortran able to compile code with both OPENMP and OPENACC active pragma?

we would like to implement OPENACC directives in an already OPENMP implemented code.
we use nvfortran 22.2 with a100 or v100 equiped nodes.
Our first trials with both “-mp -acc -gpu=cc80” flags produce abortion of compilation process.
So, is it to be understood that there is no possibility to combine openacc and openmp with nvfortan ?
Thank you for your guidance

Hi Laurent,

You should be able to put OpenACC directives within OpenMP. Now you can’t put both directives on the same loop, just an outer OpenMP parallel region with OpenACC applied to an inner loop.

Do you have an example of what you’re trying to do as well as the error you’re getting?


Hi Mat,
Sorry for my late reply, I was out of office for some days.
Our concern was first at the compilation stage.
I will rehearse the compilation procedure with both -mp and -acc flags and observe again what goes wrong.

Hello Mat,
I have fixed the issue with compilation using both -mp -acc flags.
There was indeed a local conflict between OPENMP and OPENACC parallel regions and pragma.
This was due to first compiling the modified sources without the -mp flag.
When separating properly the OPENACC and OPENMP regions, the compilation succeeds.
Thank you for your help and have a good day!

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.