[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
Sun Nov 24 15:37:03 EST 2013
On Nov 24, 2013, at 12:23 PM, Ben Brown wrote:
> Are we using "fast-math" complier flags?
no, we are not using -ffast-math
we use -O2 but hopefully that isn't turning on fast-math for us.
I want a "slow-but-correct-math" option!
BTW: you might be interested in the reply I just sent to Mike.
it does seem like a fast-math sort of problem as you suggest.
-B
On Nov 23, 2013, at 3:07 PM, Michael Zingale wrote:
> Can you reproduce it in a simple 1-line Fortran code that just computes that log?
>
no -- that would be too simple!
when I do this at the start of a run on 10.6.8,
write(*,1) 'log(4.8099321922881207D+26)', log(4.8099321922881207D+26)
I get
log(4.8099321922881207D+26) 6.1437895404626097D+01
which is the same value as I get on 10.8.5 during the mesa run.
during the mesa run on 10.6.8 these output lines give different story:
write(*,3) 'rp13 + dr3', k, s% newton_iter, rp13 + dr3
write(*,3) 'log(rp13 + dr3)', k, s% newton_iter, log(rp13 + dr3)
write(*,3) 'log(4.8099321922881207D+26)', &
k, s% newton_iter, log(4.8099321922881207D+26)
write(*,*) '(rp13 + dr3) == 4.8099321922881207D+26', &
((rp13 + dr3) == 4.8099321922881207D+26)
output:
rp13 + dr3 627 1 4.8099321922881207D+26
log(rp13 + dr3) 627 1 6.1437895404626090D+01
log(4.8099321922881207D+26) 627 1 6.1437895404626097D+01
(rp13 + dr3) == 4.8099321922881207D+26 T
So it looks like the exact same input gives different results at different times during the execution.
Perhaps a side-effect of not taking the required extra cycles in the math routines to ensure same results by doing things like clearing lower order bits?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.mesastar.org/pipermail/mesa-users/attachments/20131124/6a228da3/attachment.html>
More information about the Mesa-users
mailing list