Remove a CHECK failure from covariance_impl.cc

The CHECK was to see if SuiteSparseQR returns a non-null QR
factorization. However this can cause problems in production, so its
better to return false and let the user deal with the failure in
factorization.

Change-Id: I4e67f343e30547f4257d0315d507df9864c06dcc
This commit is contained in:
Sameer Agarwal
2019-09-11 19:57:36 -07:00
parent d7f428e5c7
commit 17becf4610
+6 -1
View File
@@ -651,7 +651,12 @@ bool CovarianceImpl::ComputeCovarianceValuesUsingSuiteSparseQR() {
&permutation,
&cc);
event_logger.AddEvent("Numeric Factorization");
CHECK(R != nullptr);
if (R == nullptr) {
LOG(ERROR) << "Something is wrong. SuiteSparseQR returned R = nullptr.";
free(permutation);
cholmod_l_finish(&cc);
return false;
}
if (rank < cholmod_jacobian.ncol) {
LOG(ERROR) << "Jacobian matrix is rank deficient. "