Reputation: 1537
What tools are there for troubleshooting parallel programs?
Say I have a code that performs worse than expected (4 times instead of theoretical 8 times of serial version executing speed). I suspect the cause is either some locking caused by threads accessing shared variables (say adjacent elements of a shared vector), or locking caused by threads accessing heap (which I suppose is also a shared resource). But I don't know what tools are there available to check what might be the cause of excessive thread sleeps, threads switching, etc. E.g. profiler will tell me what function took how much time, and perhaps that there was a lot of activity related to threads management, but not what the cause and state of threads was (or perhaps I don't know how to use one well).
I'm working in C++ on OS X.
Upvotes: 0
Views: 90
Reputation: 78316
The following may be of interest
Vampir -- costs money
DTrace -- is already installed on your Mac, provides the tools you need, but is far from an out-of-the-box solution
Those are just the first three tools which spring to mind, I'm sure some more diligent googling will turn up more.
Your final comment perhaps I don't know how to use one well is well made, these tools generally require a significant commitment to use them, to understand what they are telling you and to make appropriate and performance-enhancing modifications to your programs.
Upvotes: 2