[cctbxbb] Boost broken on mac?

richard.gildea at diamond.ac.uk richard.gildea at diamond.ac.uk
Thu Apr 7 05:26:17 PDT 2016


Hi Luc,

Making chisq volatile as you suggest changes the floating point exception to a RuntimeError:


$ libtbx.python "/Users/rjgildea/software/cctbx/modules/dials/test/algorithms/statistics/tst_fast_mcd.py"

OK

Traceback (most recent call last):

  File "/Users/rjgildea/software/cctbx/modules/dials/test/algorithms/statistics/tst_fast_mcd.py", line 237, in <module>

    test_fast_mcd_small()

  File "/Users/rjgildea/software/cctbx/modules/dials/test/algorithms/statistics/tst_fast_mcd.py", line 146, in test_fast_mcd_small

    fast_mcd = FastMCD([x1, x2, x3])

  File "/Users/rjgildea/software/cctbx/modules/dials/algorithms/statistics/fast_mcd.py", line 165, in __init__

    self._consistency_fac = mcd_consistency(self._p, self._h / self._n)

RuntimeError: Error in function boost::math::gamma_p<e>(e, e): Argument x to the incomplete gamma function must be >= 0 (got x=-7.63324507713441681615e-4653).


The line of dials code that is now failing is (in the same file):


double calpha_inv = cdf(gamma, qalpha/2) / alpha;

https://github.com/dials/dials/blob/master/algorithms/refinement/outlier_detection/outlier_helpers.h#L40


After a process of elimination, removing the compiler flag -fno-honor-nans means that the test now passes without error. Do you have any alternative suggestions to try other than removing said flag?

Cheers,


Richard



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

Diamond Light Source Ltd.
Diamond House
Harwell Science & Innovation Campus
Didcot
Oxfordshire
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 11:55
To: cctbx mailing list
Subject: Re: [cctbxbb] Boost broken on mac?


On 7 Apr 2016, at 12:46, richard.gildea at diamond.ac.uk<mailto:richard.gildea at diamond.ac.uk> wrote:

Specifically, the line that is causing the problem is line 22, the call to quantile in the return statement:

   // chi^2 distribution with df d.o.f:
   boost::math::chi_squared_distribution<double> chisq(df);

   // Find x s.t. F(x; df) = p where F is the CDF of the Chi^2 dist with df d.o.f
   return quantile(chisq, p);

I don’t have dials set up, unfortunately. Suggestion: make chisq volative…


-- 
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