Intel® C++ Compiler
Support and discussions for creating C++ code that runs on platforms based on Intel® processors.

icpc: -openmp not supported

rewqre_f_
Beginner
430 Views

Hi.

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;
    }
    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?

0 Kudos
3 Replies
TimP
Black Belt
430 Views

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

rewqre_f_
Beginner
430 Views

-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.

Lehtiranta__Jonni
430 Views

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?

 

Reply