OpenMp Coding: warning: ignoring #pragma omp parallel
34,493
IIRC you have to pass -fopenmp
to the g++ call to actually enable OpenMP. This will also link against the OpenMP runtime system.
![Admin](/assets/logo_square_200-5d0d61d6853298bd2a4fe063103715b4daf2819fc21225efa21dfb93e61952ea.png)
Author by
Admin
Updated on July 19, 2020Comments
-
Admin almost 4 years
I am getting this warning during compilation of a C code with OpenMP directives on Linux:
warning: ignoring #pragma omp parallel
Gcc version is 4.4.
Is it only a warning I should not care about? Will the execution be in parallel?. I would like a solution with a some explanation.
I have provide
-fopenmp
with themake
command, but gcc doesn't accept that, otherwise for single compilation of file, i.e.gcc -fopenmp
works alright.