Skip to content

Commit

Permalink
environment: add more info about Cray triggering __FAST_MATH__
Browse files Browse the repository at this point in the history
  • Loading branch information
dev-zero committed Feb 18, 2019
1 parent c671efb commit cee18a0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/environment.F
Original file line number Diff line number Diff line change
Expand Up @@ -215,12 +215,14 @@ SUBROUTINE cp2k_init(para_env, output_unit, globenv, input_file_name, wdir)

#if defined(__FAST_MATH__)
CALL cp_warn(__LOCATION__, &
"During compilation GCC's `-ffast-math` option was used."// &
"During compilation one of the following flags was active:"// &
" `-ffast-math` (GCC)"// &
" `-hfpN` (Cray, N > 0, default N=2)"// &
" This can lead to wrong results and numerical instabilities"// &
" and is therefore no longer supported.")

#if !defined(__FORCE_USE_FAST_MATH)
#error -ffast-math can lead to wrong results and numerical instabilities and is therefore no longer supported
#error -ffast-math (GCC) or -hfpN (N>0, Cray) can lead to wrong results and numerical instabilities and are therefore no longer supported
#endif
#endif
END SUBROUTINE cp2k_init
Expand Down

0 comments on commit cee18a0

Please sign in to comment.