gomp - cost of threadprivate data access

Matevz Tadel matevz.tadel@cern.ch
Sun Mar 15 20:15:00 GMT 2009


Hello,

We have parallelized a relatively large f77 project (GEANT3, ~200k loc) using 
OpenMP.

Now we are running comparisons between standard and parallel version and it 
turns out that just making the commons threadprivate results in 20% percent 
speed penalty. This extra time is spent in __tls_get_addr() function which seems 
to be called for every access of a threadprivate variable.

Would it be in principle possible to optimize this access?

I figure that the base address of all referenced commons could be obtained once 
per function thus drastically reducing the __tls_get_addr() call count.

We are using gcc-4.3 branch from the beginning of February, with patches to 
allow equivalence statements among threadprivate data.

Callgrind output of a sample run is available at:

-O2     <https://mtadel.web.cern.ch/mtadel/callgrind.out.13032>
-O2 -g  <https://mtadel.web.cern.ch/mtadel/callgrind.out.13055>

Best,
Matevz



More information about the Fortran mailing list