Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 556450 Details for
Bug 672000
sci-libs/cholmod-2.1.2 : /.../cholmod_metis.c:164:21: error: idxtype undeclared (first use in this function)
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Possibly nonsense patch which fixes the compilation.
use_idx_t_for_metis.patch (text/plain), 9.09 KB, created by
Jan-Matthias Braun
on 2018-11-27 12:54:37 UTC
(
hide
)
Description:
Possibly nonsense patch which fixes the compilation.
Filename:
MIME Type:
Creator:
Jan-Matthias Braun
Created:
2018-11-27 12:54:37 UTC
Size:
9.09 KB
patch
obsolete
>--- a/Partition/cholmod_metis.c 2018-11-27 13:49:50.649025891 +0100 >+++ b/Partition/cholmod_metis.c 2018-11-27 13:49:53.114028994 +0100 >@@ -75,7 +75,7 @@ > #ifdef DUMP_GRAPH > #include <stdio.h> > /* 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) ; > } >@@ -376,20 +376,20 @@ > 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) ;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 672000
:
556354
|
556356
|
556358
|
556360
|
556362
|
556364
|
556366
| 556450