Compilation fails with SuiteSparse 7.2.0
S-o-T opened this issue · comments
gcc (GCC) 13.2.1 20230801
SuiteSparse 7.2.0
ceres-solver a1c02e8
Compiling fails with following message:
ceres-solver/internal/ceres/covariance_impl.cc: In member function ‘bool ceres::internal::CovarianceImpl::ComputeCovarianceValuesUsingSuiteSparseQR()’:
ceres-solver/internal/ceres/covariance_impl.cc:616:54: error: no matching function for call to ‘SuiteSparseQR<double>(int, double, size_t&, cholmod_sparse*, cholmod_sparse**, int64_t**, cholmod_common*)’
616 | const SuiteSparse_long rank = SuiteSparseQR<double>(
| ~~~~~~~~~~~~~~~~~~~~~^
617 | SPQR_ORDERING_BESTAMD,
| ~~~~~~~~~~~~~~~~~~~~~~
618 | options_.column_pivot_threshold < 0 ? SPQR_DEFAULT_TOL
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
619 | : options_.column_pivot_threshold,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
620 | cholmod_jacobian.ncol,
| ~~~~~~~~~~~~~~~~~~~~~~
621 | &cholmod_jacobian,
| ~~~~~~~~~~~~~~~~~~
622 | &R,
| ~~~
623 | &permutation,
| ~~~~~~~~~~~~~
624 | &cc);
| ~~~~
In file included from ceres-solver/internal/ceres/suitesparse.h:46,
from ceres-solver/internal/ceres/covariance_impl.h:44,
from ceres-solver/internal/ceres/covariance_impl.cc:31:
/usr/include/SuiteSparseQR.hpp:374:55: note: candidate: ‘template<class Entry, class Int> Int SuiteSparseQR(int, double, Int, int, cholmod_sparse*, cholmod_sparse*, cholmod_dense*, cholmod_sparse**, cholmod_dense**, cholmod_sparse**, Int**, cholmod_sparse**, Int**, cholmod_dense**, cholmod_common*)’
374 | template <typename Entry, typename Int = int64_t> Int SuiteSparseQR
| ^~~~~~~~~~~~~
/usr/include/SuiteSparseQR.hpp:374:55: note: candidate expects 15 arguments, 7 provided
/usr/include/SuiteSparseQR.hpp:412:66: note: candidate: ‘template<class Entry, class Int> cholmod_dense* SuiteSparseQR(int, double, cholmod_sparse*, cholmod_dense*, cholmod_common*)’
412 | template <typename Entry, typename Int = int64_t> cholmod_dense *SuiteSparseQR
| ^~~~~~~~~~~~~
/usr/include/SuiteSparseQR.hpp:412:66: note: candidate expects 5 arguments, 7 provided
/usr/include/SuiteSparseQR.hpp:422:66: note: candidate: ‘template<class Entry, class Int> cholmod_dense* SuiteSparseQR(cholmod_sparse*, cholmod_dense*, cholmod_common*)’
422 | template <typename Entry, typename Int = int64_t> cholmod_dense *SuiteSparseQR
| ^~~~~~~~~~~~~
/usr/include/SuiteSparseQR.hpp:422:66: note: candidate expects 3 arguments, 7 provided
/usr/include/SuiteSparseQR.hpp:430:67: note: candidate: ‘template<class Entry, class Int> cholmod_sparse* SuiteSparseQR(int, double, cholmod_sparse*, cholmod_sparse*, cholmod_common*)’
430 | template <typename Entry, typename Int = int64_t> cholmod_sparse *SuiteSparseQR
| ^~~~~~~~~~~~~
/usr/include/SuiteSparseQR.hpp:430:67: note: candidate expects 5 arguments, 7 provided
/usr/include/SuiteSparseQR.hpp:440:55: note: candidate: ‘template<class Entry, class Int> Int SuiteSparseQR(int, double, Int, cholmod_sparse*, cholmod_sparse**, cholmod_sparse**, Int**, cholmod_common*)’
440 | template <typename Entry, typename Int = int64_t> Int SuiteSparseQR
| ^~~~~~~~~~~~~
/usr/include/SuiteSparseQR.hpp:440:55: note: candidate expects 8 arguments, 7 provided
/usr/include/SuiteSparseQR.hpp:455:55: note: candidate: ‘template<class Entry, class Int> Int SuiteSparseQR(int, double, Int, cholmod_sparse*, cholmod_sparse**, Int**, cholmod_common*)’
455 | template <typename Entry, typename Int = int64_t> Int SuiteSparseQR
| ^~~~~~~~~~~~~
/usr/include/SuiteSparseQR.hpp:455:55: note: template argument deduction/substitution failed:
ceres-solver/internal/ceres/covariance_impl.cc:616:54: note: deduced conflicting types for parameter ‘Int’ (‘long unsigned int’ and ‘int64_t’ {aka ‘long int’})
616 | const SuiteSparse_long rank = SuiteSparseQR<double>(
| ~~~~~~~~~~~~~~~~~~~~~^
617 | SPQR_ORDERING_BESTAMD,
| ~~~~~~~~~~~~~~~~~~~~~~
618 | options_.column_pivot_threshold < 0 ? SPQR_DEFAULT_TOL
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
619 | : options_.column_pivot_threshold,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
620 | cholmod_jacobian.ncol,
| ~~~~~~~~~~~~~~~~~~~~~~
621 | &cholmod_jacobian,
| ~~~~~~~~~~~~~~~~~~
622 | &R,
| ~~~
623 | &permutation,
| ~~~~~~~~~~~~~
624 | &cc);
| ~~~~
/usr/include/SuiteSparseQR.hpp:469:55: note: candidate: ‘template<class Entry, class Int> Int SuiteSparseQR(int, double, Int, cholmod_sparse*, cholmod_dense*, cholmod_dense**, cholmod_sparse**, Int**, cholmod_common*)’
469 | template <typename Entry, typename Int = int64_t> Int SuiteSparseQR
| ^~~~~~~~~~~~~
/usr/include/SuiteSparseQR.hpp:469:55: note: candidate expects 9 arguments, 7 provided
/usr/include/SuiteSparseQR.hpp:485:55: note: candidate: ‘template<class Entry, class Int> Int SuiteSparseQR(int, double, Int, cholmod_sparse*, cholmod_sparse*, cholmod_sparse**, cholmod_sparse**, Int**, cholmod_common*)’
485 | template <typename Entry, typename Int = int64_t> Int SuiteSparseQR
| ^~~~~~~~~~~~~
/usr/include/SuiteSparseQR.hpp:485:55: note: candidate expects 9 arguments, 7 provided
/usr/include/SuiteSparseQR.hpp:501:55: note: candidate: ‘template<class Entry, class Int> Int SuiteSparseQR(int, double, Int, cholmod_sparse*, cholmod_sparse**, Int**, cholmod_sparse**, Int**, cholmod_dense**, cholmod_common*)’
501 | template <typename Entry, typename Int = int64_t> Int SuiteSparseQR
| ^~~~~~~~~~~~~
/usr/include/SuiteSparseQR.hpp:501:55: note: candidate expects 10 arguments, 7 provided
The issue is that in 7.2.0 template of SuiteSparseQR obtained a second template argument which is failing to get deduced due to implicit cast of cholmod_jacobian.ncol
Thanks Mark, I think we are going to have to do a point release to deal
with the latest version of suitesparse.
…On Sun, Sep 17, 2023, 12:16 PM Mark Shachkov ***@***.***> wrote:
gcc (GCC) 13.2.1 20230801
SuiteSparse 7.2.0
ceres-solver a1c02e8
<a1c02e8>
Compiling fails with following message:
ceres-solver/internal/ceres/covariance_impl.cc: In member function ‘bool ceres::internal::CovarianceImpl::ComputeCovarianceValuesUsingSuiteSparseQR()’:
ceres-solver/internal/ceres/covariance_impl.cc:616:54: error: no matching function for call to ‘SuiteSparseQR<double>(int, double, size_t&, cholmod_sparse*, cholmod_sparse**, int64_t**, cholmod_common*)’
616 | const SuiteSparse_long rank = SuiteSparseQR<double>(
| ~~~~~~~~~~~~~~~~~~~~~^
617 | SPQR_ORDERING_BESTAMD,
| ~~~~~~~~~~~~~~~~~~~~~~
618 | options_.column_pivot_threshold < 0 ? SPQR_DEFAULT_TOL
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
619 | : options_.column_pivot_threshold,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
620 | cholmod_jacobian.ncol,
| ~~~~~~~~~~~~~~~~~~~~~~
621 | &cholmod_jacobian,
| ~~~~~~~~~~~~~~~~~~
622 | &R,
| ~~~
623 | &permutation,
| ~~~~~~~~~~~~~
624 | &cc);
| ~~~~
In file included from ceres-solver/internal/ceres/suitesparse.h:46,
from ceres-solver/internal/ceres/covariance_impl.h:44,
from ceres-solver/internal/ceres/covariance_impl.cc:31:
/usr/include/SuiteSparseQR.hpp:374:55: note: candidate: ‘template<class Entry, class Int> Int SuiteSparseQR(int, double, Int, int, cholmod_sparse*, cholmod_sparse*, cholmod_dense*, cholmod_sparse**, cholmod_dense**, cholmod_sparse**, Int**, cholmod_sparse**, Int**, cholmod_dense**, cholmod_common*)’
374 | template <typename Entry, typename Int = int64_t> Int SuiteSparseQR
| ^~~~~~~~~~~~~
/usr/include/SuiteSparseQR.hpp:374:55: note: candidate expects 15 arguments, 7 provided
/usr/include/SuiteSparseQR.hpp:412:66: note: candidate: ‘template<class Entry, class Int> cholmod_dense* SuiteSparseQR(int, double, cholmod_sparse*, cholmod_dense*, cholmod_common*)’
412 | template <typename Entry, typename Int = int64_t> cholmod_dense *SuiteSparseQR
| ^~~~~~~~~~~~~
/usr/include/SuiteSparseQR.hpp:412:66: note: candidate expects 5 arguments, 7 provided
/usr/include/SuiteSparseQR.hpp:422:66: note: candidate: ‘template<class Entry, class Int> cholmod_dense* SuiteSparseQR(cholmod_sparse*, cholmod_dense*, cholmod_common*)’
422 | template <typename Entry, typename Int = int64_t> cholmod_dense *SuiteSparseQR
| ^~~~~~~~~~~~~
/usr/include/SuiteSparseQR.hpp:422:66: note: candidate expects 3 arguments, 7 provided
/usr/include/SuiteSparseQR.hpp:430:67: note: candidate: ‘template<class Entry, class Int> cholmod_sparse* SuiteSparseQR(int, double, cholmod_sparse*, cholmod_sparse*, cholmod_common*)’
430 | template <typename Entry, typename Int = int64_t> cholmod_sparse *SuiteSparseQR
| ^~~~~~~~~~~~~
/usr/include/SuiteSparseQR.hpp:430:67: note: candidate expects 5 arguments, 7 provided
/usr/include/SuiteSparseQR.hpp:440:55: note: candidate: ‘template<class Entry, class Int> Int SuiteSparseQR(int, double, Int, cholmod_sparse*, cholmod_sparse**, cholmod_sparse**, Int**, cholmod_common*)’
440 | template <typename Entry, typename Int = int64_t> Int SuiteSparseQR
| ^~~~~~~~~~~~~
/usr/include/SuiteSparseQR.hpp:440:55: note: candidate expects 8 arguments, 7 provided
/usr/include/SuiteSparseQR.hpp:455:55: note: candidate: ‘template<class Entry, class Int> Int SuiteSparseQR(int, double, Int, cholmod_sparse*, cholmod_sparse**, Int**, cholmod_common*)’
455 | template <typename Entry, typename Int = int64_t> Int SuiteSparseQR
| ^~~~~~~~~~~~~
/usr/include/SuiteSparseQR.hpp:455:55: note: template argument deduction/substitution failed:
ceres-solver/internal/ceres/covariance_impl.cc:616:54: note: deduced conflicting types for parameter ‘Int’ (‘long unsigned int’ and ‘int64_t’ {aka ‘long int’})
616 | const SuiteSparse_long rank = SuiteSparseQR<double>(
| ~~~~~~~~~~~~~~~~~~~~~^
617 | SPQR_ORDERING_BESTAMD,
| ~~~~~~~~~~~~~~~~~~~~~~
618 | options_.column_pivot_threshold < 0 ? SPQR_DEFAULT_TOL
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
619 | : options_.column_pivot_threshold,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
620 | cholmod_jacobian.ncol,
| ~~~~~~~~~~~~~~~~~~~~~~
621 | &cholmod_jacobian,
| ~~~~~~~~~~~~~~~~~~
622 | &R,
| ~~~
623 | &permutation,
| ~~~~~~~~~~~~~
624 | &cc);
| ~~~~
/usr/include/SuiteSparseQR.hpp:469:55: note: candidate: ‘template<class Entry, class Int> Int SuiteSparseQR(int, double, Int, cholmod_sparse*, cholmod_dense*, cholmod_dense**, cholmod_sparse**, Int**, cholmod_common*)’
469 | template <typename Entry, typename Int = int64_t> Int SuiteSparseQR
| ^~~~~~~~~~~~~
/usr/include/SuiteSparseQR.hpp:469:55: note: candidate expects 9 arguments, 7 provided
/usr/include/SuiteSparseQR.hpp:485:55: note: candidate: ‘template<class Entry, class Int> Int SuiteSparseQR(int, double, Int, cholmod_sparse*, cholmod_sparse*, cholmod_sparse**, cholmod_sparse**, Int**, cholmod_common*)’
485 | template <typename Entry, typename Int = int64_t> Int SuiteSparseQR
| ^~~~~~~~~~~~~
/usr/include/SuiteSparseQR.hpp:485:55: note: candidate expects 9 arguments, 7 provided
/usr/include/SuiteSparseQR.hpp:501:55: note: candidate: ‘template<class Entry, class Int> Int SuiteSparseQR(int, double, Int, cholmod_sparse*, cholmod_sparse**, Int**, cholmod_sparse**, Int**, cholmod_dense**, cholmod_common*)’
501 | template <typename Entry, typename Int = int64_t> Int SuiteSparseQR
| ^~~~~~~~~~~~~
/usr/include/SuiteSparseQR.hpp:501:55: note: candidate expects 10 arguments, 7 provided
The issue is that in 7.2.0 template of SuiteSparseQR obtained a second
template argument which is failing to get deduced due to implicit cast of
cholmod_jacobian.ncol
—
Reply to this email directly, view it on GitHub
<#1008>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AANCABKLSJOZFOOHWEAVDJDX25D7HANCNFSM6AAAAAA43ZVDBM>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
@sandwichmaker a new release would certainly make things easier, any timeline for it? Thanks!