[mesa-users] update on mesa platform dependency bugs: natural log function different on Mac 10.6.8 vs 10.8.5

Bill Paxton paxton at kitp.ucsb.edu
Mon Nov 25 12:40:01 EST 2013


On Nov 25, 2013, at 1:26 AM, Robert Izzard wrote:

> Dear Bill, Dave, et al.
> 
> Normally I lurk here, but this is something I've tackled in the past so maybe I can help...
> 
>> I agree with Bill that if the word length is really the same, through all
>> the math packages, we should have the same answers. 
> 
> When working on the BINSTAR code in Brussels, I had similar problems. The same executable on different PCs would often be different (probably because shared libraries were slightly different, etc. but who really knows).
> 
> In my experience, the *only* "robust" way to detect what is going on is to drop to -O0 with *all* the mathematical optimisations turned off, and all the IEEE compliance flags turned on (gcc/gfortran has quite a few of them, "-fp-model strict" I vaguely remember but it might have changed in more recent versions) and remember to trap the floating point exceptions. You can then bisect the problem by turning optimisation flags back on one by one, rather than a blanket -O2 which turns on lots of things. There is no other way I am afraid - if you think this 15th decimal place is really the problem. [The bisect should be automated - there are tools for this (e.g. the Linux kernel has them I think) but I've never used them, sorry.]
> 
> But... I agree with Dave (I think it was) that if the result depends on this kind of accuracy then you're in trouble, and you're possibly asking for the impossible. It might be good to do some kind of ensemble analysis to determine the stability of your simulation w.r.t. the initial conditions (which reminds me of my days at the Met Office!). This is a routine technique e.g. in weather forecasting, e.g. http://www.wetterzentrale.de/pics/MT2_Essen_ens.png :-)
> 
> cheers
> rob
> 


Hi Rob,

Thanks for your input -- I know you have lots of useful experience, so I appreciate your comments.

From my last few emails, you know that my concerns here are about software development rather than 16 digit accuracy in physics results!

I'd happily settle for platform independence at the level of the math lib so I could focus more clearly on the bugs I introduce myself.

Cheers,
Bill








More information about the Mesa-users mailing list