Alex Rivera | Logout

OpenMp Coding: warning: ignoring #pragma omp parallel

Asked 2009-04-09T12:03:02.627
25

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.

Edit
Report

1 Answer

42

IIRC you have to pass -fopenmp to the g++ call to actually enable OpenMP. This will also link against the OpenMP runtime system.

answered 2009-04-09T12:19:18.563

Your Answer