[Beowulf] Any ideas how Intel compilers detect CPU model?

Christopher Samuel samuel at unimelb.edu.au
Wed Feb 3 19:18:18 PST 2016


On 04/02/16 12:01, Christopher Samuel wrote:

> Does anyone know how the Intel compilers detect architecture?  Do they
> look at the model/stepping info or do they do some other tricks?

Sorry - I was being rushed to go for lunch with others when writing
that, what I meant was do they parse /proc/cpuinfo or do they use the
cpuid instruction and (as I would have expected) they don't refer to
/proc/cpuinfo.

Experimenting with hwloc shows that the cpuid instructions reflect what
is in /proc/cpuinfo (not surprising as those should just reflect the
values they return).

I've now got access to two hosts, both declare themselves the same
family (Sandybridge, model 42) but one of which has a hack that exposes
the avx2 flag.

Compiling a hello world on a physical Haswell system with the Intel
compilers and -xHOST results in a binary that won't start on the one
without the avx2 flag but will on the one that does, despite them both
being in the same model.

So it appears that side at least depends on the individual flags and not
the model (which again makes good sense if you think about future
proofing different chip variants).

All the best,
Chris
-- 
 Christopher Samuel        Senior Systems Administrator
 VLSCI - Victorian Life Sciences Computation Initiative
 Email: samuel at unimelb.edu.au Phone: +61 (0)3 903 55545
 http://www.vlsci.org.au/      http://twitter.com/vlsci



More information about the Beowulf mailing list