Does HPC SDK support pure OpenMP?

Hello everyone, I knew that NVIDIA HPC SDK shipped with the support of MPI, so I am wondering does it shipped to support pure OpenMP too.
Through my search I found two commands used to run OpenMP code on tesla and multi-core

pgcc -omp -ta=tesla -Minfo=accel -fast test.c
pgcc -Minfo -ta=multicore

but can I run pure OpenMP on multi-core with using acc accelerator and use only OpenMP
when I tried the commands above they gave me huge difference than running it using GCC compile with OpenMP flag, so does HPC SDK support pure OpenMP on multi-core CPU?

Thank you in advance.

Hi hisham.M,

Yes, the NV HPC Compilers support OpenMP. The 20.11 release also includes Beta support for OpenMP Target directive targeting NVIDIA GPUs.

To enable OpenMP, please use the flag “-mp”, with “-mp=gpu” used to target the GPU.

Full documentation on our OpenMP support can be found at: https://docs.nvidia.com/hpc-sdk/compilers/hpc-compilers-user-guide/index.html#openmp-use

Hope this helps,
Mat

Thank you, I already downloaded the 2.11 version but I am not trying to target NVIDIA GPU, can I compile pure OpenMP using HPC SDK 2.11 to compile OpenMP normally on CPU for example if I only used

#pragma omp parallel for

Thank you

Yes, of course. We’ve supported OpenMP on the host for about 20 years. Again, just use the “-mp” flag to enable it.

can you please give me the whole command that I use with c/c++ code.

With the NV HPC Compiler Drivers:

C: nvc -mp -fast -Minfo=mp file.c
C++:: nvc++ -mp -fast -Minfo=mp file.cpp

With the old PGI Compiler drivers:

C: pgcc -mp -fast -Minfo=mp file.c
C++: pgc++ -mp -fast -Minfo=mp file.cpp