Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.

Understanding OMP_NUM_THREADS

AndrewC
New Contributor III
239 Views
I am running our application on a dual-core intel EM64T and am trying to understand why I am not seeing any benefits from multi-threading of MKL.

I set OMP_NUM_THREADS to 1, and run my benchmark.

CPU usage pegged at 50% for my process in Task Manager
Process Time: 30s
Wall Clock Time: 30s

I set OMP_NUM_THREADS to 2, and run my benchmark

CPU usage pegged at 90-99% for my process in Task Manager, both CPU's apparently maxed-out.
But...
Process Time: 58s
Wall Clock Time: 30s
So how is this posssible? I would have expected that in the OMP_NUM_THREADS=2 case, that process time would go up somewhat , but that wall clock time would drop.
I did not expect CPU time to double, but wall clock stay the same. MKL seems to be using two CPUs, but accomplishing nothing.




0 Kudos
1 Reply
AndrewC
New Contributor III
239 Views
I am able to answer my own question to some extent. I am running both 32-bit and 64-bit versions of our app on XP 64.
The 32-bit version show this odd behaviour. The 64 bit version behaves as expected.

For example , on another benchmark

64 - bit version
OMP_NUM_THREADS=2
Process time : 180
Wall Clock Time : 134

OMP_NUM_THREADS=1
Process time : 180
Wall Clock Time : 180


32 - bit version
OMP_NUM_THREADS=2
Process time : 264
Wall Clock time : 134

OMP_NUM_THREADS=1
Process time : 180
Wall Clock time : 180

So it seems that a 32 - bit app running under XP64 reports excessive process time when multi-threaded.
0 Kudos
Reply