Analyzers
Community support for Analyzers (Intel VTune™ Profiler, Intel Advisor, Intel Inspector)
4887 Discussions

What does the Inspector Caution mean?

missing__zlw
Beginner
376 Views

I saw this in the TBB tutorial:

The instrumentation support for Intel Parallel Inspector becomes live after the first

initialization of the task library (3.1). If the library components are used before this

initialization occurs, Intel Parallel Inspector may falsely report race conditions that

are not really races.

I don't understand it. Does it mean when I run my program (using tbb) multiple times in the inspector, false reace conditions will be reported?

0 Kudos
3 Replies
Rob5
New Contributor II
376 Views

I interpret the caution as, make sure the TBB task scheduler is initialized before using the library components in your source. If TBB is not implemented properly, then unexpected results may occur when your application is executed. Section 3.1 of the Intel Threading Building Blocks tutorial provides additional information about how the task scheduler is or can be initialized. So, make sure the TBB implantation is working from that perspective before running analysis.

For reference, this question also appears to be posted on the TBB forum.

- Rob

0 Kudos
Mark_D_Intel
Employee
376 Views
Inspector will not find races across processes (or across multiple runs of a single program).

What this means is that some parts of TBB can be used without initializing the task scheduler library. For instance, a program could use the concurrent_hash_map without initializing the task scheduler library.

However, in order for Inspector to understand all of the TBB synchronizations, it needs some special synchronization API's turned on. What this caution means is that these aren't turned on until the task scheduler library is initialized.

Consequently, there may be cases where one needs to add an explicit task scheduler initialization to a program in order for it to be properly analyzed by Inspector.
0 Kudos
Peter_W_Intel
Employee
376 Views
I recommend toadd a MACRO TBB_USE_THREADING_TOOLS when compiling code which calls TBB libraries.
0 Kudos
Reply