--- SuiteSparse_config/SuiteSparse_config_Mac.mk.orig 2013-10-24 11:47:48.000000000 -0400 +++ SuiteSparse_config/SuiteSparse_config_Mac.mk 2013-10-24 12:04:00.000000000 -0400 @@ -84,8 +84,8 @@ # LIB = -lm # For "make install" -INSTALL_LIB = /usr/local/lib -INSTALL_INCLUDE = /usr/local/include +INSTALL_LIB = @DESTROOT@@PREFIX@/lib +INSTALL_INCLUDE = @DESTROOT@@PREFIX@/include # Which version of MAKE you are using (default is "make") # MAKE = make @@ -108,8 +108,8 @@ # naming the BLAS and LAPACK library (*.a or *.so) files. # This is probably slow ... it might connect to the Standard Reference BLAS: -BLAS = -lblas -lgfortran -LAPACK = -llapack +# BLAS = -lblas -lgfortran +# LAPACK = -llapack # NOTE: this next option for the "Goto BLAS" has nothing to do with a "goto" # statement. Rather, the Goto BLAS is written by Dr. Kazushige Goto. @@ -164,8 +164,8 @@ # The path is relative to where it is used, in CHOLMOD/Lib, CHOLMOD/MATLAB, etc. # You may wish to use an absolute path. METIS is optional. Compile # CHOLMOD with -DNPARTITION if you do not wish to use METIS. -METIS_PATH = ../../metis-4.0 -METIS = ../../metis-4.0/libmetis.a +METIS_PATH = @METIS_PATH@ +METIS = @METIS@ #------------------------------------------------------------------------------ # UMFPACK configuration: @@ -225,7 +225,7 @@ # -DNSUNPERF for Solaris only. If defined, do not use the Sun # Performance Library -CHOLMOD_CONFIG = $(GPU_CONFIG) +CHOLMOD_CONFIG = @CHOLMOD_CONFIG@ # uncomment this line to compile CHOLMOD without METIS: # CHOLMOD_CONFIG = -DNPARTITION @@ -313,9 +313,9 @@ # on my MacBook Air, and they work fine. F77 = gfortran - CF = $(CFLAGS) -O3 -fno-common -fexceptions -DNTIMER - BLAS = -framework Accelerate - LAPACK = -framework Accelerate + CF = $(CFLAGS) -O3 -fno-common -fexceptions -DNTIMER + BLAS = @BLAS_LAPACK@ + LAPACK = @BLAS_LAPACK@ LIB = -lm #------------------------------------------------------------------------------ --- CHOLMOD/Lib/Makefile.orig 2013-10-24 11:40:26.000000000 -0400 +++ CHOLMOD/Lib/Makefile 2013-10-24 12:18:47.000000000 -0400 @@ -22,8 +22,7 @@ # CAMD and CCOLAMD are requested and available LIB_WITH_PARTITION = \ ../../CCOLAMD/Lib/libccolamd.a ../../CAMD/Lib/libcamd.a - I_WITH_PARTITION = \ - -I../../CCOLAMD/Include -I../../CAMD/Include + I_WITH_PARTITION = CONFIG = -DNPARTITION # check if METIS is requested and available ifeq (,$(findstring -DNPARTITION, $(CHOLMOD_CONFIG))) @@ -32,8 +31,7 @@ # METIS is available LIB_WITH_PARTITION = $(METIS) \ ../../CCOLAMD/Lib/libccolamd.a ../../CAMD/Lib/libcamd.a - I_WITH_PARTITION = -I$(METIS_PATH)/Lib \ - -I../../CCOLAMD/Include -I../../CAMD/Include + I_WITH_PARTITION = -I$(METIS_PATH)/include CONFIG = endif endif @@ -44,7 +42,8 @@ #------------------------------------------------------------------------------- I = -I../../AMD/Include -I../../AMD/Source -I../../COLAMD/Include \ - $(I_WITH_PARTITION) -I../Include -I../../SuiteSparse_config + -I../Include -I../../SuiteSparse_config \ + -I../../CCOLAMD/Include -I../../CAMD/Include $(I_WITH_PARTITION) #------------------------------------------------------------------------------- --- KLU/Include/klu_version.h.orig 2013-10-24 12:06:25.000000000 -0400 +++ KLU/Include/klu_version.h 2013-10-24 12:08:49.000000000 -0400 @@ -327,8 +327,8 @@ typedef Double_Complex Unit ; #define Entry Double_Complex -#define Real component [0] -#define Imag component [1] +#define RealPart component [0] +#define ImagPart component [1] /* for flop counts */ #define MULTSUB_FLOPS 8. /* c -= a*b */ @@ -342,12 +342,12 @@ /* -------------------------------------------------------------------------- */ /* real part of c */ -#define REAL(c) ((c).Real) +#define REAL(c) ((c).RealPart) /* -------------------------------------------------------------------------- */ /* imag part of c */ -#define IMAG(c) ((c).Imag) +#define IMAG(c) ((c).ImagPart) /* -------------------------------------------------------------------------- */ @@ -360,8 +360,8 @@ { \ if (split) \ { \ - (c).Real = (s1)[p] ; \ - (c).Imag = (s2)[p] ; \ + (c).RealPart = (s1)[p] ; \ + (c).ImagPart = (s2)[p] ; \ } \ else \ { \ @@ -372,15 +372,15 @@ /* -------------------------------------------------------------------------- */ #define CONJ(a, x) \ { \ - a.Real = x.Real ; \ - a.Imag = -x.Imag ; \ + a.RealPart = x.RealPart ; \ + a.ImagPart = -x.ImagPart ; \ } /* c = 0 */ #define CLEAR(c) \ { \ - (c).Real = 0. ; \ - (c).Imag = 0. ; \ + (c).RealPart = 0. ; \ + (c).ImagPart = 0. ; \ } /* -------------------------------------------------------------------------- */ @@ -388,8 +388,8 @@ /* *p++ = 0 */ #define CLEAR_AND_INCREMENT(p) \ { \ - p->Real = 0. ; \ - p->Imag = 0. ; \ + p->RealPart = 0. ; \ + p->ImagPart = 0. ; \ p++ ; \ } @@ -397,34 +397,34 @@ /* True if a == 0 */ #define IS_ZERO(a) \ - (SCALAR_IS_ZERO ((a).Real) && SCALAR_IS_ZERO ((a).Imag)) + (SCALAR_IS_ZERO ((a).RealPart) && SCALAR_IS_ZERO ((a).ImagPart)) /* -------------------------------------------------------------------------- */ /* True if a is NaN */ #define IS_NAN(a) \ - (SCALAR_IS_NAN ((a).Real) || SCALAR_IS_NAN ((a).Imag)) + (SCALAR_IS_NAN ((a).RealPart) || SCALAR_IS_NAN ((a).ImagPart)) /* -------------------------------------------------------------------------- */ /* True if a != 0 */ #define IS_NONZERO(a) \ - (SCALAR_IS_NONZERO ((a).Real) || SCALAR_IS_NONZERO ((a).Imag)) + (SCALAR_IS_NONZERO ((a).RealPart) || SCALAR_IS_NONZERO ((a).ImagPart)) /* -------------------------------------------------------------------------- */ /* a = c/s */ #define SCALE_DIV_ASSIGN(a,c,s) \ { \ - a.Real = c.Real / s ; \ - a.Imag = c.Imag / s ; \ + a.RealPart = c.RealPart / s ; \ + a.ImagPart = c.ImagPart / s ; \ } /* c /= s */ #define SCALE_DIV(c,s) \ { \ - (c).Real /= (s) ; \ - (c).Imag /= (s) ; \ + (c).RealPart /= (s) ; \ + (c).ImagPart /= (s) ; \ } /* -------------------------------------------------------------------------- */ @@ -432,8 +432,8 @@ /* c *= s */ #define SCALE(c,s) \ { \ - (c).Real *= (s) ; \ - (c).Imag *= (s) ; \ + (c).RealPart *= (s) ; \ + (c).ImagPart *= (s) ; \ } /* -------------------------------------------------------------------------- */ @@ -441,8 +441,8 @@ /* c += a */ #define ASSEMBLE(c,a) \ { \ - (c).Real += (a).Real ; \ - (c).Imag += (a).Imag ; \ + (c).RealPart += (a).RealPart ; \ + (c).ImagPart += (a).ImagPart ; \ } /* -------------------------------------------------------------------------- */ @@ -450,8 +450,8 @@ /* c += *p++ */ #define ASSEMBLE_AND_INCREMENT(c,p) \ { \ - (c).Real += p->Real ; \ - (c).Imag += p->Imag ; \ + (c).RealPart += p->RealPart ; \ + (c).ImagPart += p->ImagPart ; \ p++ ; \ } @@ -460,8 +460,8 @@ /* c -= a */ #define DECREMENT(c,a) \ { \ - (c).Real -= (a).Real ; \ - (c).Imag -= (a).Imag ; \ + (c).RealPart -= (a).RealPart ; \ + (c).ImagPart -= (a).ImagPart ; \ } /* -------------------------------------------------------------------------- */ @@ -470,8 +470,8 @@ #define MULT(c,a,b) \ { \ ASSERT (&(c) != &(a) && &(c) != &(b)) ; \ - (c).Real = (a).Real * (b).Real - (a).Imag * (b).Imag ; \ - (c).Imag = (a).Imag * (b).Real + (a).Real * (b).Imag ; \ + (c).RealPart = (a).RealPart * (b).RealPart - (a).ImagPart * (b).ImagPart ; \ + (c).ImagPart = (a).ImagPart * (b).RealPart + (a).RealPart * (b).ImagPart ; \ } /* -------------------------------------------------------------------------- */ @@ -480,8 +480,8 @@ #define MULT_CONJ(c,a,b) \ { \ ASSERT (&(c) != &(a) && &(c) != &(b)) ; \ - (c).Real = (a).Real * (b).Real + (a).Imag * (b).Imag ; \ - (c).Imag = (a).Imag * (b).Real - (a).Real * (b).Imag ; \ + (c).RealPart = (a).RealPart * (b).RealPart + (a).ImagPart * (b).ImagPart ; \ + (c).ImagPart = (a).ImagPart * (b).RealPart - (a).RealPart * (b).ImagPart ; \ } /* -------------------------------------------------------------------------- */ @@ -490,8 +490,8 @@ #define MULT_SUB(c,a,b) \ { \ ASSERT (&(c) != &(a) && &(c) != &(b)) ; \ - (c).Real -= (a).Real * (b).Real - (a).Imag * (b).Imag ; \ - (c).Imag -= (a).Imag * (b).Real + (a).Real * (b).Imag ; \ + (c).RealPart -= (a).RealPart * (b).RealPart - (a).ImagPart * (b).ImagPart ; \ + (c).ImagPart -= (a).ImagPart * (b).RealPart + (a).RealPart * (b).ImagPart ; \ } /* -------------------------------------------------------------------------- */ @@ -500,8 +500,8 @@ #define MULT_SUB_CONJ(c,a,b) \ { \ ASSERT (&(c) != &(a) && &(c) != &(b)) ; \ - (c).Real -= (a).Real * (b).Real + (a).Imag * (b).Imag ; \ - (c).Imag -= (a).Imag * (b).Real - (a).Real * (b).Imag ; \ + (c).RealPart -= (a).RealPart * (b).RealPart + (a).ImagPart * (b).ImagPart ; \ + (c).ImagPart -= (a).ImagPart * (b).RealPart - (a).RealPart * (b).ImagPart ; \ } /* -------------------------------------------------------------------------- */ @@ -510,8 +510,8 @@ #ifdef MATHWORKS #define DIV(c,a,b) \ { \ - (void) utDivideComplex ((a).Real, (a).Imag, (b).Real, (b).Imag, \ - &((c).Real), &((c).Imag)) ; \ + (void) utDivideComplex ((a).RealPart, (a).ImagPart, (b).RealPart, (b).ImagPart, \ + &((c).RealPart), &((c).ImagPart)) ; \ } #else /* This uses ACM Algo 116, by R. L. Smith, 1962. */ @@ -520,23 +520,23 @@ #define DIV(c,a,b) \ { \ double r, den, ar, ai, br, bi ; \ - br = (b).Real ; \ - bi = (b).Imag ; \ - ar = (a).Real ; \ - ai = (a).Imag ; \ + br = (b).RealPart ; \ + bi = (b).ImagPart ; \ + ar = (a).RealPart ; \ + ai = (a).ImagPart ; \ if (SCALAR_ABS (br) >= SCALAR_ABS (bi)) \ { \ r = bi / br ; \ den = br + r * bi ; \ - (c).Real = (ar + ai * r) / den ; \ - (c).Imag = (ai - ar * r) / den ; \ + (c).RealPart = (ar + ai * r) / den ; \ + (c).ImagPart = (ai - ar * r) / den ; \ } \ else \ { \ r = br / bi ; \ den = r * br + bi ; \ - (c).Real = (ar * r + ai) / den ; \ - (c).Imag = (ai * r - ar) / den ; \ + (c).RealPart = (ar * r + ai) / den ; \ + (c).ImagPart = (ai * r - ar) / den ; \ } \ } #endif @@ -550,21 +550,21 @@ #define RECIPROCAL(c) \ { \ double r, den, cr, ci ; \ - cr = (c).Real ; \ - ci = (c).Imag ; \ + cr = (c).RealPart ; \ + ci = (c).ImagPart ; \ if (SCALAR_ABS (cr) >= SCALAR_ABS (ci)) \ { \ r = ci / cr ; \ den = cr + r * ci ; \ - (c).Real = 1.0 / den ; \ - (c).Imag = - r / den ; \ + (c).RealPart = 1.0 / den ; \ + (c).ImagPart = - r / den ; \ } \ else \ { \ r = cr / ci ; \ den = r * cr + ci ; \ - (c).Real = r / den ; \ - (c).Imag = - 1.0 / den ; \ + (c).RealPart = r / den ; \ + (c).ImagPart = - 1.0 / den ; \ } \ } @@ -575,8 +575,8 @@ #ifdef MATHWORKS #define DIV_CONJ(c,a,b) \ { \ - (void) utDivideComplex ((a).Real, (a).Imag, (b).Real, (-(b).Imag), \ - &((c).Real), &((c).Imag)) ; \ + (void) utDivideComplex ((a).RealPart, (a).ImagPart, (b).RealPart, (-(b).ImagPart), \ + &((c).RealPart), &((c).ImagPart)) ; \ } #else /* This uses ACM Algo 116, by R. L. Smith, 1962. */ @@ -585,23 +585,23 @@ #define DIV_CONJ(c,a,b) \ { \ double r, den, ar, ai, br, bi ; \ - br = (b).Real ; \ - bi = (b).Imag ; \ - ar = (a).Real ; \ - ai = (a).Imag ; \ + br = (b).RealPart ; \ + bi = (b).ImagPart ; \ + ar = (a).RealPart ; \ + ai = (a).ImagPart ; \ if (SCALAR_ABS (br) >= SCALAR_ABS (bi)) \ { \ r = (-bi) / br ; \ den = br - r * bi ; \ - (c).Real = (ar + ai * r) / den ; \ - (c).Imag = (ai - ar * r) / den ; \ + (c).RealPart = (ar + ai * r) / den ; \ + (c).ImagPart = (ai - ar * r) / den ; \ } \ else \ { \ r = br / (-bi) ; \ den = r * br - bi; \ - (c).Real = (ar * r + ai) / den ; \ - (c).Imag = (ai * r - ar) / den ; \ + (c).RealPart = (ar * r + ai) / den ; \ + (c).ImagPart = (ai * r - ar) / den ; \ } \ } #endif @@ -611,7 +611,7 @@ /* approximate absolute value, s = |r|+|i| */ #define APPROX_ABS(s,a) \ { \ - (s) = SCALAR_ABS ((a).Real) + SCALAR_ABS ((a).Imag) ; \ + (s) = SCALAR_ABS ((a).RealPart) + SCALAR_ABS ((a).ImagPart) ; \ } /* -------------------------------------------------------------------------- */ @@ -620,15 +620,15 @@ #ifdef MATHWORKS #define ABS(s,a) \ { \ - (s) = utFdlibm_hypot ((a).Real, (a).Imag) ; \ + (s) = utFdlibm_hypot ((a).RealPart, (a).ImagPart) ; \ } #else /* Ignore NaN case for the double relops ar>=ai and ar+ai==ar. */ #define ABS(s,a) \ { \ double r, ar, ai ; \ - ar = SCALAR_ABS ((a).Real) ; \ - ai = SCALAR_ABS ((a).Imag) ; \ + ar = SCALAR_ABS ((a).RealPart) ; \ + ai = SCALAR_ABS ((a).ImagPart) ; \ if (ar >= ai) \ { \ if (ar + ai == ar) \ @@ -664,25 +664,25 @@ #else #define PRINT_ENTRY(a) \ { \ - if (SCALAR_IS_NONZERO ((a).Real)) \ + if (SCALAR_IS_NONZERO ((a).RealPart)) \ { \ - PRINTF ((" (%g", (a).Real)) ; \ + PRINTF ((" (%g", (a).RealPart)) ; \ } \ else \ { \ PRINTF ((" (0")) ; \ } \ - if (SCALAR_IS_LTZERO ((a).Imag)) \ + if (SCALAR_IS_LTZERO ((a).ImagPart)) \ { \ - PRINTF ((" - %gi)", -(a).Imag)) ; \ + PRINTF ((" - %gi)", -(a).ImagPart)) ; \ } \ - else if (SCALAR_IS_ZERO ((a).Imag)) \ + else if (SCALAR_IS_ZERO ((a).ImagPart)) \ { \ PRINTF ((" + 0i)")) ; \ } \ else \ { \ - PRINTF ((" + %gi)", (a).Imag)) ; \ + PRINTF ((" + %gi)", (a).ImagPart)) ; \ } \ } #endif --- CHOLMOD/Partition/cholmod_metis.c.orig 2013-10-24 12:21:14.000000000 -0400 +++ CHOLMOD/Partition/cholmod_metis.c 2013-10-24 13:52:05.000000000 -0400 @@ -48,7 +48,7 @@ #include "cholmod_internal.h" #undef ASSERT -#include "metis.h" +#include /* METIS has its own ASSERT that it reveals to the user, so remove it here: */ #undef ASSERT @@ -75,7 +75,7 @@ #ifdef DUMP_GRAPH #include /* After dumping the graph with this routine, run "onmetis metisgraph" */ -static void dumpgraph (idxtype *Mp, idxtype *Mi, SuiteSparse_long n, +static void dumpgraph (idx_t *Mp, idx_t *Mi, SuiteSparse_long n, cholmod_common *Common) { SuiteSparse_long i, j, p, nz ; @@ -161,7 +161,7 @@ s = GUESS ((double) nz, (double) n) ; s *= Common->metis_memory ; - if (s * sizeof (idxtype) >= ((double) Size_max)) + if (s * sizeof (idx_t) >= ((double) Size_max)) { /* don't even attempt to malloc such a large block */ return (FALSE) ; @@ -172,7 +172,7 @@ metis_guard *= Common->metis_memory ; /* attempt to malloc the block */ - p = CHOLMOD(malloc) (metis_guard, sizeof (idxtype), Common) ; + p = CHOLMOD(malloc) (metis_guard, sizeof (idx_t), Common) ; if (p == NULL) { /* failure - return out-of-memory condition */ @@ -180,7 +180,7 @@ } /* success - free the block */ - CHOLMOD(free) (metis_guard, sizeof (idxtype), p, Common) ; + CHOLMOD(free) (metis_guard, sizeof (idx_t), p, Common) ; return (TRUE) ; } @@ -210,7 +210,7 @@ ) { Int *Ap, *Ai ; - idxtype *Mp, *Mi, *Mnw, *Mew, *Mpart ; + idx_t *Mp, *Mi, *Mnw, *Mew, *Mpart ; Int n, nleft, nright, j, p, csep, total_weight, lightest, nz ; int Opt [8], nn, csp ; size_t n1 ; @@ -259,7 +259,7 @@ /* ---------------------------------------------------------------------- */ #ifdef LONG - if (sizeof (Int) > sizeof (idxtype) && MAX (n,nz) > INT_MAX / sizeof (int)) + if (sizeof (Int) > sizeof (idx_t) && MAX (n,nz) > INT_MAX / sizeof (int)) { /* CHOLMOD's matrix is too large for METIS */ return (EMPTY) ; @@ -282,34 +282,34 @@ DEBUG (for (j = 0 ; j < n ; j++) ASSERT (Anw [j] > 0)) ; /* ---------------------------------------------------------------------- */ - /* copy Int to METIS idxtype, if necessary */ + /* copy Int to METIS idx_t, if necessary */ /* ---------------------------------------------------------------------- */ DEBUG (for (j = 0 ; j < nz ; j++) ASSERT (Aew [j] > 0)) ; - if (sizeof (Int) == sizeof (idxtype)) + if (sizeof (Int) == sizeof (idx_t)) { /* this is the typical case */ - Mi = (idxtype *) Ai ; - Mew = (idxtype *) Aew ; - Mp = (idxtype *) Ap ; - Mnw = (idxtype *) Anw ; - Mpart = (idxtype *) Partition ; + Mi = (idx_t *) Ai ; + Mew = (idx_t *) Aew ; + Mp = (idx_t *) Ap ; + Mnw = (idx_t *) Anw ; + Mpart = (idx_t *) Partition ; } else { - /* idxtype and Int differ; copy the graph into the METIS idxtype */ - Mi = CHOLMOD(malloc) (nz, sizeof (idxtype), Common) ; - Mew = CHOLMOD(malloc) (nz, sizeof (idxtype), Common) ; - Mp = CHOLMOD(malloc) (n1, sizeof (idxtype), Common) ; - Mnw = CHOLMOD(malloc) (n, sizeof (idxtype), Common) ; - Mpart = CHOLMOD(malloc) (n, sizeof (idxtype), Common) ; + /* idx_t and Int differ; copy the graph into the METIS idx_t */ + Mi = CHOLMOD(malloc) (nz, sizeof (idx_t), Common) ; + Mew = CHOLMOD(malloc) (nz, sizeof (idx_t), Common) ; + Mp = CHOLMOD(malloc) (n1, sizeof (idx_t), Common) ; + Mnw = CHOLMOD(malloc) (n, sizeof (idx_t), Common) ; + Mpart = CHOLMOD(malloc) (n, sizeof (idx_t), Common) ; if (Common->status < CHOLMOD_OK) { - CHOLMOD(free) (nz, sizeof (idxtype), Mi, Common) ; - CHOLMOD(free) (nz, sizeof (idxtype), Mew, Common) ; - CHOLMOD(free) (n1, sizeof (idxtype), Mp, Common) ; - CHOLMOD(free) (n, sizeof (idxtype), Mnw, Common) ; - CHOLMOD(free) (n, sizeof (idxtype), Mpart, Common) ; + CHOLMOD(free) (nz, sizeof (idx_t), Mi, Common) ; + CHOLMOD(free) (nz, sizeof (idx_t), Mew, Common) ; + CHOLMOD(free) (n1, sizeof (idx_t), Mp, Common) ; + CHOLMOD(free) (n, sizeof (idx_t), Mnw, Common) ; + CHOLMOD(free) (n, sizeof (idx_t), Mpart, Common) ; return (EMPTY) ; } for (p = 0 ; p < nz ; p++) @@ -337,13 +337,13 @@ if (!metis_memory_ok (n, nz, Common)) { /* METIS might ask for too much memory and thus terminate the program */ - if (sizeof (Int) != sizeof (idxtype)) + if (sizeof (Int) != sizeof (idx_t)) { - CHOLMOD(free) (nz, sizeof (idxtype), Mi, Common) ; - CHOLMOD(free) (nz, sizeof (idxtype), Mew, Common) ; - CHOLMOD(free) (n1, sizeof (idxtype), Mp, Common) ; - CHOLMOD(free) (n, sizeof (idxtype), Mnw, Common) ; - CHOLMOD(free) (n, sizeof (idxtype), Mpart, Common) ; + CHOLMOD(free) (nz, sizeof (idx_t), Mi, Common) ; + CHOLMOD(free) (nz, sizeof (idx_t), Mew, Common) ; + CHOLMOD(free) (n1, sizeof (idx_t), Mp, Common) ; + CHOLMOD(free) (n, sizeof (idx_t), Mnw, Common) ; + CHOLMOD(free) (n, sizeof (idx_t), Mpart, Common) ; } return (EMPTY) ; } @@ -369,27 +369,27 @@ #endif nn = n ; - METIS_NodeComputeSeparator (&nn, Mp, Mi, Mnw, Mew, Opt, &csp, Mpart) ; + METIS_ComputeVertexSeparator (&nn, Mp, Mi, Mnw, Opt, &csp, Mpart) ; n = nn ; csep = csp ; PRINT1 (("METIS csep "ID"\n", csep)) ; /* ---------------------------------------------------------------------- */ - /* copy the results back from idxtype, if required */ + /* copy the results back from idx_t, if required */ /* ---------------------------------------------------------------------- */ - if (sizeof (Int) != sizeof (idxtype)) + if (sizeof (Int) != sizeof (idx_t)) { for (j = 0 ; j < n ; j++) { Partition [j] = Mpart [j] ; } - CHOLMOD(free) (nz, sizeof (idxtype), Mi, Common) ; - CHOLMOD(free) (nz, sizeof (idxtype), Mew, Common) ; - CHOLMOD(free) (n1, sizeof (idxtype), Mp, Common) ; - CHOLMOD(free) (n, sizeof (idxtype), Mnw, Common) ; - CHOLMOD(free) (n, sizeof (idxtype), Mpart, Common) ; + CHOLMOD(free) (nz, sizeof (idx_t), Mi, Common) ; + CHOLMOD(free) (nz, sizeof (idx_t), Mew, Common) ; + CHOLMOD(free) (n1, sizeof (idx_t), Mp, Common) ; + CHOLMOD(free) (n, sizeof (idx_t), Mnw, Common) ; + CHOLMOD(free) (n, sizeof (idx_t), Mpart, Common) ; } /* ---------------------------------------------------------------------- */ @@ -507,7 +507,7 @@ { double d ; Int *Iperm, *Iwork, *Bp, *Bi ; - idxtype *Mp, *Mi, *Mperm, *Miperm ; + idx_t *Mp, *Mi, *Mperm, *Miperm ; cholmod_sparse *B ; Int i, j, n, nz, p, identity, uncol ; int Opt [8], nn, zero = 0 ; @@ -600,7 +600,7 @@ /* ---------------------------------------------------------------------- */ #ifdef LONG - if (sizeof (Int) > sizeof (idxtype) && MAX (n,nz) > INT_MAX / sizeof (int)) + if (sizeof (Int) > sizeof (idx_t) && MAX (n,nz) > INT_MAX / sizeof (int)) { /* CHOLMOD's matrix is too large for METIS */ CHOLMOD(free_sparse) (&B, Common) ; @@ -629,29 +629,29 @@ /* allocate the METIS input arrays, if needed */ /* ---------------------------------------------------------------------- */ - if (sizeof (Int) == sizeof (idxtype)) + if (sizeof (Int) == sizeof (idx_t)) { /* This is the typical case. */ - Miperm = (idxtype *) Iperm ; - Mperm = (idxtype *) Perm ; - Mp = (idxtype *) Bp ; - Mi = (idxtype *) Bi ; + Miperm = (idx_t *) Iperm ; + Mperm = (idx_t *) Perm ; + Mp = (idx_t *) Bp ; + Mi = (idx_t *) Bi ; } else { - /* allocate graph for METIS only if Int and idxtype differ */ - Miperm = CHOLMOD(malloc) (n, sizeof (idxtype), Common) ; - Mperm = CHOLMOD(malloc) (n, sizeof (idxtype), Common) ; - Mp = CHOLMOD(malloc) (n1, sizeof (idxtype), Common) ; - Mi = CHOLMOD(malloc) (nz, sizeof (idxtype), Common) ; + /* allocate graph for METIS only if Int and idx_t differ */ + Miperm = CHOLMOD(malloc) (n, sizeof (idx_t), Common) ; + Mperm = CHOLMOD(malloc) (n, sizeof (idx_t), Common) ; + Mp = CHOLMOD(malloc) (n1, sizeof (idx_t), Common) ; + Mi = CHOLMOD(malloc) (nz, sizeof (idx_t), Common) ; if (Common->status < CHOLMOD_OK) { /* out of memory */ CHOLMOD(free_sparse) (&B, Common) ; - CHOLMOD(free) (n, sizeof (idxtype), Miperm, Common) ; - CHOLMOD(free) (n, sizeof (idxtype), Mperm, Common) ; - CHOLMOD(free) (n1, sizeof (idxtype), Mp, Common) ; - CHOLMOD(free) (nz, sizeof (idxtype), Mi, Common) ; + CHOLMOD(free) (n, sizeof (idx_t), Miperm, Common) ; + CHOLMOD(free) (n, sizeof (idx_t), Mperm, Common) ; + CHOLMOD(free) (n1, sizeof (idx_t), Mp, Common) ; + CHOLMOD(free) (nz, sizeof (idx_t), Mi, Common) ; return (FALSE) ; } for (j = 0 ; j <= n ; j++) @@ -740,16 +740,16 @@ /* free the METIS input arrays */ /* ---------------------------------------------------------------------- */ - if (sizeof (Int) != sizeof (idxtype)) + if (sizeof (Int) != sizeof (idx_t)) { for (i = 0 ; i < n ; i++) { Perm [i] = (Int) (Mperm [i]) ; } - CHOLMOD(free) (n, sizeof (idxtype), Miperm, Common) ; - CHOLMOD(free) (n, sizeof (idxtype), Mperm, Common) ; - CHOLMOD(free) (n+1, sizeof (idxtype), Mp, Common) ; - CHOLMOD(free) (nz, sizeof (idxtype), Mi, Common) ; + CHOLMOD(free) (n, sizeof (idx_t), Miperm, Common) ; + CHOLMOD(free) (n, sizeof (idx_t), Mperm, Common) ; + CHOLMOD(free) (n+1, sizeof (idx_t), Mp, Common) ; + CHOLMOD(free) (nz, sizeof (idx_t), Mi, Common) ; } CHOLMOD(free_sparse) (&B, Common) ; --- CHOLMOD/Demo/Makefile.orig 2013-10-24 12:24:48.000000000 -0400 +++ CHOLMOD/Demo/Makefile 2013-10-24 12:31:19.000000000 -0400 @@ -98,10 +98,6 @@ ( cd ../../CCOLAMD ; $(MAKE) library ) ( cd ../../CAMD ; $(MAKE) library ) endif -ifneq (,$(findstring -DNPARTITION, $(CONFIG))) -else - ( cd $(METIS_PATH) && $(MAKE) ) -endif #------------------------------------------------------------------------------- --- SPQR/Demo/Makefile.orig 2013-10-24 12:27:42.000000000 -0400 +++ SPQR/Demo/Makefile 2013-10-24 12:27:57.000000000 -0400 @@ -127,9 +127,6 @@ ../../CAMD/Lib/libcamd.a: - ( cd ../../CAMD && $(MAKE) library ) -$(METIS): - ( cd $(METIS_PATH) && $(MAKE) ) - library: $(CLIB) purge: distclean --- UMFPACK/Demo/Makefile.orig 2013-10-24 12:27:21.000000000 -0400 +++ UMFPACK/Demo/Makefile 2013-10-24 12:27:25.000000000 -0400 @@ -80,9 +80,6 @@ ../../CAMD/Lib/libcamd.a: - ( cd ../../CAMD && $(MAKE) library ) -$(METIS): - ( cd $(METIS_PATH) && $(MAKE) ) - UMFPACK = ../Lib/libumfpack.a ../../AMD/Lib/libamd.a \ ../../SuiteSparse_config/libsuitesparseconfig.a \ $(LIB_WITH_CHOLMOD) $(LIB_WITH_PARTITION)