Changed default elimination algorithm to newer one with fewer matrix allocations to solve crashing bug from LM discovered in MAST
parent
04f7bbf253
commit
022f706d94
|
|
@ -123,7 +123,7 @@ namespace gtsam {
|
||||||
* @param enableJoinFactor uses the older joint factor combine process when true,
|
* @param enableJoinFactor uses the older joint factor combine process when true,
|
||||||
* and when false uses the newer single matrix combine
|
* and when false uses the newer single matrix combine
|
||||||
*/
|
*/
|
||||||
GaussianConditional::shared_ptr eliminateOne(const Symbol& key, bool enableJoinFactor = true);
|
GaussianConditional::shared_ptr eliminateOne(const Symbol& key, bool enableJoinFactor = false);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Peforms a supposedly-faster (fewer matrix copy) version of elimination
|
* Peforms a supposedly-faster (fewer matrix copy) version of elimination
|
||||||
|
|
@ -138,7 +138,7 @@ namespace gtsam {
|
||||||
* @param enableJoinFactor uses the older joint factor combine process when true,
|
* @param enableJoinFactor uses the older joint factor combine process when true,
|
||||||
* and when false uses the newer single matrix combine
|
* and when false uses the newer single matrix combine
|
||||||
*/
|
*/
|
||||||
GaussianBayesNet eliminate(const Ordering& ordering, bool enableJoinFactor = true);
|
GaussianBayesNet eliminate(const Ordering& ordering, bool enableJoinFactor = false);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* optimize a linear factor graph
|
* optimize a linear factor graph
|
||||||
|
|
@ -146,7 +146,7 @@ namespace gtsam {
|
||||||
* @param enableJoinFactor uses the older joint factor combine process when true,
|
* @param enableJoinFactor uses the older joint factor combine process when true,
|
||||||
* and when false uses the newer single matrix combine
|
* and when false uses the newer single matrix combine
|
||||||
*/
|
*/
|
||||||
VectorConfig optimize(const Ordering& ordering, bool enableJoinFactor = true);
|
VectorConfig optimize(const Ordering& ordering, bool enableJoinFactor = false);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* shared pointer versions for MATLAB
|
* shared pointer versions for MATLAB
|
||||||
|
|
|
||||||
|
|
@ -762,11 +762,11 @@ TEST ( GaussianFactor, combine_matrix ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ************************************************************************* */
|
/* ************************************************************************* */
|
||||||
// FIXME: Executing this test results in a memory corruption error that
|
|
||||||
// crashes out and prints a stack trace on Ubuntu.
|
|
||||||
TEST ( GaussianFactor, exploding_MAST_factor ) {
|
TEST ( GaussianFactor, exploding_MAST_factor ) {
|
||||||
|
// Test derived from a crashing error in MAST
|
||||||
|
// Works properly with the newer elimination code
|
||||||
|
// This is only a test of execution without crashing
|
||||||
|
|
||||||
// Tried switching to a different number, still same problem
|
|
||||||
Symbol lA2('l', 18295873486192642);
|
Symbol lA2('l', 18295873486192642);
|
||||||
Matrix A1 = eye(2);
|
Matrix A1 = eye(2);
|
||||||
Vector b1 = zero(2);
|
Vector b1 = zero(2);
|
||||||
|
|
@ -785,8 +785,9 @@ TEST ( GaussianFactor, exploding_MAST_factor ) {
|
||||||
fg.push_back(f1);
|
fg.push_back(f1);
|
||||||
fg.push_back(f2);
|
fg.push_back(f2);
|
||||||
|
|
||||||
// FIXME: Uncomment to cause the error
|
// works when using the newer implementation of eliminate
|
||||||
//GaussianConditional::shared_ptr cg = fg.eliminateOne(lA2);
|
GaussianConditional::shared_ptr cg = fg.eliminateOne(lA2);
|
||||||
|
CHECK(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue