问题
I'm in a situation where on one computer (cluster with high perf nodes) a code compiles but on my personal computer it doesn't.
The error is
'var' declared 'threadprivate' after first use.
#pragma omp threadprivate(var)
The related line in the code is in a header file and looks like this
extern const int var;
#pragma omp threadprivate(var);
I haven't written the code so it is difficult to give a minimal example of the problem.
Here are some specification of the computer I use :
cluster (compiles)
- red hat 7.5
gcc 4.8.3EDIT intel 15.0.0- openmp version date : 2011.07 : don't have permission to access yum/apt/...
personal computer (doesn't compile)
- debian 8.0
- gcc 4.9.2
- openmp version date : 2013.07 : libgomp1 v 4.9.2-10
I know there is not enough information, but does anyone have an idea ?
来源:https://stackoverflow.com/questions/29922764/c-openmp-and-threadprivate