FLiT icon indicating copy to clipboard operation
FLiT copied to clipboard

Do we want to cancel out default behavior?

Open mikebentley15 opened this issue 7 years ago • 3 comments

We cancel out the default optimization level by explicitly specifying the optimization level, since not all compilers use the same default optimization level (intel defaults to -O2 whereas GCC and CLANG default to -O0).

Now the question is, do we want to cancel out other default settings? For example, the Intel compiler by default sets -fp-model=fast. We could cancel this out by specifying a new default as -fp-model=precise or -fp-model=strict. I hesitate to change things in this way, but also the results across compilers may be misleading as this default could be causing variability and not the flag under test.

mikebentley15 avatar Oct 23 '17 22:10 mikebentley15

Also, the -xHost flag seems like it should be set for intel compilations, where it takes advantage of the hardware where it is compiled. Should we do this for all compilations with intel? Are there related flags for gcc and clang?

mikebentley15 avatar Oct 23 '17 22:10 mikebentley15

May be important for some architectures such as the Xeon Phi: -fimf-domain-exclusion=15 which results in faster executions of math library routines; excludes extremes, nans, infinities and denormals

mikebentley15 avatar Oct 23 '17 22:10 mikebentley15

Intel recommends that for a good tradeoff between performance and reproducibility, do the following: -fp-model precise -fp-model source

mikebentley15 avatar Oct 23 '17 23:10 mikebentley15