SuiteSparse errors do not cause a fatal crash.

1. Move LinearSolverTerminationType to ceres::internal.
2. Add FATAL_ERROR as a new enum to LinearSolverTerminationType.
3. Pipe SuiteSparse errors via a LinearSolverTerminationType so
   to distinguish between fatal and non-fatal errors.
4. Update levenberg marquardt and dogleg strategies to deal
   with FATAL_ERROR.
5. Update trust_region_minimizer to terminate when FATAL_ERROR
   is encountered.
6. Remove SuiteSparse::SolveCholesky as it screws up the error
   handling.
7. Fix all clients calling SuiteSparse to handle the result of
   SuiteSparse::Cholesky correctly.
8. Remove fatal failures in SuiteSparse when symbolic factorization
   fails.
9. Fix all clients of SuiteSparse to deal with null symbolic factors.

This is a temporary fix to deal with some production problems. A more
extensive cleanup and testing regime will be put in place in a
subsequent CL.

Change-Id: I1f60d539799dd95db7ecc340911e261fa4824f92
This commit is contained in:
Sameer Agarwal
2013-11-21 21:33:51 -08:00
parent a674e0f853
commit 79bde35f29
15 changed files with 188 additions and 140 deletions
-23
View File
@@ -159,26 +159,6 @@ enum DenseLinearAlgebraLibraryType {
LAPACK
};
enum LinearSolverTerminationType {
// Termination criterion was met. For factorization based solvers
// the tolerance is assumed to be zero. Any user provided values are
// ignored.
TOLERANCE,
// Solver ran for max_num_iterations and terminated before the
// termination tolerance could be satified.
MAX_ITERATIONS,
// Solver is stuck and further iterations will not result in any
// measurable progress.
STAGNATION,
// Solver failed. Solver was terminated due to numerical errors. The
// exact cause of failure depends on the particular solver being
// used.
FAILURE
};
// Logging options
// The options get progressively noisier.
enum LoggingType {
@@ -479,9 +459,6 @@ bool StringToCovarianceAlgorithmType(
string value,
CovarianceAlgorithmType* type);
const char* LinearSolverTerminationTypeToString(
LinearSolverTerminationType type);
const char* SolverTerminationTypeToString(SolverTerminationType type);
bool IsSchurType(LinearSolverType type);