njn | 8ccae99 | 2008-02-11 21:22:15 +0000 | [diff] [blame] | 1 | From Vince Weaver: |
| 2 | |
| 3 | I've been running the SPEC CPU 2006 benchmarks under valgrind (doing some |
| 4 | work on my BBV generating plugin). |
| 5 | |
| 6 | There are two benchmarks that have issues, and I thought I'd share them |
| 7 | here for future reference. |
| 8 | |
| 9 | 1). zeusmp - does not run |
| 10 | |
| 11 | It has a 1GB data segment, which valgrind cannot handle on a 32-bit |
| 12 | CPU. |
| 13 | |
| 14 | 2). dealII - runs forever, never ending |
| 15 | |
| 16 | It took a while, but I tracked this down to a 64bit/80bit |
| 17 | floating point issue. |
| 18 | |
| 19 | The code in the QGauss<1>::QGauss() function has some code like this: |
| 20 | |
| 21 | const long double tolerance = std::max (static_cast<long double> |
| 22 | (std::numeric_limits<double>::epsilon() / 100), |
| 23 | static_cast<long double>(std::numeric_limits<long |
| 24 | double>::epsilon() *5)); |
| 25 | |
| 26 | do { |
| 27 | .... |
| 28 | various fp operations |
| 29 | .... |
| 30 | } while (abs(p1/pp) > tolerance); |
| 31 | |
| 32 | |
| 33 | The tolerance in this case is being set to ~2.22e-18, but the |
| 34 | abs(p1/pp) value never gets below ~2.586e-17 under valgrind. |
| 35 | |
| 36 | [This is because Valgrind only uses 64-bit FP values on x86, not 80-bit |
| 37 | values.] |
| 38 | |
| 39 | This is similar to an issue that happens with the "art" |
| 40 | benchmark on SPEC CPU 2000, but in the "art" case it only |
| 41 | makes the code take longer to finish; this "dealII" problem |
| 42 | makes the benchmark loop forever. |
| 43 | |