Created attachment 748 [details] example program that exposes the issue I have attached a small program in which the cholmod support module is used with single precision floating point. This does not compile with gcc 6.2. The error message is: eigen/Eigen/src/CholmodSupport/CholmodSupport.h:279:26: error: cannot convert ‘Eigen::CholmodBase<Eigen::SparseMatrix<float>, 2, Eigen::CholmodSimplicialLLT<Eigen::SparseMatrix<float>, 2> >::RealScalar* {aka float*}’ to ‘double*’ for argument ‘2’ to ‘int cholmod_factorize_p(cholmod_sparse*, double*, int*, std::size_t, cholmod_factor*, cholmod_common*)’ cholmod_factorize_p(&A, m_shiftOffset, 0, 0, m_cholmodFactor, &m_cholmod); ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The issue can be fixed by changing m_shiftOffset to double rather than RealScalar. I am using version 4.5.3 of the suitesparse library from the ubuntu 16.10 repository.
Just a small update: I confirm that this is obviously wrong and changing it as suggested makes it compile. However, I tried extending the unit tests to float afterwards, and I always get failed decompositions for float or complex<float>. I'm on Ubuntu 14.10 with libsuitesparse 3.1.0 -- maybe that is already the reason for the failure. (I'll try again on an ubuntu 16.10, as soon as I find the time) I also tested RowMajor and StorageIndex=long matrices which fail (for reasons I think I know how to fix, however).
https://bitbucket.org/eigen/eigen/commits/462c06acd766/ Changeset: 462c06acd766 User: ggael Date: 2016-11-03 09:21:59+00:00 Summary: Bug 1330: Cholmod supports double precision only, so let's trigger a static assertion if the scalar type does not match this requirement. 3.2: https://bitbucket.org/eigen/eigen/commits/41cd950313bc/
-- GitLab Migration Automatic Message -- This bug has been migrated to gitlab.com's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.com/libeigen/eigen/issues/1330.