[mesa-users] update on mesa platform dependency bugs: natural log function different on Mac 10.6.8 vs 10.8.5
bpbrown at astro.wisc.edu
Sun Nov 24 15:23:53 EST 2013
Fascinating, if that is indeed the major culprit.
Are we using "fast-math" complier flags? If so, turn those off, as they
allow more permissive (less accurate) routines for things like log, etc.
(sorry, don't have a recent enough copy of MESA on my laptop to try
myself, and bandwidth at home is very low today)
> Message: 1
> Date: Sat, 23 Nov 2013 14:21:27 -0800
> From: Bill Paxton <paxton at kitp.ucsb.edu>
> Subject: [mesa-users] update on mesa platform dependency bugs: natural
> log function different on Mac 10.6.8 vs 10.8.5
> To: mesa-users group <mesa-users at lists.sourceforge.net>
> Message-ID: <BEA42B07-7367-43F8-807A-14BD9E96FC02 at kitp.ucsb.edu>
> Content-Type: text/plain; charset="us-ascii"
> This is an update on the battle to get the same answers from mesa on different platforms.
> As you may recall this started with the test case wd_cool_0.6M failing on some systems in spite of succeeding on mine.
> I've been slogging away at comparing wd_cool_0.6M on my Mac with OS X 10.6.8 vs Ed Brown's Mac with 10.8.5 -- both running the same mesa and mesasdk.
> We know they give different final results, but now I'm looking to find where the two computations 1st start to diverge.
> And it happens very early -- I find a tiny difference already on the 2nd newton iteration of the 1st timestep.
> After much searching, it turns out that the log of 4.8099321922881207D+26 is different
> on 10.6.8: 6.1437895404626090D+01
> on 10.8.5: 6.1437895404626097D+01
> So who cares about that last crummy little digit?
> But that tiny difference changes the residual for the density equation for cell 627,
> and that leads tiny changes in the solutions for the densities and radii of nearby cells,
> and that makes tiny changes the net and the opacities and the eos,
> and .... if you keep going, the divergence keeps growing and spreading.
> So we really want to have zero tolerance for these differences.
> Perhaps someone knows some compiler flags that will get higher accuracy from the math routines?
More information about the Mesa-users