[mlpack-git] [mlpack] AllkNNTest failing in 3 test cases (#573)

Ozair Shafiq notifications at github.com
Mon Mar 14 14:03:51 EDT 2016


I recently installed mlpack and tried running some test programs from source such as allknn_test.cpp by running mlpack_test -t AllkNNTest and this the output I got:
Running 21 test cases...
mlpack_test: /home/ozair/programming/mlpack/src/mlpack/../mlpack/core/tree/rectangle_tree/rectangle_tree_impl.hpp:882: bool mlpack::tree::RectangleTree<MetricType, StatisticType, MatType, SplitType, DescentType>::ShrinkBoundForPoint(const vec&) [with MetricType = mlpack::metric::LMetric<2, true>; StatisticType = mlpack::neighbor::NeighborSearchStat<mlpack::neighbor::NearestNeighborSort>; MatType = arma::Mat<double>; SplitType = mlpack::tree::RStarTreeSplit; DescentType = mlpack::tree::RStarTreeDescentHeuristic; arma::vec = arma::Col<double>]: Assertion `false' failed.
unknown location(0): fatal error in "KNNModelTest": signal: SIGABRT (application abort requested)
/home/ozair/programming/mlpack/src/mlpack/tests/allknn_test.cpp(1027): last checkpoint
unknown location(0): fatal error in "KNNModelMonochromaticTest": std::runtime_error: Timer::Start(): timer 'tree_building' has already been started
/home/ozair/programming/mlpack/src/mlpack/tests/allknn_test.cpp(1027): last checkpoint
unknown location(0): fatal error in "NeighborPtrDeleteTest": std::runtime_error: Timer::Start(): timer 'tree_building' has already been started
/home/ozair/programming/mlpack/src/mlpack/tests/allknn_test.cpp(1115): last checkpoint

*** 3 failures detected in test suite "mlpackTest"

It seems that the test is failing on three test cases:
KNNModelTest
KNNModelMonochromaticTest
NeighborPtrDeleteTest

It seems like there is assertion failure at line 882 when allocating a RectangleTree object. Also, in source file allknn_test.cpp, in BOOST_AUTO_TEST_CASE(KNNModelMonochromaticTest), we are declaring an array of type KNNModel, at line 1052, while assigning a new kNNModel object at the highest index of the array, the code at the line references to models[0] instead of models[9], Hence, at the inner loop where the program is accessing the models array at i = 9, I think this will cause a memory exception because the object at this location was not assigned. But, I've yet to rebuild the program and test it out for myself yet.

Regards.


---
Reply to this email directly or view it on GitHub:
https://github.com/mlpack/mlpack/issues/573
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160314/bd55fc60/attachment.html>


More information about the mlpack-git mailing list