How to find if multicore is enabled

How to find if multicore is enabled

Hi,

Could any one help me to check if multicore property is enabled through c++..

Thanks,
Ananda

5 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Quoting - anandakumaryg
Hi,

Could any one help me to check if multicore property is enabled through c++..

Thanks,
Ananda

Hi Ananda,

What do you mean with "multicore property"? Do you want to know the number of available physical cores andlogical cores?
Do you want to check whether Hyper-Threading is enabled through C++?

You can use CPUID info to check Hyper-Threading, the number of available physical and logical cores, and more information about the CPU. However, I don't know about a "multicore property".

If you have more than 1 physical core, you have a multicore CPU.

Cheers,

Gaston

Gastón C. Hillar

Quoting - anandakumaryg
Hi,

Could any one help me to check if multicore property is enabled through c++..

Thanks,
Ananda

Hi Ananda,

This post http://software.intel.com/en-us/articles/hyper-threading-technology-multi-core-and-mobile-intel-pentium-processor-m-toolbox/

can help you. It uses C++ and a library to detect logical and physical cores.

It doesn't work with the newest microprocessors. However, today Khang Nguyen (Intel) added a comment telling me there is going to be a new version soon. :)

Hope it helps.

Cheers,

Gastn

Gastón C. Hillar

Quoting - Gastn C. Hillar

Hi Ananda,

This post http://software.intel.com/en-us/articles/hyper-threading-technology-multi-core-and-mobile-intel-pentium-processor-m-toolbox/

can help you. It uses C++ and a library to detect logical and physical cores.

It doesn't work with the newest microprocessors. However, today Khang Nguyen (Intel) added a comment telling me there is going to be a new version soon. :)

Hope it helps.

Cheers,

Gastn

Hi Gaston,

Thanks for the reply.

Whether the above mentioned code will work for Intel Xeon processor ? When I ran the HTMCSample.exe. Its not returing correct number of physical processor and number of cores per processor. In my Pc I am having 4 cores and 2 physical processor.

Thanks,
Ananda

Please tell us the models of your CPUs.

If they are Nehalem based, old detection methods might give wrong results. Unfortunately, last time I checked Intel's documentation wasn't updated to include the proper detection for number of cores on Nehalem CPUs.

Hi there Gaston! How's it going? :)

-- Regards, Igor Levicki If you find my post helpfull, please rate it and/or select it as a best answer where applies. Thank you.

Leave a Comment

Please sign in to add a comment. Not a member? Join today