c++ openmp and threadprivate

≯℡__Kan透↙ 提交于 2019-12-11 04:02:48

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!