From: Rick K. <rk...@nc...> - 2006-02-05 16:52:09
|
Laksono, > Just a simple question: How to detect false sharing in an OpenMP or > multithreading program with Perfsuite ? In case this term is unfamiliar to people on the list, I think what you are referring to is a situation where performance degradation occurs because of multiple threads modifying the same (shared) cache line, such that even though specific data items within the line are modified independently by each thread, the line as a whole is the source of contention between them. (I'm sure there are plenty of architecture texts that say it a lot better than that :) In general, what can help is to look for cache invalidations/interventions and to see if cache misses increase with additional processors used. PAPI defines the events PAPI_CA_INV and PAPI_CA_ITV in addition to the _DCM events to help track these. If they're not defined for a particular processor, then you have to go to the native events (vendor materials). You'll want to turn on threading support with PerfSuite (psrun -p or link with libpshwpc_r) to track these things on a per-thread basis. If you think that's what's going on, then you might profile on the events to try to localize where in the application the problem might be occurring. There are also other tools that are system-dependent that might help the can be found with a little research through a web search (for example, pmshub on the SGI Altix). Hope this helps, Rick |