CI+CMake: add NAG7.2/GNU13.3 compiler test jobs; Optimize compile flags

Additions/Changes:

  • added FORCES_ENABLE_NATIVE option to CMake to enable HPC/local optimized code
  • added RELWITHDEBINFO cmake support for faster run/debug cycles (backtrace, debug log)
  • test jobs using the NAG compiler v7.2 on DS3
  • test jobs using the GNU compiler v13.3 on DS3
  • removed -fp-model=precise;-fprotect-parens flags for Intel-release for better optimization
  • added -fcheck=no-array-temps for GNU-debug to prevent huge log output for temporary array creation (which is totally fine)
  • CMake+NAG+OpenMP issue solved by only adding compile flag "-openmp" and removing "-gline" in debug mode

Since Intel is now allowed to do more aggressive optimization in release mode, we needed to adopt some tests:

  • mo_anneal: replaced the exact expected-cost check with behavior checks: the reported best cost must match the returned parameters, must improve on the initial guess, must be below 5e-2, and must stay inside the feasible range. That keeps the test meaningful without locking it to one optimizer trajectory.
  • mo_corr, mo_percentile, mo_errormeasures: better usage of tolerance when comparing floats
  • mo_utils: removed subnormal relational assertions (not portable)

Bug found:

  • mo_percentile: the aggressive floating point optimization of intel revealed a bug in mo_percentile - in mode 3, the implementation chose the index via a borderline floating-point rank calculation; in single precision that could flip from 8 to 7 on Intel.
  • mo_grid: grid_map_longitude_for_domain no longer relies on modulo(...,360) for periodic upper-bound ties
Edited by Sebastian Müller

Merge request reports

Loading