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.

Share:
34,493
Admin
Author by

Admin

Updated on July 19, 2020

Comments

  • Admin
    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 the make command, but gcc doesn't accept that, otherwise for single compilation of file, i.e. gcc -fopenmp works alright.