Skip to content

Commit

Permalink
libtbx: remove -ffast-math flag for MacOS+conda
Browse files Browse the repository at this point in the history
- Optimization changes lbfgs behavior in scitbx/lbfgs/tst_lbfgs_fem.py
- With the flag, minimization may take more steps than the fortran reference
cf. 7976f7c
  • Loading branch information
Anthchirp committed Apr 28, 2020
1 parent c606245 commit 8af271f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion libtbx/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -791,8 +791,12 @@ int main() {
else:
env_etc.ccflags_base = ["-fPIC", "-fno-strict-aliasing"] + \
gcc_common_warn_options() + \
["-DNDEBUG", "-O3", "-ffast-math", "-funroll-loops"] + \
["-DNDEBUG", "-O3", "-funroll-loops"] + \
["-DBOOST_ALL_NO_LIB"]
if env_etc.compiler != 'darwin_conda':
env_etc.ccflags_base.append("-ffast-math")
# -ffast-math changes scitbx/lbfgs/tst_lbfgs_fem.py behavior in Xcode 11.4
# minimization steps may be different than fortran standard
env_etc.cxxflags_base = []
env_etc.shlinkflags = ['-shared']
env_etc.shlinkflags_bpl = env_etc.shlinkflags
Expand Down

0 comments on commit 8af271f

Please sign in to comment.