Intel® oneAPI Threading Building Blocks
Ask questions and share information about adding parallelism to your applications when using this threading library.

TBB + valgrind

francisco_maurmair
869 Views
Hi,
Does anyone have experience in using Threading Building Blocks with valgrind?
Is it possible at all?

Tried it on Linux with gcc 4.1.2 and valgrind-3.2.3 under kernel version 2.6.20-gentoo-r8.
Valgrind can't cope with TBB calls, fails and abort program.
Is there a way to come round that? Maybe an unstable, adapted version?

Thanks for information.
Francisco
0 Kudos
2 Replies
robert-reed
Valued Contributor II
869 Views
I have heard there is at least one report of a deficiency in valgrind that has tripped up analysis of code using TBB. It couldn't parse an opcode, which on examination proved to be a locked compare-exchange byte instruction with a REX (x86_64) prefix, certainly a reasonable instruction to include in a library that does thread synchronization. I don't know what effort is being done to fix this insome future release of valgrind, but it looks like a problem has been identified and may be related to the difficulty you encountered.
0 Kudos
martin_watt
Beginner
869 Views
Yes, we've hit this problem too. There is a bug logged with valgrind on the general issue, with a reference specifically to the TBB problem, here:

http://bugs.kde.org/show_bug.cgi?id=147498

If you add your comment to the bug as well, or vote for it, it should get a higher priority for a fix.
0 Kudos
Reply