Trying to get consistent result for FP with HxCpp compilation options


Hi there,
So I’m trying to add some options in the msvc-toolchain.xml to get Floating Point accuracy between architecture as described here :

What I try to add :

    <flag value = "/Qftz-" />
      <flag value = "/Qfast-transcendentals[-]" />
      <flag value = "/fpe:0" />
      <flag value = "/Qfp-speculation strict" />
      <flag value = "/Qfp-port" />
      <flag value = "/Qprec" />
      <flag value = "/Qimf-precision:high" />
      <flag value = "/Qimf-arch-consistency:true" />
      <flag value = "/Qsafe_fp_loads" />
      <flag value = "/Qprec-div[-] " />

Some of them are accepted like

<flag value = "/fp:strict" />

But for the others mentionned above I get this message :
ignoring unknown option ‘/fpe:0’ etc

Does someone know where I can get the correct syntax to add those options.
Thanks a lot.


In the document you linked, /fpe:0 seems to be a Fortran-only argument. Some of them might be a difference between MSVC or Intel’s C++ compiler as well


Alright thanks ! So all them are for C++ compiler.
On MSVC, I found that those have some effects :

<set name="MSVC_ARCH" value="SSE2" />
<set name="KMP_DETERMINISTIC_REDUCTION" value="1" />
<set name="MKL_NUM_THREADS" value="2" />
<flag value = "/fp:strict" />
<flag value = "/Qsafe_fp_loads" />

I’m wondering if I can do more to prevent differences in FP from run-to-run and between different systems.