Intel® Moderncode for Parallel Architectures
Support for developing parallel programming applications on Intel® Architecture.

IPPI multithreading on Win7 and XP

honsinger
Beginner
289 Views
We are using IPPI static multithreaded static libraries using dispatching. We are using the latest version of theIPPavailable as of 1-Jan-2010. We are seeing tremendous improvements over the single threaded libraries, often ~2x. We are doing no threaded image processing ourselves, just relying on the libraries. This product is really an excellent product.

Now our dilemma -- On XP, only one of the cores appears to "dance" when running our app and watching the graphic on MS's performance monitor. On our Win 7 machines, all cores "dance".

What's got me stumped is that *regardless of the OS (Win7 or XP)*, the speed of our algorithms is best predicted by the number of cores on the system. So on two identical machines, one with XP and the other with Win7, they'd pretty much be the same in timing when running our IPPI application despite what the graphics on the Microsoft Performance Monitor would suggest.

If this is the case, why do I care? Because I recently installed our application at a customer site using a suite of XEON 8 cores and the first thing the customer did was bring up that MS Performance monitor. He said why is only one core used? I had a dumb look and said I'd look into it.

I must understand this issue and very much appreciate any insights you could provide!

Thanks,
Chris
0 Kudos
2 Replies
TimP
Honored Contributor III
289 Views
You'd likely get more knowledgeable answers on the IPP forum. If I understand what you're saying, you are actually using 2 threads on an 8 core machine, but one of them is spending only short time intervals on each of 7 cores. If IPP is using KMP_AFFINITY environment, but you haven't set that variable, you might try setting KMP_AFFINITY=scatter (if you want thread pinning on separate sockets).
Windows 7 has a different, potentially better (in the case where some cores might be busy doing something else), scheduling algorithm than XP, so it is not completely surprising to see different behavior when not all cores are busy.
0 Kudos
honsinger
Beginner
289 Views
Quoting - tim18
You'd likely get more knowledgeable answers on the IPP forum. If I understand what you're saying, you are actually using 2 threads on an 8 core machine, but one of them is spending only short time intervals on each of 7 cores. If IPP is using KMP_AFFINITY environment, but you haven't set that variable, you might try setting KMP_AFFINITY=scatter (if you want thread pinning on separate sockets).
Windows 7 has a different, potentially better (in the case where some cores might be busy doing something else), scheduling algorithm than XP, so it is not completely surprising to see different behavior when not all cores are busy.
Tim,

I am not at actively managing any threads. The multithreaded libraries do that for me. I would love to play with multithreading directly but priorities are elsewhere.

The static library linkage using the multithreaded IPP libs are supposed to do a lot of the work for me - albeit in a crude manner, of which I am completely comfortable with and indeed am suprised and gratified at the performance increase.

I had assumed that I needed to do nothing but properly initialize the libraries once, being mindful to assure that the libraries have not been initialized yet. That I have done. This suggestion of setting KMP_AFFINITY violates that assumption and I'll have to reexamine my understanding of the libraries.

Thanks for suggesting posting this on the IPP forum. If I can find it, I'll do it, but finding my way around this site has not been intuitive so far.

Thanks!
0 Kudos
Reply