Mercurial > hg > octave-avbm
changeset 7036:daff886a8e2a
[project @ 2007-10-17 19:02:10 by jwe]
author | jwe |
---|---|
date | Wed, 17 Oct 2007 19:02:11 +0000 |
parents | a2000c2b5e7d |
children | b1ca2c453b77 |
files | ChangeLog configure.in liboctave/CSparse.cc liboctave/ChangeLog liboctave/dSparse.cc liboctave/oct-sparse.h liboctave/sparse-base-chol.cc src/ChangeLog src/DLD-FUNCTIONS/spchol.cc |
diffstat | 9 files changed, 24 insertions(+), 223 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2007-10-17 John W. Eaton <jwe@octave.org> + + * configure.in: Delete checks for METIS. + 2007-10-12 John W. Eaton <jwe@octave.org> * mk-opts.pl (parse_input): Allow comment lines beginning with #.
--- a/configure.in +++ b/configure.in @@ -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.])
--- a/liboctave/CSparse.cc +++ b/liboctave/CSparse.cc @@ -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;
--- a/liboctave/ChangeLog +++ b/liboctave/ChangeLog @@ -1,3 +1,12 @@ +2007-10-17 John W. Eaton <jwe@octave.org> + + * 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<chol_type, chol_elt, + p_type>::sparse_base_chol_rep::init): Likewise. + 2007-10-16 John W. Eaton <jwe@octave.org> * dMatrix.cc (Matrix::inverse): Only check rcond == 0 if the
--- a/liboctave/dSparse.cc +++ b/liboctave/dSparse.cc @@ -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;
--- a/liboctave/oct-sparse.h +++ b/liboctave/oct-sparse.h @@ -57,16 +57,6 @@ #include <ccolamd.h> #endif -#if defined (HAVE_SUITESPARSE_METIS_H) -#include <suitesparse/metis.h> -#elif defined (HAVE_UFSPARSE_METIS_H) -#include <ufsparse/metis.h> -#elif defined (HAVE_METIS_METIS_H) -#include <metis/metis.h> -#elif defined (HAVE_METIS_H) -#include <metis.h> -#endif - #if defined (HAVE_SUITESPARSE_CHOLMOD_H) #include <suitesparse/cholmod.h> #elif defined (HAVE_UFSPARSE_CHOLMOD_H)
--- a/liboctave/sparse-base-chol.cc +++ b/liboctave/sparse-base-chol.cc @@ -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;
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2007-10-17 John W. Eaton <jwe@octave.org> + + * DLD-FUNCTIONS/spchol.cc (Fsymbfact): Delete special code for METIS. + 2007-10-17 Gabriele Pannocchia <g.pannocchia@ing.unipi.it> * DLD-FUNCTIONS/__qp__.cc (qp): Fix check for Wact(j).
--- a/src/DLD-FUNCTIONS/spchol.cc +++ b/src/DLD-FUNCTIONS/spchol.cc @@ -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;