help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to make SuiteSparse to be recognizable?


From: Sergey Maslennikov
Subject: Re: How to make SuiteSparse to be recognizable?
Date: Fri, 24 Nov 2006 10:52:17 +0300
User-agent: Thunderbird 1.5.0.7 (X11/20060909)

Norbert Hauser wrote:
Sergey,
I had a very similar problem (see my question about umfpack a few days ago).
Fortunately, after putting all headers and libs into one directory as you did, 
I got rid of the warnings about umfpack...cxsparse. But then after the overall 
compilation the linker complained about missing references to METIS_NodeND(), 
camd_realloc() and other camd_...() functions. In config.log I found a message 
that metis.h was present, but a testfile couldn't be compiled. Did you compile 
with metis? Do you have an idea why the linker might have failed?

It would be really helpful if there was some documentation how to install 
SuiteSparse for octave (which download location, which headers and libs to copy 
to which directory, which configure options to set). I didn't find this in any 
faq or documentation.

Norbert

Yes. I have found that there is a requirement to utilize libcholmod with libcamd and probably with libmetis. See, for instance, http://www.cise.ufl.edu/research/sparse/cholmod/. It is written there that cholmod optionally requires camd, but it seems that -lcholmod must be put with -lmetis as well.

Although I'm not sure I go right a way I do modify configure file (Octave-2.9.9) in a manner of:

--------------------8<--------------------------------------------------
--- configure   2006-10-03 00:04:13.000000000 +0400
+++ configure   2006-11-23 18:10:59.000000000 +0300
@@ -17158,7 +17158,7 @@
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lcholmod $AMD_LIBS $COLAMD_LIBS $CCOLAMD_LIBS $BLAS_LIBS $FLIBS -lmetis $LIBS" +LIBS="-lcamd -lcholmod $AMD_LIBS $COLAMD_LIBS $CCOLAMD_LIBS $BLAS_LIBS $FLIBS -lmetis $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -17238,7 +17238,7 @@
 { echo "$as_me:$LINENO: result: $ac_cv_lib_cholmod_cholmod_start" >&5
 echo "${ECHO_T}$ac_cv_lib_cholmod_cholmod_start" >&6; }
 if test $ac_cv_lib_cholmod_cholmod_start = yes; then
-  CHOLMOD_LIBS="-lcholmod -lmetis";
+  CHOLMOD_LIBS="-lcamd -lcholmod -lmetis";
        with_cholmod=yes
 else

@@ -17248,7 +17248,7 @@
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lcholmod $AMD_LIBS $COLAMD_LIBS $CCOLAMD_LIBS $BLAS_LIBS $FLIBS -lmetis $LIBS" +LIBS="-lcamd -lcholmod $AMD_LIBS $COLAMD_LIBS $CCOLAMD_LIBS $BLAS_LIBS $FLIBS -lmetis $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -17328,7 +17328,7 @@
 { echo "$as_me:$LINENO: result: $ac_cv_lib_cholmod_cholmod_start" >&5
 echo "${ECHO_T}$ac_cv_lib_cholmod_cholmod_start" >&6; }
 if test $ac_cv_lib_cholmod_cholmod_start = yes; then
-  CHOLMOD_LIBS="-lcholmod -cblas -lmetis"; with_cholmod=yes
+  CHOLMOD_LIBS="-lcamd -lcholmod -cblas -lmetis"; with_cholmod=yes
 fi

 fi
@@ -17340,7 +17340,7 @@
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lcholmod $AMD_LIBS $COLAMD_LIBS $CCOLAMD_LIBS $BLAS_LIBS $FLIBS $LIBS" +LIBS="-lcamd -lmetis -lcholmod $AMD_LIBS $COLAMD_LIBS $CCOLAMD_LIBS $BLAS_LIBS $FLIBS $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -17420,7 +17420,7 @@
 { echo "$as_me:$LINENO: result: $ac_cv_lib_cholmod_cholmod_start" >&5
 echo "${ECHO_T}$ac_cv_lib_cholmod_cholmod_start" >&6; }
 if test $ac_cv_lib_cholmod_cholmod_start = yes; then
-  CHOLMOD_LIBS="-lcholmod";
+  CHOLMOD_LIBS="-lcamd -lmetis -lcholmod";
        with_cholmod=yes
 else

@@ -17430,7 +17430,7 @@
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lcholmod $AMD_LIBS $COLAMD_LIBS $CCOLAMD_LIBS $BLAS_LIBS $FLIBS $LIBS" +LIBS="-lcamd -lmetis -lcholmod $AMD_LIBS $COLAMD_LIBS $CCOLAMD_LIBS $BLAS_LIBS $FLIBS $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -17510,7 +17510,7 @@
 { echo "$as_me:$LINENO: result: $ac_cv_lib_cholmod_cholmod_start" >&5
 echo "${ECHO_T}$ac_cv_lib_cholmod_cholmod_start" >&6; }
 if test $ac_cv_lib_cholmod_cholmod_start = yes; then
-  CHOLMOD_LIBS="-lcholmod -cblas";
+  CHOLMOD_LIBS="-lcamd -lmetis -lcholmod -cblas";
          with_cholmod=yes
 fi
-------------------->8--------------------------------------------------

It works for me.

Best,

Serge


reply via email to

[Prev in Thread] Current Thread [Next in Thread]