Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.

icpc: -openmp not supported

rewqre_f_
Beginner
1,047 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
Honored Contributor III
1,047 Views

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

0 Kudos
rewqre_f_
Beginner
1,047 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.

0 Kudos
Lehtiranta__Jonni
1,047 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?

 

0 Kudos
Reply