components/libgsl/patches/fix-tests.patch
author Rich Burridge <rich.burridge@oracle.com>
Tue, 18 Apr 2017 09:10:22 -0700
changeset 7898 b6036d22c840
parent 7556 51e515988b39
permissions -rw-r--r--
25757790 Update squid to version 3.5.24

Fix the linalg and multilarge_nlinear test failures by lowering the tolerance.

The linalg problem has been reported upstream at:

  http://savannah.gnu.org/bugs/?49697

No solution there, but libgsl version 2.3 (released on 6th Dec 2016)
does have the following changes to the test_cholesky.c test program
which does fix it.

Also by adjusting the tolerance in the test_powell3.c tests, the failures
there can be prevented.

This change has been reported upstream and accepted.

See email thread starting at:

  http://lists.gnu.org/archive/html/bug-gsl/2017-01/msg00010.html


--- gsl-2.2.1/linalg/test_cholesky.c.orig	2017-01-10 10:21:58.703790247 +0000
+++ gsl-2.2.1/linalg/test_cholesky.c	2017-01-10 12:42:03.946024028 +0000
@@ -195,7 +195,7 @@
 
       gsl_linalg_cholesky_rcond(V, &rcond, work);
 
-      gsl_test_rel(rcond, expected_rcond, 1.0e-10,
+      gsl_test_rel(rcond, expected_rcond, 1.0e-6,
                    "%s rcond: (%3lu,%3lu): %22.18g   %22.18g\n",
                    desc, N, N, rcond, expected_rcond);
 
@@ -235,7 +235,7 @@
 
           create_hilbert_matrix2(m);
 
-          test_cholesky_decomp_eps(0, m, expected_rcond, GSL_DBL_EPSILON, "cholesky_decomp unscaled hilbert");
+          test_cholesky_decomp_eps(0, m, expected_rcond, N * GSL_DBL_EPSILON, "cholesky_decomp unscaled hilbert");
           test_cholesky_decomp_eps(1, m, expected_rcond, N * GSL_DBL_EPSILON, "cholesky_decomp scaled hilbert");
         }
 
@@ -786,8 +786,8 @@
       gsl_matrix * m = gsl_matrix_alloc(N, N);
 
       create_posdef_matrix(m, r);
-      test_pcholesky_decomp_eps(0, m, -1.0, 20.0 * N * GSL_DBL_EPSILON, "pcholesky_decomp unscaled random");
-      test_pcholesky_decomp_eps(1, m, -1.0, 20.0 * N * GSL_DBL_EPSILON, "pcholesky_decomp scaled random");
+      test_pcholesky_decomp_eps(0, m, -1.0, 1024.0 * N * GSL_DBL_EPSILON, "pcholesky_decomp unscaled random");
+      test_pcholesky_decomp_eps(1, m, -1.0, 1024.0 * N * GSL_DBL_EPSILON, "pcholesky_decomp scaled random");
 
       if (N <= 12)
         {
--- gsl-2.2.1/multilarge_nlinear/test_powell3.c.orig	2017-01-10 10:33:08.905770897 +0000
+++ gsl-2.2.1/multilarge_nlinear/test_powell3.c	2017-01-10 11:23:15.584632882 +0000
@@ -2,7 +2,7 @@
 #define powell3_P         2
 
 static double powell3_x0[powell3_P] = { 0.0, 1.0 };
-static double powell3_epsrel = 1.0e-10;
+static double powell3_epsrel = 1.0e-8;
 
 static double powell3_J[powell3_N * powell3_P];