From: Tobias Geerinckx-Rice Date: Mon, 16 Mar 2020 22:51:37 +0000 Subject: gnu: eigen: Stabilise sparseqr test. Taken verbatim from this[0] upstream commit. [0]: https://gitlab.com/libeigen/eigen/-/commit/3b5deeb546d4017b24846f5b0dc3296a50a039fe From 3b5deeb546d4017b24846f5b0dc3296a50a039fe Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Tue, 19 Feb 2019 22:57:51 +0100 Subject: [PATCH] bug #899: make sparseqr unit test more stable by 1) trying with larger threshold and 2) relax rank computation for rank-deficient problems. --- test/sparseqr.cpp | 31 ++++++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/test/sparseqr.cpp b/test/sparseqr.cpp index 3ffe62314..3576cc626 100644 --- a/test/sparseqr.cpp +++ b/test/sparseqr.cpp @@ -43,6 +43,7 @@ int generate_sparse_rectangular_problem(MatrixType& A, DenseMat& dA, int maxRows template void test_sparseqr_scalar() { + typedef typename NumTraits::Real RealScalar; typedef SparseMatrix MatrixType; typedef Matrix DenseMat; typedef Matrix DenseVector; @@ -91,14 +92,34 @@ template void test_sparseqr_scalar() exit(0); return; } - - VERIFY_IS_APPROX(A * x, b); - - //Compare with a dense QR solver + + // Compare with a dense QR solver ColPivHouseholderQR dqr(dA); refX = dqr.solve(b); - VERIFY_IS_EQUAL(dqr.rank(), solver.rank()); + bool rank_deficient = A.cols()>A.rows() || dqr.rank() we might have to increase the threshold + // to get a correct solution. + RealScalar th = RealScalar(20)*dA.colwise().norm().maxCoeff()*(A.rows()+A.cols()) * NumTraits::epsilon(); + for(Index k=0; (k<16) && !test_isApprox(A*x,b); ++k) + { + th *= RealScalar(10); + solver.setPivotThreshold(th); + solver.compute(A); + x = solver.solve(b); + } + } + + VERIFY_IS_APPROX(A * x, b); + + // For rank deficient problem, the estimated rank might + // be slightly off, so let's only raise a warning in such cases. + if(rank_deficient) ++g_test_level; + VERIFY_IS_EQUAL(solver.rank(), dqr.rank()); + if(rank_deficient) --g_test_level; + if(solver.rank()==A.cols()) // full rank VERIFY_IS_APPROX(x, refX); // else -- 2.24.1 /packages/patches/libofa-ftbfs-1.diff
-container.scm (container-essential-services): When shared-network? is true, remove the hosts-service-type service kind.
AgeCommit message (Collapse)Author
Pierre Langlois
2022-12-01linux-container: Do not replace nscd-service-type....* gnu/system/linux-container.scm (containerized-operating-system): Respect customizations to the nscd-service-type and only modify the caches field. Ricardo Wurmus
2022-08-09linux-container: container-script: Parse command line options....* gnu/system/linux-container.scm (container-script): Accept command line options to bind mount host directories into the container. * doc/guix.texi (Invoking guix system): Document options. Ricardo Wurmus
2022-05-31gnu: Remove wicd....The last release is from 2017, stuck on Python 2. * gnu/packages/wicd.scm: Delete file. * gnu/packages/patches/wicd-bitrate-none-fix.patch: Delete file. * gnu/packages/patches/wicd-get-selected-profile-fix.patch: Likewise. * gnu/packages/patches/wicd-urwid-1.3.patch: Likewise. * gnu/packages/patches/wicd-wpa2-ttls.patch: Likewise. * gnu/local.mk: De-register them. * gnu/services/networking.scm: Remove wicd service... * doc/guix.texi: ... and its documentation. * gnu/system/linux-container.scm (containerized-operating-system) <services-to-drop>: Remove wicd-service-type. Maxim Cournoyer
2022-03-19linux-container: Add #:guest-uid and #:guest-gid to 'eval/container'....* gnu/system/linux-container.scm (eval/container): Add #:guest-uid and #:guest-gid and honor them. Ludovic Courtès
2022-03-19linux-container: 'eval/container' honors #:namespaces....* gnu/system/linux-container.scm (eval/container): Pass #:namespaces to 'call-with-container'. Ludovic Courtès