Skip to content

Commit

Permalink
Add an toolchain compiler option for enforcing IEEE-754 conformance.
Browse files Browse the repository at this point in the history
This very useful for building for instance LAPACK and ScaLAPACK which
should be built to not trap on Nan/Inf/denormals since the code handles
that internally.
  • Loading branch information
akesandgren committed Nov 2, 2016
1 parent a2e6645 commit 4c7ea33
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions easybuild/toolchains/compiler/gcc.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ class Gcc(Compiler):
'loop': ['ftree-switch-conversion', 'floop-interchange', 'floop-strip-mine', 'floop-block'],
'lto': 'flto',
'openmp': 'fopenmp',
'ieee': ['mieee-fp', 'fno-trapping-math'],
'strict': ['mieee-fp', 'mno-recip'],
'precise':['mno-recip'],
'defaultprec':[],
Expand Down
1 change: 1 addition & 0 deletions easybuild/toolchains/compiler/inteliccifort.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ class IntelIccIfort(Compiler):
'r8': 'r8',
'optarch': 'xHost',
'openmp': 'fopenmp', # both -qopenmp/-fopenmp are valid for enabling OpenMP (-openmp is deprecated)
'ieee': 'fltconsistency',
'strict': ['fp-speculation=strict', 'fp-model strict'],
'precise': ['fp-model precise'],
'defaultprec': ['ftz', 'fp-speculation=safe', 'fp-model source'],
Expand Down
1 change: 1 addition & 0 deletions easybuild/toolchains/compiler/pgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ class Pgi(Compiler):
'r8': 'r8',
'optarch': '', # PGI by default generates code for the arch it is running on!
'openmp': 'mp',
'ieee': 'Kieee',
'strict': ['Mnoflushz','Kieee'],
'precise': ['Mnoflushz'],
'defaultprec': ['Mflushz'],
Expand Down
1 change: 1 addition & 0 deletions easybuild/tools/toolchain/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ class Compiler(Toolchain):
COMPILER_SHARED_OPTS = {
'cciscxx': (False, "Use CC as CXX"), # also MPI
'pic': (False, "Use PIC"), # also FFTW
'ieee': (False, "Adhere to IEEE-754 rules"),
'noopt': (False, "Disable compiler optimizations"),
'lowopt': (False, "Low compiler optimizations"),
DEFAULT_OPT_LEVEL: (False, "Default compiler optimizations"), # not set, but default
Expand Down

0 comments on commit 4c7ea33

Please sign in to comment.