[Mesa-dev] [PATCH] swr: Add arch flags to support Cray and PGI compilers

Rowley, Timothy O timothy.o.rowley at intel.com
Tue Aug 1 20:23:12 UTC 2017


On Jul 31, 2017, at 3:51 PM, Chuck Atkins <chuck.atkins at kitware.com<mailto:chuck.atkins at kitware.com>> wrote:

Hi Tim,

If the Cray flags are for wrapper scripts, why do we need specific flags for that instead of using the underlying compiler flags?

Sort answer: It's the "Cray" way of doing things.

Long answer: The target-cpu flag sometimes just controlls the -march flags (or equiv) but it can also add other low level flags.  By using the target-cpu flag with the cray compiler wrappers, you ensure that you're using whatever flags for a given architecture are appropriate for the underlying compiler, even if you don't have that compiler knowledge specified encoded anywhere in your configure.  For instance, when using another compiler backend that ./configure isn't explicitly checking for (pathscale, actual cray compiler, etc.), then the build will continue to work because -target-cpu gets translated by the wrpper to whatever is appropriate.  You'll also get a default set of flags loaded anyways based on your module environment.  Specifying target-cpu replaces those default flags whereas adding -xCORE-AVX512 would just append to them, maybe overriding the default flags, maybe not, depending on how the module environment is set up.  It's one of the many quirks and oddities of the Cray Programming Environment.

Thanks for explanation.

Reviewed-by: Tim Rowley <timothy.o.rowley at intel.com<mailto:timothy.o.rowley at intel.com>>


I’m guessing you intend this for the 17.2 branch as well?

Nope.  I've no pressing customer need for it so keeping it in master but out of stable is fine with me.


----------
Chuck Atkins
Staff R&D Engineer, Scientific Computing
Kitware, Inc.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170801/e5f0ee43/attachment.html>


More information about the mesa-dev mailing list