New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
On some virtual machines, library returns zero number of cores. #50
Comments
Hi! This particular error is caused by a VM which was allotted only one "processor", thus num_core=1, however the VM host didn't change num_smt, which on the real CPU is 2. Thus 1/2 = 0. On a "real" cpu such a bug could never happen. For the usual computing tasks, the recommended approach is to use That being said, I'll change the code line to something like |
Thanks for detailed explanation!
Seems fine. |
…of cores. As proposed in the issue discussion.
Fixed in e0505af |
Look at ClickHouse/ClickHouse#53 (comment)
As I remember, variable 'num_core' is equal to zero here: https://github.com/anrieff/libcpuid/blob/master/libcpuid/recog_intel.c#L561
The text was updated successfully, but these errors were encountered: