Skip to content

Compiling with GCC

PROTEUS ONLY

GCC will generate executables which are likely not as fast as the vendor-specific compilers' output, i.e. Intel Compiler for Intel CPUs, and Open64 for AMD CPUs.

Optimization Flags

Please see the Proteus Hardware and Software article for a list of the specific CPUs installed in Proteus. That will determine what optimization and feature flags you may use during compilation.

As of 2014-03-04, these options/flags may be used for both Intel and AMD CPUs:

-mavx -mfpmath=sse

The cpu-type[1] which applies to both Intel and AMD nodes is corei7-avx.

The Intel C6220 and C6220 II nodes have cpu-type core-avx-i

The AMD C6145 nodes have cpu-type corei7-avx

This means that, instead of separate CPU feature flags "-mavx -mfpmath=sse", you may just use:

  • for executables that will run on both Intel and AMD: -march=corei7-avx
  • for executables that will run only on Intel: -march=core-avx-i

Alternatively, you may log on to the login host which matches the target execution hosts (proteusi01 for Intel, proteusa01 for AMD), and use: -march=native

See Also

References

[1] GCC Manual: Hardware Models and Configurations