[OMP] Threadprivate common dramatically decrease performance

jimdempseyatthecove
Total Points:
36,457
Status Points:
36,457
Black Belt
July 6, 2009 9:08 AM PDT
Rate
 
#1

When you compile with OpenMP enabled .AND. specify one thread, the code generated will still use the threadprivate access methods for dereferencing threadprivate variables (a few extra instructions per dereference).

Therefore any slowdown due to threadprivate will be visible in the one thread OpenMP produced application using threadprivates. When you observe a slowdown when going from one thread (in mt generated program) to multiple threads then suspect adverse memory interactions (cache evictions). Or, perhaps, making a parallel version of a short loop that cannot ammortize the thread start/stop overhead in a cost effective manner.

Can you supply a small code example?
--------

Blog: The Parallel Void


www.quickthreadprogramming.com


Intel Software Network Forums Statistics

8487 users have contributed to 31622 threads and 100698 posts to date.
In the past 24 hours, we have 35 new thread(s) 121 new posts(s), and 186 new user(s).

In the past 3 days, the most popular thread for everyone has been gemm(A,A,A) like possible? The most posts were made to gemm(A,A,A) like possible? The post with the most views is Dear Steve, excuse me for a d

Please welcome our newest member chat1983