hbgoddard
hbgoddard

Reputation: 148

How to configure OpenMP for Visual Studio 2017 with Intel Compiler

I'm trying to use the OpenMP "collapse" clause in my project, but the clause was added in OpenMP 3.0 which Visual Studio does not support. So I installed the Intel C++ compiler and changed my project settings to use it, but it still gives the build error 'collapse': unexpected token encountered on OpenMP 'for' directive for the following code:

#pragma omp for collapse(2)
for (int i = 0; i < count; i++) {
    for (int j = 0; j < n; j++) {
        //unimplemented
    }
}

How should I configure my project to actually use the Intel compiler's version of OpenMP?

Upvotes: 1

Views: 994

Answers (1)

radkal2
radkal2

Reputation: 11

u should right click on your project/source file: properties -> language(intel c++ compiler) -> open MP support

Upvotes: 1

Related Questions