Cilkscreen showing races on TBB mutex locks

Cilkscreen showing races on TBB mutex locks

Hello,

When I ran cilkscreen on my program I saw some apparent data races, so I mutex-protected the read/write (with a TBB spin_rw_mutex) to see if this resolved the race report.
But instead I get a race on the TBB mutex, as shown below. Is this correct (i.e. some problem in how I'm using TBB) or is my installation somehow faulty?
Obviously this makes the race-detection hard to use..

This is with update 2 of the XE compiler on windows, and the commercial version of update 5 of TBB 3 (both released just recently).
(icl output: Intel C++ Compiler XE for applications running on IA-32, Version 12.0.2.154 Build 20110112)

Cilkscreen output:
Race condition on location 001FC98C
write access at 05DD5825: (.....\\TBB\\tbb30_u5com\\ComposerXE-2011.1.131\\tbb\\include\\tbb\\machine\\windows_ia32.h:130, modeler-core.dll!_TBB_machine_AND+0x9)
read access at 0604ABEB: (tbb.dll!tbb::spin_rw_mutex_v3::internal_acquire_reader+0x1b)
called by 05DDF9CA: (.....\\TBB\\tbb30_u5com\\ComposerXE-2011.1.131\\tbb\\include\\tbb\\spin_rw_mutex.h:105, modeler-core.dll!tbb::spin_rw_mutex_v3::scoped_lock::acquire+0x3e)
called by 05DDF961: (.....\\TBB\\tbb30_u5com\\ComposerXE-2011.1.131\\tbb\\include\\tbb\\spin_rw_mutex.h:91, modeler-core.dll!tbb::spin_rw_mutex_v3::scoped_lock::scoped_lock+0x35)
[........ lots more calls elided]

thanks very much,
Daniel Faken

4 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

I can reproduce this, Daniel. Something specific to the spin_rw_mutex. Plain TBB mutexes work fine. I'll get this to our runtime folks and see what they can come up with.

Thanks very much, Brandon.

This works now with the 12.1 compiler (available in C++ Composer XE 2011 update 6 and later) and the applicable version of Cilkscreen for 12.1 available from the Cilk Plus SDK website. Note that for TBB locks, you will need to define TBB_USE_THREADING_TOOLS=1 for your build, probably best done using the -D option at compile time. Let me know if there's any problems.

Leave a Comment

Please sign in to add a comment. Not a member? Join today