[med-svn] [opensurgsim] 01/02: Fix unit test timeouts on multiple archs

Paul Novotny paulnovo-guest at moszumanska.debian.org
Sun Nov 15 13:59:15 UTC 2015


This is an automated email from the git hooks/post-receive script.

paulnovo-guest pushed a commit to branch master
in repository opensurgsim.

commit 418c56dbf56111307ab075dd315e43b39a6d1a6e
Author: Paul Novotny <paul at paulnovo.us>
Date:   Sat Nov 14 14:45:22 2015 -0500

    Fix unit test timeouts on multiple archs
---
 debian/patches/backport-b9584d8c1.patch | 45 +++++++++++++++++++++++++++++++++
 debian/patches/series                   |  1 +
 2 files changed, 46 insertions(+)

diff --git a/debian/patches/backport-b9584d8c1.patch b/debian/patches/backport-b9584d8c1.patch
new file mode 100644
index 0000000..471731e
--- /dev/null
+++ b/debian/patches/backport-b9584d8c1.patch
@@ -0,0 +1,45 @@
+Description: Fix long running physics tests
+ Calling inverse on these large matrices is not necessary, causes the tests to
+ run long, and causes build failures due to timeouts on armel, armhf, mips,
+ mipsel, alpha, and hppa. This uses the LU factorization to solve the equation,
+ instead of using the inverse.
+Author: Paul Novotny <paul at paulnovo.us>
+Origin: upstream, https://github.com/simquest/opensurgsim/commit/b9584d8c1
+Last-Update: 2015-11-14
+
+--- a/SurgSim/Physics/RenderTests/Fem3DvsTruthCubeRenderTest.cpp
++++ b/SurgSim/Physics/RenderTests/Fem3DvsTruthCubeRenderTest.cpp
+@@ -1,5 +1,5 @@
+ // This file is a part of the OpenSurgSim project.
+-// Copyright 2013, SimQuest Solutions Inc.
++// Copyright 2013-2015, SimQuest Solutions Inc.
+ //
+ // Licensed under the Apache License, Version 2.0 (the "License");
+ // you may not use this file except in compliance with the License.
+@@ -435,7 +435,7 @@
+ 	buildConstrainedSystem(truthCubeRepresentation, A, B);
+ 
+ 	// Solve the constrained system A.X = B
+-	SurgSim::Math::Vector X = A.inverse() * B;
++	SurgSim::Math::Vector X = A.partialPivLu().solve(B);
+ 
+ 	// Extract the dof displacement vector from the solution X
+ 	return X.segment(0, numDof);
+--- a/SurgSim/Physics/UnitTests/Fem2DMechanicalValidationTests.cpp
++++ b/SurgSim/Physics/UnitTests/Fem2DMechanicalValidationTests.cpp
+@@ -1,5 +1,5 @@
+ // This file is a part of the OpenSurgSim project.
+-// Copyright 2013, SimQuest Solutions Inc.
++// Copyright 2013-2015, SimQuest Solutions Inc.
+ //
+ // Licensed under the Apache License, Version 2.0 (the "License");
+ // you may not use this file except in compliance with the License.
+@@ -171,7 +171,7 @@
+ 		Matrix K = m_fem->computeK(*(m_fem->getCurrentState()));
+ 		m_fem->getCurrentState()->applyBoundaryConditionsToMatrix(&K);
+ 		m_fem->getCurrentState()->applyBoundaryConditionsToVector(&m_F);
+-		m_U = K.inverse() * m_F;
++		m_U = K.partialPivLu().solve(m_F);
+ 	}
+ 
+ 	double getUx(size_t nodeId) const
diff --git a/debian/patches/series b/debian/patches/series
index 74c882e..bbe42c6 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -11,3 +11,4 @@ backport-7b1d8836f.patch
 fix-epsilon-for-tests.patch
 fix-fem-ply-reading.patch
 fix-build-with-eigen-3-3.patch
+backport-b9584d8c1.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/opensurgsim.git



More information about the debian-med-commit mailing list