Intel® oneAPI Threading Building Blocks
Ask questions and share information about adding parallelism to your applications when using this threading library.
2424 Discussions

TBB Warning: Max number of workers has been already set ...

richardl
Beginner
796 Views

Since upgrading to TBB 4.4 some of our test code has generated warning like "TBB Warning: Max number of workers has been already set to 11. The request for 15 workers is ignored."  (The numbers in the warning message can vary.)

It have not been able to to pin down what triggers the warning. But the test code does not explicitly limit the number of threads.

Can anyone suggest what is causing the warning?

 

0 Kudos
2 Replies
Alexei_K_Intel
Employee
796 Views

Hi,

The warning is usually caused by either tbb::task_scheduler_init or tbb::task_arena when an explicit number of threads is requested (16 in your case). It looks like that the first request is 12 threads. If the machine has 12 threads it can be done with automatic initialization (the threads are requested implicitly). Do you use some third-party libraries that can potentially use TBB (e.g. OpenCV, OpenCL or something else)?

Regards, Alex

richardl
Beginner
796 Views

Hi Alex,

Thanks for your reply.  To help me understand the issue, I wrote a simple test as sketched below.  I tried various values for n_thread1 and n_threads2, but did not get the warning. Is this what you would expect?

    tbb::task_scheduler_init scheduler(n_threads1);

    tbb::task_arena arena(n_threads2);
    
arena.execute([&]() {...});

We do use 3rd parties that use TBB. This may well be relevant.  But it would good to understand better what can cause the warning.

Regards, Richard
 


 

 

 

Reply