What does the Inspector Caution mean?

What does the Inspector Caution mean?

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?

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

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

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.

I recommend toadd a MACRO TBB_USE_THREADING_TOOLS when compiling code which calls TBB libraries.

Leave a Comment

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