Fri 17 Apr 2015 03:28:16 PM UTC, original submission:
Hello,
Please CC me directly on any replies because I'm not subscribed to the bugs list.
When compiling gsl-1.16 using Clang/LLVM trunk for big-endian PPC64/Linux, and using -ffp-contract=fast, make check reports one test failure, which is in ode-initval2, with this error:
FAIL: bsimp/msbdf e5_bigt [0] (3.74930479547497807e-49 observed vs 3.75953510319630164e-49 expected) [1126]
FAIL: bsimp/msbdf e5_bigt [1] (6.24102529027298901e-21 observed vs 8.02997493696624951e-21 expected) [1127]
FAIL: bsimp/msbdf e5_bigt [2] (1.55381668382339737e-20 observed vs 1.27123535645485829e-20 expected) [1128]
FAIL: bsimp/msbdf e5_bigt [3] (5.6710668834932872e-65 observed vs 4.65237109886871277e-65 expected) [1129]
When compiling ode-initval2/test.c using -ffp-contract=on or -ffp-contract=off instead, the test passes. Also, when compiling using -ffp-contract=fast but placing '#pragma clang optimize off'/'#pragma clang optimize on' around only the rhs_e5 function, the test also passes. I've examined the assembly produced for the rhs_e5 (annotated below), and it looks okay. As a result, it seems likely that this is a sensitivity of the test to the extra FMA precision.
Could the test be modified to make it less sensitive to FMA formation?
Thanks again,
Hal
int
rhs_e5 (double t, const double y[], double f[], void *params)
{
const double a = 7.89e-10;
const double b = 1.1e7;
const double c = 1.13e3;
const double m = 1.0e6;
extern int nfe;
nfe += 1;
f[0] = -a * y[0] - b * y[0] * y[2];
f[1] = a * y[0] - m * c * y[1] * y[2];
f[3] = b * y[0] * y[2] - c * y[3];
f[2] = f[1] - f[3];
return GSL_SUCCESS;
}
|