[mesa-users] update on mesa platform dependency bugs: natural log function different on Mac 10.6.8 vs 10.8.5
paxton at kitp.ucsb.edu
Mon Nov 25 12:34:51 EST 2013
On Nov 25, 2013, at 1:06 AM, Roni Waldman wrote:
> Hi Bill,
> You might disagree, but isn't that exactly what you experienced, i.e. same operation giving different results on different machines?
> What I am saying is that this is well known, to my experience, and other people I've asked also experienced in numerical coding.
> I'm not an expert on inner workings of processors, but as far as I understand, the standard practice is for the machine to optimize computation speed, also by varying the order of operations, which in fact might alter the last bit of the result.
> This is even true for multiplication.
> There might be, depending on the compiler, flags which prevent this behavior, but they'll probably slow down computation a great deal.
> I will be happy to learn that I'm wrong.
> In the case I'm not, I don't think you're in deep-deep trouble, just in deep trouble as anyone who deals with numerical computation. :)
> You're only in deep-deep trouble if the result of a computation varies on a macroscopic scale depending on machine.
> That would mean your algorithms are unstable to small perturbations.
> I don't think this is the case for mesa.
> On the other hand you will sometimes encounter annoying cases, where some bug causing the code to crash would only manifest itself on some machines, because these small numerical differences.
> To my knowledge this is unavoidable.
I agree with you that the "state-of-the-art" is to accept as unavoidable this sort of platform dependence on things as basic as math functions like log and exp.
For physicists who just want to get on with their work, I can understand this (sort of).
But I don't like it. As a computer scientistic, software system builder, I'm incredulous.
My ability to create good software that will be useful on a variety of platforms is strongly impacted by any lack of reproducibility.
So, I accept that physicists have learned to live with this, but I'm not willing to give up without a fight! ;D
Bottom line: I'm trying to fix this for me -- so I can do a better job building software.
More information about the Mesa-users