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 22.214.171.124 Build 20110112)
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,