[Beowulf] Detecting binaries that are limited to an architecture?

Bogdan Costescu bcostescu at gmail.com
Fri May 6 14:50:21 PDT 2016


On Fri, May 6, 2016 at 6:25 AM, Christopher Samuel
<samuel at unimelb.edu.au> wrote:
> Certainly Intel compilers seem to incorporate code to detect whether
> the current architecture matches what it was compiled for.

This is definitely the case. The help of icc includes:

-x<code>  generate specialized code to run exclusively on processors
          indicated by <code> as described below
          .....
-ax<code1>[,<code2>,...]
          generate code specialized for processors specified by <codes>
          while also generating generic IA-32 instructions.
          .....

So the possibility of matching the opcodes is valid only for the first
option, for which the generated code corresponds to exactly one
architecture. When using the second option, code for multiple
architectures is included and the appropriate one is chosen at
runtime; in this case you might find all opcodes that the compiler
knows about or which were limited by the choice of "code" option; but
this "code" option is provided by the user, which means it can also be
specified inappropriately for the architecture...

Cheers,
Bogdan


More information about the Beowulf mailing list