HODLR icon indicating copy to clipboard operation
HODLR copied to clipboard

Python installation failure

Open gregreen opened this issue 9 years ago • 5 comments

The python installation fails with the following error message:

hodlr/_hodlr.cpp: In function ‘int _hodlr_init(_hodlr*, PyObject*, PyObject*)’:
hodlr/_hodlr.cpp:93:42: error: no matching function for call to ‘HODLR_Tree<Gaussian_Matrix>::assemble_Matrix(Eigen::VectorXd&, double&)’
     self->solver->assemble_Matrix(dv, tol);
                                          ^
In file included from hodlr/_hodlr.cpp:6:0:
../header/HODLR_Tree.hpp:73:7: note: candidate: void HODLR_Tree<MatrixType>::assemble_Matrix(HODLR_Node<MatrixType>*&) [with MatrixType = Gaussian_Matrix]
  void assemble_Matrix(HODLR_Node<MatrixType>*& node) {
       ^
../header/HODLR_Tree.hpp:73:7: note:   candidate expects 1 argument, 2 provided
../header/HODLR_Tree.hpp:188:7: note: candidate: void HODLR_Tree<MatrixType>::assemble_Matrix(Eigen::VectorXd&, double, char) [with MatrixType = Gaussian_Matrix; Eigen::VectorXd = Eigen::Matrix<double, -1, 1>]
  void assemble_Matrix(VectorXd& diagonal, double lowRankTolerance, char s) {
       ^
../header/HODLR_Tree.hpp:188:7: note:   candidate expects 3 arguments, 2 provided

It looks like the problem is that char s is not being provided by _hodlr_init to HODLR_Tree<MatrixType>::assemble_Matrix.

gregreen avatar Jun 06 '16 21:06 gregreen

I'm guessing this bug was introduced by https://github.com/sivaramambikasaran/HODLR/commit/c69cf44b96a6594fe8d37b5994044277e8ef2304.

gregreen avatar Jun 06 '16 21:06 gregreen

Hi Greg,

I'd recommend taking a look at the dev version of george (especially the HODLRSolver and the custom kernel tutorial) if you want to use this solver with custom matrices in Python. I'd be inclined to drop Python support from this repo anyways since it would also take some work to get this working with Python 3, for example. If that doesn't work for you, let us know what you're trying to do and maybe we can come up with something.

Thanks!

dfm avatar Jun 07 '16 18:06 dfm

Hi Dan,

Thanks for the tip about George. I came across it soon after finding this bug, and the python support looks much better. I'll give it a try.

Thanks!

gregreen avatar Jun 07 '16 18:06 gregreen

I am interested in studying the properties of this HODLR solver as a kernel approximation tool apart from its ability to solve systems of equations related to GPs. Is it possible to use this HODLR solver to somehow extract the actual matrix entries?

EskreisWinkler avatar Mar 09 '17 20:03 EskreisWinkler

To be specific - I am having trouble seeing how to compute the HODLR approximation of a PSD matrix (which may or may not be based on a specific kernel function). So can I input a matrix with entries that are directly user-specified?

EskreisWinkler avatar Mar 09 '17 20:03 EskreisWinkler