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 the make
command, but gcc doesn't accept that, otherwise for single compilation of file, i.e. gcc -fopenmp
works alright.
IIRC you have to pass -fopenmp
to the g++ call to actually enable OpenMP. This will also link against the OpenMP runtime system.