Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.

Dual core -> Dual Thread ?

matazzz
Beginner
305 Views
Hello,

I've downloded and installed the C++ Compiler 9.0. I'haven't yet read all the documentation, but I wonder if it's possible to create a thread and choosing the CPU (and/or Core) on which it will execute
?

PS : I'am asking this question because I work with a Bi-Xeon (four Core), and I make Large image processing tools, but even with multi threading, the CPU run 25% of it's capacity!!!
0 Kudos
2 Replies
TimP
Honored Contributor III
305 Views
Intel C++ supports OpenMP thread creation. The operating system should always schedule a thread on a logical processor which is not busy, although some are better than others. I don't know what you mean by Bi-Xeon. The Pentium D EE has 2 cores, each with 2 logical HyperThreaded processors. If you are looking at the total capacitiy of the system, depending on the requirements of your program, you are likely to get 90% or more of the capability by running 1 thread on each core. Sorry if the Windows performance meter display is disappointing.
If your work is evenly balanced between 2 threads, and their performance isn't limited by some factor external to the CPU, such as disk access, you should be getting close to 100% usage of one logical process on each core. With HT enabled, Windows would say you were getting only 50% overall. In reality, it's much better than that.
Current released operating systems may not do a good job of spreading work evenly between the 2 cores, unless you disable HyperThreading. Operating systems support thread affinity calls, but those have to be programmed for specific types of systems, and run into trouble when multiple applications start up. Those aren't covered in compiler documentation.
0 Kudos
matazzz
Beginner
305 Views
Ok, thanks for the explaination.
0 Kudos
Reply