This forum has been archived. All content is frozen. Please use KDE Discuss instead.

SPQRSupport linking problem

Tags: None
(comma "," separated)
User avatar
Hecke
Registered Member
Posts
16
Karma
0

SPQRSupport linking problem

Wed Nov 12, 2014 11:19 am
Hi all,

I am trying to speed up my QR decomposition by using the SuiteSparse version.

I am really glad to have found the SPQR support module and the cmake modules to find both SPQR and Cholmod.

But somehow I get an error when linking my program, which seems to reside inside the wrapper-suiteSparse communication. Maybe this is a version problem? SuiteSparse is the latest version, Eigen is one or two months old...

Code: Select all
CMakeFiles/karman.dir/karman.cpp.o: In function `Eigen::SPQR<Eigen::SparseMatrix<double, 0, int> >::SPQR()':
karman.cpp:(.text._ZN5Eigen4SPQRINS_12SparseMatrixIdLi0EiEEEC2Ev[_ZN5Eigen4SPQRINS_12SparseMatrixIdLi0EiEEEC5Ev]+0x5e): undefined reference to `cholmod_l_start'
CMakeFiles/karman.dir/karman.cpp.o: In function `Eigen::SPQR<Eigen::SparseMatrix<double, 0, int> >::~SPQR()':
karman.cpp:(.text._ZN5Eigen4SPQRINS_12SparseMatrixIdLi0EiEEED2Ev[_ZN5Eigen4SPQRINS_12SparseMatrixIdLi0EiEEED5Ev]+0x27): undefined reference to `cholmod_l_finish'
CMakeFiles/karman.dir/karman.cpp.o: In function `Eigen::SPQR<Eigen::SparseMatrix<double, 0, int> >::compute(Eigen::SparseMatrix<double, 0, int> const&)':
karman.cpp:(.text._ZN5Eigen4SPQRINS_12SparseMatrixIdLi0EiEEE7computeERKS2_[_ZN5Eigen4SPQRINS_12SparseMatrixIdLi0EiEEE7computeERKS2_]+0x180): undefined reference to `long SuiteSparseQR<double>(int, double, long, cholmod_sparse_struct*, cholmod_sparse_struct**, long**, cholmod_sparse_struct**, long**, cholmod_dense_struct**, cholmod_common_struct*)'
CMakeFiles/karman.dir/karman.cpp.o: In function `Eigen::SPQR<Eigen::SparseMatrix<double, 0, int> >::SPQR_free()':
karman.cpp:(.text._ZN5Eigen4SPQRINS_12SparseMatrixIdLi0EiEEE9SPQR_freeEv[_ZN5Eigen4SPQRINS_12SparseMatrixIdLi0EiEEE9SPQR_freeEv]+0x26): undefined reference to `cholmod_l_free_sparse'
karman.cpp:(.text._ZN5Eigen4SPQRINS_12SparseMatrixIdLi0EiEEE9SPQR_freeEv[_ZN5Eigen4SPQRINS_12SparseMatrixIdLi0EiEEE9SPQR_freeEv]+0x44): undefined reference to `cholmod_l_free_sparse'
karman.cpp:(.text._ZN5Eigen4SPQRINS_12SparseMatrixIdLi0EiEEE9SPQR_freeEv[_ZN5Eigen4SPQRINS_12SparseMatrixIdLi0EiEEE9SPQR_freeEv]+0x62): undefined reference to `cholmod_l_free_dense'
CMakeFiles/karman.dir/karman.cpp.o: In function `void Eigen::SPQR_QProduct<Eigen::SPQR<Eigen::SparseMatrix<double, 0, int> >, Eigen::Matrix<double, -1, 1, 0, -1, 1> >::evalTo<Eigen::Matrix<double, -1, 1, 0, -1, 1> >(Eigen::Matrix<double, -1, 1, 0, -1, 1>&) const':
karman.cpp:(.text._ZNK5Eigen13SPQR_QProductINS_4SPQRINS_12SparseMatrixIdLi0EiEEEENS_6MatrixIdLin1ELi1ELi0ELin1ELi1EEEE6evalToIS6_EEvRT_[_ZNK5Eigen13SPQR_QProductINS_4SPQRINS_12SparseMatrixIdLi0EiEEEENS_6MatrixIdLin1ELi1ELi0ELin1ELi1EEEE6evalToIS6_EEvRT_]+0xeb): undefined reference to `cholmod_dense_struct* SuiteSparseQR_qmult<double>(int, cholmod_sparse_struct*, cholmod_dense_struct*, long*, cholmod_dense_struct*, cholmod_common_struct*)'
karman.cpp:(.text._ZNK5Eigen13SPQR_QProductINS_4SPQRINS_12SparseMatrixIdLi0EiEEEENS_6MatrixIdLin1ELi1ELi0ELin1ELi1EEEE6evalToIS6_EEvRT_[_ZNK5Eigen13SPQR_QProductINS_4SPQRINS_12SparseMatrixIdLi0EiEEEENS_6MatrixIdLin1ELi1ELi0ELin1ELi1EEEE6evalToIS6_EEvRT_]+0x13e): undefined reference to `cholmod_l_free_dense'
collect2: error: ld returned 1 exit status
make[2]: *** [karman] Error 1
make[1]: *** [CMakeFiles/karman.dir/all] Error 2
make: *** [all] Error 2


Any help is highly appreciated!

thanks
Hecke
User avatar
Hecke
Registered Member
Posts
16
Karma
0

Re: SPQRSupport linking problem

Wed Nov 12, 2014 12:56 pm
Hm, it seems my cmake skills are pretty much nonexistent. Even though Cholmod is found, there are no paths to be forwarded to the linker. Will close the question when I get somewhere.

thanks for listening
Hecke
User avatar
Hecke
Registered Member
Posts
16
Karma
0

Re: SPQRSupport linking problem

Wed Nov 12, 2014 1:38 pm
still no luck. But fortunately some changing error messages...

Both FindCholmod.cmake and FindSPQR.cmake look for a SuiteSparse Library, which, as far as I see from the installation routine from SuiteSparse does not exist. There is only libspqr.a
Any hints?

thanks
Hecke
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS

Re: SPQRSupport linking problem

Fri Nov 14, 2014 8:39 am
Which version of suitesparse are you using? How did you installed it? manually or from your distro packages? Anyway, you should have much more libraries like libcolamd, libamd, libcholmod, etc.
User avatar
Hecke
Registered Member
Posts
16
Karma
0

Re: SPQRSupport linking problem

Tue Nov 18, 2014 1:23 pm
Hi Gael,

thanks for the answer. Only found it now, sorry.

In the meantime I got the cuda accelerated version of SuiteSparse running from Eigen. But it was far from easy, and I am still trying to figure out what the important steps have been.
I'll do the process again to get the code running on our compute servers, so maybe I end up with a good description on how to enable SuiteSparse with cuda via the SPQRSupport Module.

cheers
Hecke
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS

Re: SPQRSupport linking problem

Wed Nov 19, 2014 7:43 pm
so maybe I end up with a good description on how to enable SuiteSparse with cuda via the SPQRSupport Module.


that would be great!


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]