THREADPRIVATE or THREADLOCAL?
Xing_Xue 120000DT1R Visits (3716)
To declare a thread specific common block, XL Fortran provides two parallelization directives, THREADPRIVATE and THREADLOCAL. One may be puzzled as to what is the difference between them and which one of them is better.
THREADLOCAL is not defined in the OpenMP standard. It is a directive that XL Fortran supported before the OpenMP standard was published. The reason that XL Fortran is still supporting it is for applications that have dependency on it. On the other hand, THREADPRIVATE is part of the OpenMP standard. It can better interact with other OpenMP constructs and more importantly, applications using THREADPRIVATE are more portable. Therefore, THREADPRIVATE is definitely more preferable.