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?
OpenMP: implementation of threadprivate directive
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?