-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FAILURE (Can't use SPARSE_NORMAL_CHOLESKY with SUITESPARSE because SuiteSparse was not enabled when Ceres was built.) #197
Comments
@edgarriba It would be helpful if you could include the CMake output when you are building Ceres |
sure. This is my CMake output: -- Detected Ceres version: 1.12.0 from /home/eriba/software/ceres-solver/include/ceres/version.h =============================================================== Your version of Eigen is older than version 3.2.2.
|
"-- Enabling CERES_USE_EIGEN_SPARSE in Ceres config.h" disable CERES_USE_EIGEN_SPARSE |
why does that make a difference? On Mon, Feb 29, 2016 at 12:13 PM Chris Sweeney notifications@github.com
|
Not sure why CERES_NO_SUITESPARSE is being set unless it is being overwritten somewhere. I never touch this (or any other Ceres external libs params/macros) in Theia. |
can you replicate this bug chris? On Mon, Feb 29, 2016 at 12:26 PM Chris Sweeney notifications@github.com
|
No I have not been able to On Mon, Feb 29, 2016 at 12:27 PM Sameer Agarwal notifications@github.com
|
@alexsmac any idea how to debug this? |
Does it has something to do the fact that ceres is built as static? |
another thing that I've noticed is that during installation nothing is copied in /usr/local/share/Ceres |
What does the first line from Solver::Summary::FullReport() say for your current Ceres installation? The one you posted earlier for Theia had this: Solver Summary (v 1.10.0-lapack-no_openmp) when it should be something more like this: Solver Summary (v 1.12.0-eigen-(3.2.5)-lapack-suitesparse-(4.4.4)-cxsparse-(3.1.4)-no_openmp) given the configuration output you posted above. I suspect that Theia is linking/linked (if static) against an older version of Ceres installed on your machine. Checking the contents of Ceres_DIR in the advanced view in the CMake GUI when building Theia should tell you which one it is using. Note that this should be the path to the directory containing CeresConfig.cmake (e.g. /usr/local/lib/cmake/Ceres). To answer your question about /usr/local/share/Ceres, as of 1.12+, that is no longer used, we use the (potentially) architecture dependent install location: /usr/local/lib<OPTIONAL_PREFIX>/cmake/Ceres. One way that Theia could be picking up an old Ceres build would be if you exported the Ceres build directory (instead of installing it) by enabling EXPORT_BUILD_DIR. You can easily check for this by looking at the contents of ~/.cmake/packages/Ceres. If that contains any files (which should have SHA codes for names, and contain the full path to a Ceres build directory) which point to existing Ceres build directories, then they will be used in preference to an installed version of Ceres. |
Definitely we have a Poltergeist here. I've checked the Ceres_DIR from Theia and is set with its default value (/usr/local/lib/cmake/Ceres). I've also checked in ~/.cmake/packages/Ceres and you were right, there was a file, but it was pointing to the new ceres version. To be sure I removed this file and compiled again setting the EXPORT_BUILD_DIR flag to OFF. Same result. |
But what does the first line from Solver::Summary::FullReport() say for your current Ceres installation? Are you still seeing this: Solver Summary (v 1.10.0-lapack-no_openmp) ? Or something more like this: Solver Summary (v 1.12.0-eigen-(3.2.5)-lapack-suitesparse-(4.4.4)-cxsparse-(3.1.4)-no_openmp) |
yes, same summary as before. Each time I uninstall ceres, theia complains about that, so theia is linking the current ceres version. |
Is it possible for Theia to detect at Cmake time if Ceres was built with SuiteSparse? If so, I could at least have Cmake halt since SuiteSparse is needed for sparse BA in Theia |
@sweeneychris - try this: https://ceres-solver-review.googlesource.com/#/c/7370 It still needs a docs update, but should give you an idea of how it might work - feedback welcome :) |
@sweeneychris the CL has now been merged into master, so you can do things like this: find_package(Ceres REQUIRED SuiteSparse) or: find_package(Ceres REQUIRED SparseLinearAlgebraLibrary) to get check for at least one sparse matrix backend) (SuiteSparse OR EigenSparse OR CXSparse). This will be backwards compatible in a way, in that find_package(Ceres REQUIRED SparseLinearAlgebraLibrary) should report Ceres as found even on older Ceres installs that predate this change. However - it will obviously report Ceres as found without checking whether the specified modules are present. |
Awesome, this is great @alexsmac thanks for the patch! @edgarriba If you sync to the latest master branch of Theia, it now explicitly requries SuiteSparse (independently of this Ceres patch) since CHOLMOD is being used for solving some large sparse systems. |
I am still experiencing this issue in my project on gcc4.8. How exactly do you fix this? |
Hi guys,
I'm using TheiaSfM which has ceres as a dependency and got the following exception error when running the global pipeline:
I'm pretty sure that I compiled ceres with a sparse solver (tried with Suitesparse, CXSparse and Eigensparse). Did you notice any similar issue in this direction?
PD: you can check the short chat I had with Theia author **** and the complete log I got.
The text was updated successfully, but these errors were encountered: