[cmake-developers] What should the behaviour of NUMBER_OF_LOGICAL_CORES be?

Daniel Pfeifer daniel at pfeifer-mail.de
Thu Jan 26 16:10:38 EST 2017


Hi,

I agree that it should be total number of cores. In addition,
cmake_host_system_information() might be extended to provide the number of
cores per physical core.
This aligns with the information in the XML procuded by CTest: The Site
element has the attributes NumberOfLogicalCPU, NumberOfPhysicalCPU, and
LogicalProcessorsPerPhysical.

Cheers, Daniel

On Thu, Jan 26, 2017 at 9:56 PM, Nicolás Bértolo <nicolasbertolo at gmail.com>
wrote:

> Hi,
>
> This question comes from https://gitlab.kitware.com/
> cmake/cmake/issues/16594
> Currently cmake_host_system_information(RESULT logical QUERY
> NUMBER_OF_LOGICAL_CORES) is buggy, some parts of the code that implement it
> assume it refers to the number of cores in the system and some assume it is
> the number of cores per physical core. The documentation implies it is the
> total number of cores, but in my system (AMD FX-8320) it is equal to 1 when
> it should be 8.
>
> I have offered myself to fix this bug, but first I would like to know what
> is the correct return value of this call should be.
> Should it return the number of cores per physical core or the total number
> of cores in the system?
>
> I think it should be the latter, but I would like to hear your opinions.
>
> Regards,
> Nicolás.
>
>
>
> ------------------------------
> [image: Avast logo]
> <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient>
>
> El software de antivirus Avast ha analizado este correo electrónico en
> busca de virus.
> www.avast.com
> <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient>
>
>
> --
>
> Powered by www.kitware.com
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Kitware offers various services to support the CMake community. For more
> information on each offering, please visit:
>
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> Visit other Kitware open-source projects at http://www.kitware.com/
> opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/cmake-developers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20170126/b0f636d4/attachment.html>


More information about the cmake-developers mailing list