task_scheduler_init does not obey number_of_threads parameter in debug mode
I've been having a weird issue for a while with TBB. Even with the latest Windows x64 binaries (tbb40_297oss), in debug mode when I create my task_scheduler_init object by setting the number_of_threads parameter to 1, my program still runs in many threads with parallel_for. In release mode, it seems to spawn one thread, cause my Core i7 CPU is loaded on 1/8. In debug it's fully loaded and jumps across threads when debugging. And I want to debug with a single thread. Any ideas?
I've just tested with the latest tbb40_20120408oss (aligned with TBB 4.0 update 4). All works correct, I don't see the issue. If Intel TBB is built in Debug mode when I initialize task_scheduler_init to 1 thread it creates only 1 thread. I've check number of threads with Intel VTune Amplifier XE.
Hi, I am now facing a similar problem. The number of threads I designate in task_scheduler_init does not conform what Intel Vtune Amplifier XE shows.
Here is the difference:
task_scheduler_init threads count in Intel Vtune Amplifier
And I have another question. Somebody say that set __TBB_ARENA_PER_MASTER to 0 would help. But I can not find this var. I searched the file in /usr/include/tbb/tbb_config.h My tbb is installed from Synaptic and is 3.0+r147.
Hoping to get messages. Thanks!