Compiler Error C3013
Visual Studio 2015
The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.
The latest version of this topic can be found at Compiler Error C3013.
clause' : clause may only appear once on OpenMP 'directive' directive
A clause appeared twice on the same directive. Delete one occurrence of the clause.
The following sample generates C3013:
// C3013.cpp
// compile with: /openmp
int main() {
int a, b, c, x, y, z;
#pragma omp parallel shared(a,b,c) private(x)
#pragma omp for nowait private(x) nowait // C3013
// The previous line generates C3013, with two nowait clauses
// try the following line instead:
// #pragma omp for nowait private(x)
for (a = 0 ; a < 10 ; ++a) {
}
}
Show: