Intel® Moderncode for Parallel Architectures
Support for developing parallel programming applications on Intel® Architecture.
1696 Discussions

Thread Checker with non-Pthread and non-OpenMP mutexes

ronmak
Beginner
462 Views
Is it possible to configure Thread Checker to recognize mutex calls that are not Pthread and not OpenMP? I'm trying to debug a massively parallel application that uses low-level mutexes. The app also goes in and out of kernel mode. When I instrument it with TC, I get a lot of false positives because it doesn't recognize our mutex lock and unlock calls.
0 Kudos
4 Replies
Dmitry_Vyukov
Valued Contributor I
462 Views

Hi ronmak,

You may check Intel Threading Blocks sources:

http://www.threadingbuildingblocks.org/file.php?fid=78

Their synchronization primitives contain lines like "ITT_NOTIFY(sync_acquired, &m);".

I do not actually know as to whether it works with Thread Checker or not, but I suspect that it must.

0 Kudos
Mark_D_Intel
Employee
462 Views
Yes, it is possible to add API calls the code to inform Thread Checker about custom mutexes. Look at the help under "API Support"-> "User-Level Synchronization API".
0 Kudos
ronmak
Beginner
462 Views

Thanks, Mark!

That's very helpful. I didn't know about that API because I'm on a Linux system and the online help appears to be only available on Windows systems.

We have a complex system with a variety of locks, so I'll have to see if I can successfully use the API calls to reduce the number of false positives reported by TC.

0 Kudos
ronmak
Beginner
462 Views

Thanks, Dmitriy.

It turns out that the user-level synchronization API is probably what I'm looking for. Its write-up is hidden in the Windows documentation; I'm developing a Linux system.

0 Kudos
Reply