# HG changeset patch # User jwe # Date 1192647731 0 # Node ID daff886a8e2a5428a27a1c1926bb6b18b27859a9 # Parent a2000c2b5e7dd782ca4626fb1d6e151e4936f744 [project @ 2007-10-17 19:02:10 by jwe] diff -r a2000c2b5e7d -r daff886a8e2a ChangeLog --- a/ChangeLog Wed Oct 17 15:38:54 2007 +0000 +++ b/ChangeLog Wed Oct 17 19:02:11 2007 +0000 @@ -1,3 +1,7 @@ +2007-10-17 John W. Eaton + + * configure.in: Delete checks for METIS. + 2007-10-12 John W. Eaton * mk-opts.pl (parse_input): Allow comment lines beginning with #. diff -r a2000c2b5e7d -r daff886a8e2a configure.in --- a/configure.in Wed Oct 17 15:38:54 2007 +0000 +++ b/configure.in Wed Oct 17 19:02:11 2007 +0000 @@ -29,7 +29,7 @@ EXTERN_CXXFLAGS="$CXXFLAGS" AC_INIT -AC_REVISION($Revision: 1.581 $) +AC_REVISION($Revision: 1.582 $) AC_PREREQ(2.57) AC_CONFIG_SRCDIR([src/octave.cc]) AC_CONFIG_HEADER(config.h) @@ -968,27 +968,12 @@ test "$with_ccolamd" = yes && test "$with_amd" = yes; then with_cholmod=no AC_CHECK_HEADERS([suitesparse/cholmod.h ufsparse/cholmod.h cholmod/cholmod.h cholmod.h], [ - AC_CHECK_HEADERS([suitesparse/metis.h ufsparse/metis.h metis/metis.h metis.h], [ - AC_CHECK_LIB(metis, METIS_NodeND, with_metis=yes, with_metis=no) - break], - with_metis=no) - - if test "$with_metis" = yes; then - AC_DEFINE(HAVE_METIS, 1, [Define if the METIS library is used.]) - AC_CHECK_LIB(cholmod, cholmod_start, [CHOLMOD_LIBS="-lcholmod -lmetis"; - with_cholmod=yes], [ - AC_CHECK_LIB(cholmod, cholmod_start, - [CHOLMOD_LIBS="-lcholmod -cblas -lmetis"; with_cholmod=yes], [], - $CAMD_LIBS $AMD_LIBS $COLAMD_LIBS $CCOLAMD_LIBS $BLAS_LIBS $FLIBS -lmetis)], - $CAMD_LIBS $AMD_LIBS $COLAMD_LIBS $CCOLAMD_LIBS $BLAS_LIBS $FLIBS -lmetis) - else - AC_CHECK_LIB(cholmod, cholmod_start, [CHOLMOD_LIBS="-lcholmod"; - with_cholmod=yes], [ - AC_CHECK_LIB(cholmod, cholmod_start, [CHOLMOD_LIBS="-lcholmod -cblas"; - with_cholmod=yes], [], - $CAMD_LIBS $AMD_LIBS $COLAMD_LIBS $CCOLAMD_LIBS $BLAS_LIBS $FLIBS)], - $CAMD_LIBS $AMD_LIBS $COLAMD_LIBS $CCOLAMD_LIBS $BLAS_LIBS $FLIBS) - fi + AC_CHECK_LIB(cholmod, cholmod_start, [CHOLMOD_LIBS="-lcholmod"; + with_cholmod=yes], [ + AC_CHECK_LIB(cholmod, cholmod_start, [CHOLMOD_LIBS="-lcholmod -cblas"; + with_cholmod=yes], [], + $CAMD_LIBS $AMD_LIBS $COLAMD_LIBS $CCOLAMD_LIBS $BLAS_LIBS $FLIBS)], + $CAMD_LIBS $AMD_LIBS $COLAMD_LIBS $CCOLAMD_LIBS $BLAS_LIBS $FLIBS) if test "$with_cholmod" = yes; then AC_DEFINE(HAVE_CHOLMOD, 1, [Define if the CHOLMOD library is used.]) diff -r a2000c2b5e7d -r daff886a8e2a liboctave/CSparse.cc --- a/liboctave/CSparse.cc Wed Oct 17 15:38:54 2007 +0000 +++ b/liboctave/CSparse.cc Wed Oct 17 19:02:11 2007 +0000 @@ -5770,23 +5770,6 @@ cm->complex_divide = CHOLMOD_NAME(divcomplex); cm->hypotenuse = CHOLMOD_NAME(hypot); -#ifdef HAVE_METIS - // METIS 4.0.1 uses malloc and free, and will terminate if - // it runs out of memory. Use CHOLMOD's memory guard for - // METIS, which allocates a huge block of memory (and then - // immediately frees it) before calling METIS - cm->metis_memory = 2.0; - -#if defined(METIS_VERSION) -#if (METIS_VERSION >= METIS_VER(4,0,2)) - // METIS 4.0.2 uses function pointers for malloc and free. - METIS_malloc = cm->malloc_memory; - METIS_free = cm->free_memory; - // Turn off METIS memory guard. - cm->metis_memory = 0.0; -#endif -#endif -#endif cm->final_ll = true; cholmod_sparse Astore; @@ -6030,26 +6013,6 @@ cm->complex_divide = CHOLMOD_NAME(divcomplex); cm->hypotenuse = CHOLMOD_NAME(hypot); -#ifdef HAVE_METIS - // METIS 4.0.1 uses malloc and free, and will terminate MATLAB if - // it runs out of memory. Use CHOLMOD's memory guard for METIS, - // which mxMalloc's a huge block of memory (and then immediately - // mxFree's it) before calling METIS - cm->metis_memory = 2.0; - -#if defined(METIS_VERSION) -#if (METIS_VERSION >= METIS_VER(4,0,2)) - // METIS 4.0.2 uses function pointers for malloc and free - METIS_malloc = cm->malloc_memory; - METIS_free = cm->free_memory; - // Turn off METIS memory guard. It is not needed, because mxMalloc - // will safely terminate the mexFunction and free any workspace - // without killing all of octave. - cm->metis_memory = 0.0; -#endif -#endif -#endif - cm->final_ll = true; cholmod_sparse Astore; @@ -6341,26 +6304,6 @@ cm->complex_divide = CHOLMOD_NAME(divcomplex); cm->hypotenuse = CHOLMOD_NAME(hypot); -#ifdef HAVE_METIS - // METIS 4.0.1 uses malloc and free, and will terminate MATLAB if - // it runs out of memory. Use CHOLMOD's memory guard for METIS, - // which mxMalloc's a huge block of memory (and then immediately - // mxFree's it) before calling METIS - cm->metis_memory = 2.0; - -#if defined(METIS_VERSION) -#if (METIS_VERSION >= METIS_VER(4,0,2)) - // METIS 4.0.2 uses function pointers for malloc and free - METIS_malloc = cm->malloc_memory; - METIS_free = cm->free_memory; - // Turn off METIS memory guard. It is not needed, because mxMalloc - // will safely terminate the mexFunction and free any workspace - // without killing all of octave. - cm->metis_memory = 0.0; -#endif -#endif -#endif - cm->final_ll = true; cholmod_sparse Astore; @@ -6583,26 +6526,6 @@ cm->complex_divide = CHOLMOD_NAME(divcomplex); cm->hypotenuse = CHOLMOD_NAME(hypot); -#ifdef HAVE_METIS - // METIS 4.0.1 uses malloc and free, and will terminate MATLAB if - // it runs out of memory. Use CHOLMOD's memory guard for METIS, - // which mxMalloc's a huge block of memory (and then immediately - // mxFree's it) before calling METIS - cm->metis_memory = 2.0; - -#if defined(METIS_VERSION) -#if (METIS_VERSION >= METIS_VER(4,0,2)) - // METIS 4.0.2 uses function pointers for malloc and free - METIS_malloc = cm->malloc_memory; - METIS_free = cm->free_memory; - // Turn off METIS memory guard. It is not needed, because mxMalloc - // will safely terminate the mexFunction and free any workspace - // without killing all of octave. - cm->metis_memory = 0.0; -#endif -#endif -#endif - cm->final_ll = true; cholmod_sparse Astore; diff -r a2000c2b5e7d -r daff886a8e2a liboctave/ChangeLog --- a/liboctave/ChangeLog Wed Oct 17 15:38:54 2007 +0000 +++ b/liboctave/ChangeLog Wed Oct 17 19:02:11 2007 +0000 @@ -1,3 +1,12 @@ +2007-10-17 John W. Eaton + + * oct-sparse.h: Don't include metis.h. + + * dSparse.cc (SparseMatrix::fsolve): Delete special code for METIS. + * CSparse.cc (SparseComplexMatrix::fsolve): Likewise. + * sparse-base-chol.cc (sparse_base_chol::sparse_base_chol_rep::init): Likewise. + 2007-10-16 John W. Eaton * dMatrix.cc (Matrix::inverse): Only check rcond == 0 if the diff -r a2000c2b5e7d -r daff886a8e2a liboctave/dSparse.cc --- a/liboctave/dSparse.cc Wed Oct 17 15:38:54 2007 +0000 +++ b/liboctave/dSparse.cc Wed Oct 17 19:02:11 2007 +0000 @@ -5986,24 +5986,6 @@ cm->complex_divide = CHOLMOD_NAME(divcomplex); cm->hypotenuse = CHOLMOD_NAME(hypot); -#ifdef HAVE_METIS - // METIS 4.0.1 uses malloc and free, and will terminate if - // it runs out of memory. Use CHOLMOD's memory guard for - // METIS, which allocates a huge block of memory (and then - // immediately frees it) before calling METIS - cm->metis_memory = 2.0; - -#if defined(METIS_VERSION) -#if (METIS_VERSION >= METIS_VER(4,0,2)) - // METIS 4.0.2 uses function pointers for malloc and free. - METIS_malloc = cm->malloc_memory; - METIS_free = cm->free_memory; - // Turn off METIS memory guard. - cm->metis_memory = 0.0; -#endif -#endif -#endif - cm->final_ll = true; cholmod_sparse Astore; @@ -6220,26 +6202,6 @@ cm->complex_divide = CHOLMOD_NAME(divcomplex); cm->hypotenuse = CHOLMOD_NAME(hypot); -#ifdef HAVE_METIS - // METIS 4.0.1 uses malloc and free, and will terminate MATLAB if - // it runs out of memory. Use CHOLMOD's memory guard for METIS, - // which mxMalloc's a huge block of memory (and then immediately - // mxFree's it) before calling METIS - cm->metis_memory = 2.0; - -#if defined(METIS_VERSION) -#if (METIS_VERSION >= METIS_VER(4,0,2)) - // METIS 4.0.2 uses function pointers for malloc and free - METIS_malloc = cm->malloc_memory; - METIS_free = cm->free_memory; - // Turn off METIS memory guard. It is not needed, because mxMalloc - // will safely terminate the mexFunction and free any workspace - // without killing all of octave. - cm->metis_memory = 0.0; -#endif -#endif -#endif - cm->final_ll = true; cholmod_sparse Astore; @@ -6502,26 +6464,6 @@ cm->complex_divide = CHOLMOD_NAME(divcomplex); cm->hypotenuse = CHOLMOD_NAME(hypot); -#ifdef HAVE_METIS - // METIS 4.0.1 uses malloc and free, and will terminate MATLAB if - // it runs out of memory. Use CHOLMOD's memory guard for METIS, - // which mxMalloc's a huge block of memory (and then immediately - // mxFree's it) before calling METIS - cm->metis_memory = 2.0; - -#if defined(METIS_VERSION) -#if (METIS_VERSION >= METIS_VER(4,0,2)) - // METIS 4.0.2 uses function pointers for malloc and free - METIS_malloc = cm->malloc_memory; - METIS_free = cm->free_memory; - // Turn off METIS memory guard. It is not needed, because mxMalloc - // will safely terminate the mexFunction and free any workspace - // without killing all of octave. - cm->metis_memory = 0.0; -#endif -#endif -#endif - cm->final_ll = true; cholmod_sparse Astore; @@ -6756,26 +6698,6 @@ cm->complex_divide = CHOLMOD_NAME(divcomplex); cm->hypotenuse = CHOLMOD_NAME(hypot); -#ifdef HAVE_METIS - // METIS 4.0.1 uses malloc and free, and will terminate MATLAB if - // it runs out of memory. Use CHOLMOD's memory guard for METIS, - // which mxMalloc's a huge block of memory (and then immediately - // mxFree's it) before calling METIS - cm->metis_memory = 2.0; - -#if defined(METIS_VERSION) -#if (METIS_VERSION >= METIS_VER(4,0,2)) - // METIS 4.0.2 uses function pointers for malloc and free - METIS_malloc = cm->malloc_memory; - METIS_free = cm->free_memory; - // Turn off METIS memory guard. It is not needed, because mxMalloc - // will safely terminate the mexFunction and free any workspace - // without killing all of octave. - cm->metis_memory = 0.0; -#endif -#endif -#endif - cm->final_ll = true; cholmod_sparse Astore; diff -r a2000c2b5e7d -r daff886a8e2a liboctave/oct-sparse.h --- a/liboctave/oct-sparse.h Wed Oct 17 15:38:54 2007 +0000 +++ b/liboctave/oct-sparse.h Wed Oct 17 19:02:11 2007 +0000 @@ -57,16 +57,6 @@ #include #endif -#if defined (HAVE_SUITESPARSE_METIS_H) -#include -#elif defined (HAVE_UFSPARSE_METIS_H) -#include -#elif defined (HAVE_METIS_METIS_H) -#include -#elif defined (HAVE_METIS_H) -#include -#endif - #if defined (HAVE_SUITESPARSE_CHOLMOD_H) #include #elif defined (HAVE_UFSPARSE_CHOLMOD_H) diff -r a2000c2b5e7d -r daff886a8e2a liboctave/sparse-base-chol.cc --- a/liboctave/sparse-base-chol.cc Wed Oct 17 15:38:54 2007 +0000 +++ b/liboctave/sparse-base-chol.cc Wed Oct 17 19:02:11 2007 +0000 @@ -116,24 +116,6 @@ cm->complex_divide = CHOLMOD_NAME(divcomplex); cm->hypotenuse = CHOLMOD_NAME(hypot); -#ifdef HAVE_METIS - // METIS 4.0.1 uses malloc and free, and will terminate if it runs - // out of memory. Use CHOLMOD's memory guard for METIS, which - // allocates a huge block of memory (and then immediately frees it) - // before calling METIS - cm->metis_memory = 2.0; - -#if defined(METIS_VERSION) -#if (METIS_VERSION >= METIS_VER(4,0,2)) - // METIS 4.0.2 uses function pointers for malloc and free. - METIS_malloc = cm->malloc_memory; - METIS_free = cm->free_memory; - // Turn off METIS memory guard. - cm->metis_memory = 0.0; -#endif -#endif -#endif - cm->final_asis = false; cm->final_super = false; cm->final_ll = true; diff -r a2000c2b5e7d -r daff886a8e2a src/ChangeLog --- a/src/ChangeLog Wed Oct 17 15:38:54 2007 +0000 +++ b/src/ChangeLog Wed Oct 17 19:02:11 2007 +0000 @@ -1,3 +1,7 @@ +2007-10-17 John W. Eaton + + * DLD-FUNCTIONS/spchol.cc (Fsymbfact): Delete special code for METIS. + 2007-10-17 Gabriele Pannocchia * DLD-FUNCTIONS/__qp__.cc (qp): Fix check for Wact(j). diff -r a2000c2b5e7d -r daff886a8e2a src/DLD-FUNCTIONS/spchol.cc --- a/src/DLD-FUNCTIONS/spchol.cc Wed Oct 17 15:38:54 2007 +0000 +++ b/src/DLD-FUNCTIONS/spchol.cc Wed Oct 17 19:02:11 2007 +0000 @@ -415,24 +415,6 @@ cm->complex_divide = CHOLMOD_NAME(divcomplex); cm->hypotenuse = CHOLMOD_NAME(hypot); -#ifdef HAVE_METIS - // METIS 4.0.1 uses malloc and free, and will terminate if it runs - // out of memory. Use CHOLMOD's memory guard for METIS, which - // allocates a huge block of memory (and then immediately frees it) - // before calling METIS. - cm->metis_memory = 2.0; - -#if defined(METIS_VERSION) -#if (METIS_VERSION >= METIS_VER(4,0,2)) - // METIS 4.0.2 uses function pointers for malloc and free. - METIS_malloc = cm->malloc_memory; - METIS_free = cm->free_memory; - // Turn off METIS memory guard. - cm->metis_memory = 0.0; -#endif -#endif -#endif - double dummy; cholmod_sparse Astore; cholmod_sparse *A = &Astore;