4 ms·
> I don't have the /proc/cpuinfo output any more (see below), but the model name was AMD Opteron 63xx class, or something similar. This is a virtual machine, so
by segfaultbuserr 4y ago
> I don't have the /proc/cpuinfo output any more (see below), but the model name was AMD Opteron 63xx class, or something similar. This is a virtual machine, so I'm assuming the hypervisor was reporting an older CPU model. [...] There actually was an Opteron 6300 series, which matches the reported model name and did support FMA4.
> [...] the CPU is a lie
The hypervisor is a lie.
I suspect the provider disabled the "fma4" instructions. If your program relies on model-specific CPU instructions, it can occasionally be a problem. I used to have a personal server at a big VPS provider. I compiled my program with "-march=native". One day, I found it suddenly started to crash. Upon further investigation, I noticed the "avx" flag had disappeared from my /proc/cpuinfo!
I filed a ticket demanding an explanation. The customer service replied and insisted that they do not just remove AVX, and recommended me to check my kernel. I upgraded my kernel, rebooted, and AVX mysteriously came back. I suspect that they actually did disable AVX to avoid CPU throttling (AVX is notorious for this, it can ironically degrade the overall server performance), and then restored it back after my complaint... Though I had no way to confirm.
If you use a small hosting provider, my suggestion is to never build programs with any CPU-specific instructions. Who knows what server they're moving to after a year?
Since the author no longer has the /proc/cpuinfo, I cannot say anything for sure. If the "fma4" flag was still there, it's a VM misconfiguration. If not, the software was only looking for the model number and not the flags, which is arguably a bug.
- GrayShade 4y ago> Since the author no longer has the /proc/cpuinfo, I cannot say anything for sure. If the "fma4" flag was still there, it's a VM misconfiguration. If not, the software was only looking for the model number and not the flags, which is arguably a bug. I touched on this in the article. I don't think Linux actually shows an fma4 CPU flag (it didn't on that VM), but a test program said it didn't support fma4. The OpenBLAS developers don't seem interested in fixing it [0], since it's unlikely to happen outside of misconfigured VMs. My suspicion is that the server actually had an EPYC CPU, but the hypervisor was configured to say Opteron. [0]: https://github.com/xianyi/OpenBLAS/issues/3638 https://github.com/xianyi/OpenBLAS/issues/3638