Intel® Threading Building Blocks


Hello. I have been starded work with Intel TBB. Is it possible to set affinity in Intel TBB? I want to run one thread on one core. I write sample test code, but it's dont work correcly.

ask for helps on improving the TBB parallel efficiency regarding hyper-threading etc.

Hello! I have some confusing parallel timing results for my code, which performs
heavy numerical work.

For using 1 core, my timing is 882 seconds;
For using 8 cores, my timing is 121 seconds (7.3x faster);
for using 16 cores; my timing is 101 seconds (8.7x faster);
for using 32 logical cores; timing is 100 seconds, as same with using 16 cores.

My questions focus on two points:

Linearizability tester

We have recently evaluated tbb::concurrent_unordered_set with a new tool that finds linearizability violations, a certain class of concurrency-related bugs [1]. I just wanted to share that link in case there is interest in using the tool for other data structures in TBB. Of course, any form of feedback, questions, feature requests etc. are always warmly invited.

All best regards,



Performance comparison between Intel TBB task_list, openMP task and parallel for

I am planning on parallelizing a hotspot in a project. And I would like to know your opinion between the performance evaluation between parallel for, omp single followed by task and intel TBB task_list, under ideal conditions where number of threads are equal to computation items and when computation are much greater than available threads to see scheduling overhead(in order to evaluate the most efficient scheduler). I will also, be writing some sample test programs to evaluate myself but I also wanted to know if anybody had previously made these evaluations.

Thanks in advance.

Can multiple TBB DLL versions be installed side by side ?

Can multiple  TBB DLL versions be installed side by side ? 

For example, can we have <intel>_tbb_4.2 and <intel>_tbb_4.3 installed side by side on the same machine ?

What would be the impact on performance ?

Would both applications using separate code paths function without crashing or deadlocking ?



catastrophic error: cannot open source file "tbb/parallel_for.h"


I am relatively new to ICC, TBB and just started learning. Currently I am trying to compile a test code given for tbb in GettingStarted folder in side /opt/int/composer_xe_2015.1.133/tbb/examples. but unfortunately the compilation fails with the following error.

catastrophic error: cannot open source file "tbb/parallel_for.h"

I set all the paths by executing the shell script. With export command I can see paths have been set properly (CPATH. LD_LIBRARY_PATH). Please kindly provide a suggestion to solve this issue. This is taking soo much of time.

Exceptions inside enumerable_thread_specific::local()

enumerable_thread_specific::local() lazily copy constructs thread local storage. What should happen if we try to allocate too much memory in the copy constructor of the thread local object? In this case, a std::bad_alloc is thrown. This causes the members which were constructed during member initialization to be destructed as the stack is unwound.

How to run task in the main thread while the execution of parallel_while?


In the main thread, we start to run parallel tasks with tbb::parallel_while. Now we have a requirement to create one separate new task and run it in the main thread during the execution of parallel_while. 

Firstly, I think we have to exclude the main thread from the worker threads of parallel_while.

Secondly, we have to create the new task and run it in the main thread.

Is this possible? How to accomplish both of these?



订阅 Intel® Threading Building Blocks