[cctbxbb] Boost broken on mac?

richard.gildea at diamond.ac.uk richard.gildea at diamond.ac.uk
Wed Apr 6 23:39:44 PDT 2016

Hi Luc,

I don't think your fix will help with the other two tests that failed (note failed, not crashed) with the -ffast-math flag. In some ways these are more concerning than the floating point crash as I don't even know where to begin to track down the problematic lines of code. Could you confirm whether the following two tests fail for you after your latest change?

libtbx.python "/Users/rjgildea/tmp/tst_bootstrap/tmp/modules/cctbx_project/cctbx/maptbx/boost_python/tst_maptbx.py" [FAIL]
  Time:  4.96
  Return code: 1
  OKs: 0
  Standard error:
    Traceback (most recent call last):
      File "/Users/rjgildea/tmp/tst_bootstrap/tmp/modules/cctbx_project/cctbx/maptbx/boost_python/tst_maptbx.py", line 1395, in <module>
      File "/Users/rjgildea/tmp/tst_bootstrap/tmp/modules/cctbx_project/cctbx/maptbx/boost_python/tst_maptbx.py", line 1373, in run
      File "/Users/rjgildea/tmp/tst_bootstrap/tmp/modules/cctbx_project/cctbx/maptbx/boost_python/tst_maptbx.py", line 365, in exercise_misc
        assert (approx_equal(stats.min, 8.3, eps=0.1))

libtbx.python "/Users/rjgildea/tmp/tst_bootstrap/tmp/modules/cctbx_project/scitbx/lbfgs/tst_lbfgs_fem.py" [FAIL]
  Time: 14.01
  Return code: 1
  OKs: 0
  Standard error:
    Traceback (most recent call last):
      File "/Users/rjgildea/tmp/tst_bootstrap/tmp/modules/cctbx_project/scitbx/lbfgs/tst_lbfgs_fem.py", line 159, in <module>
      File "/Users/rjgildea/tmp/tst_bootstrap/tmp/modules/cctbx_project/scitbx/lbfgs/tst_lbfgs_fem.py", line 154, in run
      File "/Users/rjgildea/tmp/tst_bootstrap/tmp/modules/cctbx_project/scitbx/lbfgs/tst_lbfgs_fem.py", line 130, in compare_implementations
        this_script=this_script, n=n, m=m, iprint=[iprint1, iprint2])
      File "/Users/rjgildea/tmp/tst_bootstrap/tmp/modules/cctbx_project/scitbx/lbfgs/tst_lbfgs_fem.py", line 117, in run_and_compare_implementations
        assert not show_diff(a, b)



Dr Richard Gildea
Data Analysis Scientist
Tel: +441235 77 8078

Diamond Light Source Ltd.
Diamond House
Harwell Science & Innovation Campus
OX11 0DE
From: cctbxbb-bounces at phenix-online.org [cctbxbb-bounces at phenix-online.org] on behalf of Luc Bourhis [luc_j_bourhis at mac.com]
Sent: 07 April 2016 02:31
To: cctbx mailing list
Subject: Re: [cctbxbb] Boost broken on mac?

Morning Marcin,

On 7 Apr 2016, at 02:15, Marcin Wojdyr <wojdyr at gmail.com<mailto:wojdyr at gmail.com>> wrote:

If there is no other workaround you could remove -ffast-math
partially, it's a combination of a few more specific math-related

Correct for gcc whose documentation clearly lists all the flags but then moving to clang is a guess work…

Anyway, I tried another approach: identifying the exact point of failure and coding a workaround: commit 24207.

Actually adding this option was quite an important decision, given
that it violates language standards, disallows NaNs, etc. And all this
is propagated to other projects that are built with libtbx/scons.

By default, the cctbx will crash on you if NaN’s are produced, not because of -ffast-math but because of the way we set the FP flags. Do you unset them in the CCP4?

Best wishes,


This e-mail and any attachments may contain confidential, copyright and or privileged material, and are for the use of the intended addressee only. If you are not the intended addressee or an authorised recipient of the addressee please notify us of receipt by returning the e-mail and do not use, copy, retain, distribute or disclose the information in or attached to the e-mail.
Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd. 
Diamond Light Source Ltd. cannot guarantee that this e-mail or any attachments are free from viruses and we cannot accept liability for any damage which you may sustain as a result of software viruses which may be transmitted in or with the message.
Diamond Light Source Limited (company no. 4375679). Registered in England and Wales with its registered office at Diamond House, Harwell Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom

More information about the cctbxbb mailing list