Opened 11 years ago
Closed 11 years ago
#621 closed defect (fixed)
Quadruple tests failing with gfortran 4.7
Reported by: | Juergen Reuter | Owned by: | kilian |
---|---|---|---|
Priority: | P0 | Milestone: | v2.2.0 |
Component: | core | Version: | 2.2.0beta |
Severity: | critical | Keywords: | |
Cc: |
Description
The following tests have screwed up numerics for quadruple precision and 64bit with gfortran 4.7. With 32bit they work! ep_1, circe1_4/5/6/7/8/9, beam_events_1, circe1_photons_4/5.
Change History (8)
comment:1 Changed 11 years ago by
comment:2 Changed 11 years ago by
Whoop, whoop: jenkins with 4.7.3 says: PASS. DESY computers 64bit with gfortran 4.7.1 say: FAIL. DESY computers 32bit with gfortran 4.7.1 say: PASS. WTF!?
comment:3 Changed 11 years ago by
Uff: so here is what I learned: I thought it should have something to do with the failing testsuite of the library mpc v1.0.2 (a prerequisite of gcc) on the DESY cluster, such that I had to fall back on v1.0.1. The failing tests deal with roundings and exceptional values of atan and atanh function implementations. All compiler 4.7.x give quadruple test failures on the DESY machines. Then I thought it could be the difference between the Intel i5-2500 of my desktop and the Intel Xeon E5-2440 of the cluster computers. So I compiled exclusively on the i5: same result: tests are failing. I'm stymied: is it then one of the system libraries (libm.so.6 or libc.so.6 ?).
comment:4 Changed 11 years ago by
I do understand more now: the culprit is the ISR structure function, I checked that neither the implementation of the dilogarithm (which only appears in the 3rd order ISR SF) nor WK's definition of the log_prec function (Taylor expansion of the logarithm close to x=1) are responsible. However, I believe it is the map_power_1 function and its inverse. Before there was a catch on too small arguments which is gone now. Further investigating ...
comment:5 Changed 11 years ago by
Introducing the old rb > tiny(1._default)**eps
barrier does not change anything
for quadruple precision with 4.9.0 on MAC OS X, a slight numerical fluctuation for double precision, but completely screws up quadruple precision for 4.7.1 on DESY machines.
comment:6 Changed 11 years ago by
I believe now that this is an incarnation of #514. The deviations in the tests on the DESY machines I think I can trace back to power law mapping for the ISR structure function, which involves an (1-x)eps. Here, eps is between 10-2 and 10-3 while (1-x) can become as small as 10-10 to 10-17. The 10byte precision we defined for quadruple gives deviations between my Laptop and the DESY machines for (1-x)=O(10-17) already in the second digit. In the MC sampling this then sums up to the fluctuations leading to the failures of the test in which ISR is switched on. It seems that when I switch to true real(16) precision on the DESY machines, I get the same values. Here are the results: MAC OS X 64bit 4.7.1 quadruple according to kinds:
****************************************** single = 4 double = 8 quad = 10 ****************************************** alpha = 7.29927007299270072990E-0003 log = 13.7937490661827614124 eps = 6.17741861636862526793E-0002 tiny(1_double) = 2.2250738585072014E-308 tiny(1_defaut) = 3.36210314311209350626E-4932 tiny(1_quadru) = 3.36210314311209350626E-4932 tiny(1_double)**eps = 9.88570351238654583308E-0020 tiny(1_defaut)**eps = 2.30273948926999148916E-0305 tiny(1_quadru)**eps = 2.30273948926999148916E-0305 a = 9.99999999999999999997E-0018 1/eps = 16.1879914913042858120 a**(1/eps) = 6.37007649851328957159E-0276
On the DESY machine, 64bit with gfortran 4.7.1, 10byte:
****************************************** single = 4 double = 8 quad = 10 ****************************************** alpha = 7.29927007299270072990E-0003 log = 13.7937490661827614124 eps = 6.17741861636862526793E-0002 tiny(1_double) = 2.2250738585072014E-308 tiny(1_defaut) = 3.36210314311209350626E-4932 tiny(1_quadru) = 3.36210314311209350626E-4932 tiny(1_double)**eps = 0.958085168108412732555 tiny(1_defaut)**eps = 0.958085168108412732555 tiny(1_quadru)**eps = 0.958085168108412732555 a = 9.99999999999999999997E-0018 a16 = 9.99999999999999999999999999999999992E-0018 1/eps = 16.1879914913042858120 a**(1/eps) = 6.11374201115035738970E-0276 a16**(1/eps)= 6.37007649851328957003759085721633792E-0276
Maybe we should discuss about this!
comment:7 Changed 11 years ago by
Note: after r5549, beam_events_1 will probably work, but _2 and _3 will fail (they call ISR).
So is it the real(10) implementation in 4.7 which is different from 4.8 (and from MAC), or do the 4.8/4.9 versions resolve quadruple into real(16)?
I'm sorry that the ISR implementation depends on numerical details. Unfortunately, a naive cutoff does actually cut off events if we do not follow 1-x down to really tiny values. If I would resolve it like CIRCE and treat events below a cutoff specially (e.g., as a delta peak), we would not be able to map the structure function efficiently. And it appears as if the double-prec results are still ok, and not invalidated by (true) quad prec results ...?
In other words, the results agree within the Monte Carlo accuracy in all cases, as they should, and the numerical noise just lets the result fluctuate within errors?
comment:8 Changed 11 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Finally resolved in r5554. Culprit indeed was numerical noise in the power mapping of the endpoint peaks in the ISR with quadruple precision. Since the quadruple precision does not change the results there (normally), we safeguard against this noise by explicitly enforcing double precision in the mapping routines. Happily closing.
So this is not really just numerical fluctuations for the test ep_1: