icpc: -openmp not supported

icpc: -openmp not supported


I am trying to compile simple code using openmp.

Here is the code (file test.cpp):

int main()
    double a[100];
    #pragma omp parallel for
    for (int i = 0; i < 100; ++i) {
        a[i] = i;
    return 0;

I compile using the following command:

icpc -openmp test.cpp

the result is:

icpc: command line error: option '-openmp' not supported

Can you help me please?

Thread Topic: 

Help Me
3 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Several versions back the spelling was changed to -qopenmp.  Did you check icpc -help?

-qopenmp gives the same error. Maybe i should add something to PATH for it to recognise that it can use OpenMP. I installed intel system studio, but it didn't add anything to PATH.

Dear all,

Our old cray system has ifort 13, new one has version 18. The earlier one only knows -openmp, the new one only knows -qopenmp. I need to continue using both, and compiling the same code on both. How can I write a makefile for that?


Leave a Comment

Please sign in to add a comment. Not a member? Join today