On Jul 31, 2017, at 3:51 PM, Chuck Atkins 
<chuck.atk...@kitware.com<mailto:chuck.atk...@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.row...@intel.com<mailto:timothy.o.row...@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.

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to