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?
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)?
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?
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.