[mlpack-svn] [MLPACK] #300: allknn fails for mnist8m dataset
MLPACK Trac
trac at coffeetalk-1.cc.gatech.edu
Wed Nov 19 17:16:57 EST 2014
#300: allknn fails for mnist8m dataset
----------------------+-----------------------------------------------------
Reporter: rozyang | Owner: rcurtin
Type: defect | Status: accepted
Priority: major | Milestone:
Component: mlpack | Resolution:
Keywords: | Blocking:
Blocked By: 302 |
----------------------+-----------------------------------------------------
Comment (by rcurtin):
Okay, digging into this I think I may have isolated the issue. Here is
what I think happened:
I suggested that you add `#define ARMA_64BIT_WORD` to your program. This
was successful and you were able to rebuild the program just fine and now
the matrix loaded. But `libmlpack.so.1` is compiled without
`ARMA_64BIT_WORD`, meaning that the structs `arma::vec` (for instance) in
`libmlpack.so.1` and `allknn` are different. So when
`NearestNeighborSort::InsertDistance()` (which is in `libmlpack.so.1` and
not `allknn`) is called, everything is misaligned and a segfault happens.
So, I should not have recommended that you add `#define ARMA_64BIT_WORD`
to the top of your program, and I'll remember not to make that suggestion
in the future. Sorry about that. (That *can* work in some situations,
but those situations are specifically when your program happens to only
use templated functions and classes and nothing at all that has been
compiled into `libmlpack.so`.)
Can you try recompiling mlpack against a version of Armadillo with
ARMA_64BIT_WORD enabled? You can do this by changing
`include/armadillo_bits/config.hpp` and uncommenting the line `// #define
ARMA_64BIT_WORD`. I think this will solve your problem; can you let me
know if it does? If not, I'll keep digging... :)
--
Ticket URL: <http://trac.research.cc.gatech.edu/fastlab/ticket/300#comment:14>
MLPACK <www.fast-lab.org>
MLPACK is an intuitive, fast, and scalable C++ machine learning library developed at Georgia Tech.
More information about the mlpack-svn
mailing list