OpenMP: implementation of threadprivate directive

OpenMP: implementation of threadprivate directive

piggylong_lwl的头像

Hi, guys,

I tried ICC8.0 and IFC8.0 compiler under Linux to compile C and Fortran code with openmp directive, and found that for each threadprivate variable, there is an explicit barrier operation for its initiation. I just wonder why each threadprivate variable requires one barrier, is one barrier for all threadprivate variables enough. I think the threadprivate directive is not effecient as we expect, can you further optimize it?

1 条帖子 / 0 new
如需更全面地了解编译器优化,请参阅优化注意事项.