https://issues.dlang.org/show_bug.cgi?id=24254

--- Comment #8 from Jure Pečar <jurij.pe...@embl.de> ---
Keen eyes in easybuild community noticed that cpuid.d uses ubyte for numcores
in a couple of places. For example, function getcacheinfoCPUID4 uses uint for
numcores, but function getAMDcacheinfo uses ubyte. It also doesn't
differentiate between cores and threads so I assume it walks all logical cpus
there in the loop on lines 633-641. Bergamo has 128 cores, 256 threads, ubyte
rolls over and then on line 659 you divide something by numcores. Boom.

To test this hypothesis, I disabled SMT on one of the Bergamo nodes. Indeed,
LDC then works as expected:

# ldc2 
Error: No source files

So I'd say the fix is to just s/ubyte/uint/g on cpuid.d. And check if you do
any similar things elsewhere.

Thanks,

--

Reply via email to