Say at one time reserve_cores_ = 4 and omp_thread_max_ = 8 Thread 1: checks `reserve_cores_ >= omp_thread_max` is false so goto the else branch; at this time, thread2 is executing in the core and reserve_cores = 12 and therefore will update the omp_thread_max to 1. And when it comes to Thread 1 to run, it will execute `omp_thread_max_ -= reserve_cores_`. Now `omp_thread_max_` will be negative.
[ Full content available at: https://github.com/apache/incubator-mxnet/pull/12380 ] This message was relayed via gitbox.apache.org for [email protected]
