Link Copied
There is probably no reason to mix TBB and OpenMP in a code developed from scratch (though, who knows); but there could also be some legacy code that might already use OpenMP while trying to use TBB as well. Or, it could happen in a multimodular program that an OpenMP parallel region call a TBBfied function; or vice versa.
In the example above, the system will be oversubscribed by a factor of 2; i.e. there will be (Number of OpenMP Threads)+(Number of TBB threads) active. Note sum there, not multiplication, because there is only one pool of TBB threads, no matter how many external threads use TBB.
The mutual awareness and some sort of handshaking between TBB and Intel's implementation of OpenMP is being elaborated; but no particular promise can be done at the moment.
For more complete information about compiler optimizations, see our Optimization Notice.