Amesos Package Browser (Single Doxygen Collection)  Development
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
amesos_cholmod_common.c
Go to the documentation of this file.
1 /* ========================================================================== */
2 /* === Core/cholmod_common ================================================== */
3 /* ========================================================================== */
4 
5 /* -----------------------------------------------------------------------------
6  * CHOLMOD/Core Module. Copyright (C) 2005-2006,
7  * Univ. of Florida. Author: Timothy A. Davis
8  * The CHOLMOD/Core Module is licensed under Version 2.1 of the GNU
9  * Lesser General Public License. See lesser.txt for a text of the license.
10  * CHOLMOD is also available under other licenses; contact authors for details.
11  * http://www.cise.ufl.edu/research/sparse
12  * -------------------------------------------------------------------------- */
13 
14 /* Core utility routines for the cholmod_common object:
15  *
16  * Primary routines:
17  * -----------------
18  * cholmod_start the first call to CHOLMOD
19  * cholmod_finish the last call to CHOLMOD
20  *
21  * Secondary routines:
22  * -------------------
23  * cholmod_defaults restore (most) default control parameters
24  * cholmod_allocate_work allocate (or reallocate) workspace in Common
25  * cholmod_free_work free workspace in Common
26  * cholmod_clear_flag clear Common->Flag in workspace
27  * cholmod_maxrank column dimension of Common->Xwork workspace
28  *
29  * The Common object is unique. It cannot be allocated or deallocated by
30  * CHOLMOD, since it contains the definition of the memory management routines
31  * used (pointers to malloc, free, realloc, and calloc, or their equivalent).
32  * The Common object contains workspace that is used between calls to
33  * CHOLMOD routines. This workspace allocated by CHOLMOD as needed, by
34  * cholmod_allocate_work and cholmod_free_work.
35  */
36 
38 #include "amesos_cholmod_core.h"
39 
40 /* ========================================================================== */
41 /* === cholmod_start ======================================================== */
42 /* ========================================================================== */
43 
44 /* Initialize Common default parameters and statistics. Sets workspace
45  * pointers to NULL.
46  *
47  * This routine must be called just once, prior to calling any other CHOLMOD
48  * routine. Do not call this routine after any other CHOLMOD routine (except
49  * cholmod_finish, to start a new CHOLMOD session), or a memory leak will
50  * occur.
51  *
52  * workspace: none
53  */
54 
55 int CHOLMOD(start)
56 (
57  cholmod_common *Common
58 )
59 {
60  if (Common == NULL)
61  {
62  return (FALSE) ;
63  }
64 
65  /* ---------------------------------------------------------------------- */
66  /* user error handling routine */
67  /* ---------------------------------------------------------------------- */
68 
69  Common->error_handler = NULL ;
70 
71  /* ---------------------------------------------------------------------- */
72  /* integer and numerical types */
73  /* ---------------------------------------------------------------------- */
74 
75  Common->itype = ITYPE ;
76  Common->dtype = DTYPE ;
77 
78  /* ---------------------------------------------------------------------- */
79  /* default control parameters */
80  /* ---------------------------------------------------------------------- */
81 
82  CHOLMOD(defaults) (Common) ;
83  Common->try_catch = FALSE ;
84 
85  /* ---------------------------------------------------------------------- */
86  /* memory management routines */
87  /* ---------------------------------------------------------------------- */
88 
89  /* The user can replace cholmod's memory management routines by redefining
90  * these function pointers. */
91 
92 #ifndef NMALLOC
93  /* stand-alone ANSI C program */
94  Common->malloc_memory = malloc ;
95  Common->free_memory = free ;
96  Common->realloc_memory = realloc ;
97  Common->calloc_memory = calloc ;
98 #else
99  /* no memory manager defined at compile-time; MUST define one at run-time */
100  Common->malloc_memory = NULL ;
101  Common->free_memory = NULL ;
102  Common->realloc_memory = NULL ;
103  Common->calloc_memory = NULL ;
104 #endif
105 
106  /* ---------------------------------------------------------------------- */
107  /* complex arithmetic routines */
108  /* ---------------------------------------------------------------------- */
109 
110  Common->complex_divide = CHOLMOD(divcomplex) ;
111  Common->hypotenuse = CHOLMOD(hypot) ;
112 
113  /* ---------------------------------------------------------------------- */
114  /* print routine */
115  /* ---------------------------------------------------------------------- */
116 
117 #ifndef NPRINT
118  /* stand-alone ANSI C program */
119  Common->print_function = printf ;
120 #else
121  /* printing disabled */
122  Common->print_function = NULL ;
123 #endif
124 
125  /* ---------------------------------------------------------------------- */
126  /* workspace */
127  /* ---------------------------------------------------------------------- */
128 
129  /* This code assumes the workspace held in Common is not initialized. If
130  * it is, then a memory leak will occur because the pointers are
131  * overwritten with NULL. */
132 
133  Common->nrow = 0 ;
134  Common->mark = EMPTY ;
135  Common->xworksize = 0 ;
136  Common->iworksize = 0 ;
137  Common->Flag = NULL ;
138  Common->Head = NULL ;
139  Common->Iwork = NULL ;
140  Common->Xwork = NULL ;
141  Common->no_workspace_reallocate = FALSE ;
142 
143  /* ---------------------------------------------------------------------- */
144  /* statistics */
145  /* ---------------------------------------------------------------------- */
146 
147  /* fl and lnz are computed in cholmod_analyze and cholmod_rowcolcounts */
148  Common->fl = EMPTY ;
149  Common->lnz = EMPTY ;
150 
151  /* modfl is computed in cholmod_updown, cholmod_rowadd, and cholmod_rowdel*/
152  Common->modfl = EMPTY ;
153 
154  /* all routines use status as their error-report code */
155  Common->status = CHOLMOD_OK ;
156 
157  Common->malloc_count = 0 ; /* # calls to malloc minus # calls to free */
158  Common->memory_usage = 0 ; /* peak memory usage (in bytes) */
159  Common->memory_inuse = 0 ; /* current memory in use (in bytes) */
160 
161  Common->nrealloc_col = 0 ;
162  Common->nrealloc_factor = 0 ;
163  Common->ndbounds_hit = 0 ;
164  Common->rowfacfl = 0 ;
165  Common->aatfl = EMPTY ;
166 
167  /* Common->called_nd is TRUE if cholmod_analyze called or NESDIS */
168  Common->called_nd = FALSE ;
169 
170  DEBUG_INIT ("cholmod start") ;
171  return (TRUE) ;
172 }
173 
174 
175 /* ========================================================================== */
176 /* === cholmod_defaults ===================================================== */
177 /* ========================================================================== */
178 
179 /* Set Common default parameters, except for the function pointers.
180  *
181  * workspace: none
182  */
183 
184 int CHOLMOD(defaults)
185 (
186  cholmod_common *Common
187 )
188 {
189  Int i ;
190 
192 
193  /* ---------------------------------------------------------------------- */
194  /* default control parameters */
195  /* ---------------------------------------------------------------------- */
196 
197  Common->dbound = 0.0 ;
198  Common->grow0 = 1.2 ;
199  Common->grow1 = 1.2 ;
200  Common->grow2 = 5 ;
201  Common->maxrank = 8 ;
202 
203  Common->final_asis = TRUE ;
204  Common->final_super = TRUE ;
205  Common->final_ll = FALSE ;
206  Common->final_pack = TRUE ;
207  Common->final_monotonic = TRUE ;
208  Common->final_resymbol = FALSE ;
209 
210  /* use simplicial factorization if flop/nnz(L) < 40, supernodal otherwise */
211  Common->supernodal = CHOLMOD_AUTO ;
212  Common->supernodal_switch = 40 ;
213 
214  Common->nrelax [0] = 4 ;
215  Common->nrelax [1] = 16 ;
216  Common->nrelax [2] = 48 ;
217  Common->zrelax [0] = 0.8 ;
218  Common->zrelax [1] = 0.1 ;
219  Common->zrelax [2] = 0.05 ;
220 
221  Common->prefer_zomplex = FALSE ;
222  Common->prefer_upper = TRUE ;
223  Common->prefer_binary = FALSE ;
224  Common->quick_return_if_not_posdef = FALSE ;
225 
226  /* METIS workarounds */
227  Common->metis_memory = 0.0 ; /* > 0 for memory guard (2 is reasonable) */
228  Common->metis_nswitch = 3000 ;
229  Common->metis_dswitch = 0.66 ;
230 
231  Common->print = 3 ;
232  Common->precise = FALSE ;
233 
234  /* ---------------------------------------------------------------------- */
235  /* default ordering methods */
236  /* ---------------------------------------------------------------------- */
237 
238  /* Note that if the Partition module is not installed, the CHOLMOD_METIS
239  * and CHOLMOD_NESDIS methods will not be available. cholmod_analyze will
240  * report the CHOLMOD_NOT_INSTALLED error, and safely skip over them.
241  */
242 
243 #if (CHOLMOD_MAXMETHODS < 9)
244 #error "CHOLMOD_MAXMETHODS must be 9 or more (defined in cholmod_core.h)."
245 #endif
246 
247  /* default strategy: try given, AMD, and then METIS if AMD reports high
248  * fill-in. NESDIS can be used instead, if Common->default_nesdis is TRUE.
249  */
250  Common->nmethods = 0 ; /* use default strategy */
251  Common->default_nesdis = FALSE ; /* use METIS in default strategy */
252 
253  Common->current = 0 ; /* current method being tried */
254  Common->selected = 0 ; /* the best method selected */
255 
256  /* first, fill each method with default parameters */
257  for (i = 0 ; i <= CHOLMOD_MAXMETHODS ; i++)
258  {
259  /* CHOLMOD's default method is AMD for A or AA' */
260  Common->method [i].ordering = CHOLMOD_AMD ;
261 
262  /* CHOLMOD nested dissection and minimum degree parameter */
263  Common->method [i].prune_dense = 10.0 ; /* dense row/col control */
264 
265  /* min degree parameters (AMD, COLAMD, SYMAMD, CAMD, CCOLAMD, CSYMAMD)*/
266  Common->method [i].prune_dense2 = -1 ; /* COLAMD dense row control */
267  Common->method [i].aggressive = TRUE ; /* aggressive absorption */
268  Common->method [i].order_for_lu = FALSE ;/* order for Cholesky not LU */
269 
270  /* CHOLMOD's nested dissection (METIS + constrained AMD) */
271  Common->method [i].nd_small = 200 ; /* small graphs aren't cut */
272  Common->method [i].nd_compress = TRUE ; /* compress graph & subgraphs */
273  Common->method [i].nd_camd = 1 ; /* use CAMD */
274  Common->method [i].nd_components = FALSE ; /* lump connected comp. */
275  Common->method [i].nd_oksep = 1.0 ; /* sep ok if < oksep*n */
276 
277  /* statistics for each method are not yet computed */
278  Common->method [i].fl = EMPTY ;
279  Common->method [i].lnz = EMPTY ;
280  }
281 
282  Common->postorder = TRUE ; /* follow ordering with weighted postorder */
283 
284  /* Next, define some methods. The first five use default parameters. */
285  Common->method [0].ordering = CHOLMOD_GIVEN ; /* skip if UserPerm NULL */
286  Common->method [1].ordering = CHOLMOD_AMD ;
287  Common->method [2].ordering = CHOLMOD_METIS ;
288  Common->method [3].ordering = CHOLMOD_NESDIS ;
289  Common->method [4].ordering = CHOLMOD_NATURAL ;
290 
291  /* CHOLMOD's nested dissection with large leaves of separator tree */
292  Common->method [5].ordering = CHOLMOD_NESDIS ;
293  Common->method [5].nd_small = 20000 ;
294 
295  /* CHOLMOD's nested dissection with tiny leaves, and no AMD ordering */
296  Common->method [6].ordering = CHOLMOD_NESDIS ;
297  Common->method [6].nd_small = 4 ;
298  Common->method [6].nd_camd = 0 ; /* no CSYMAMD or CAMD */
299 
300  /* CHOLMOD's nested dissection with no dense node removal */
301  Common->method [7].ordering = CHOLMOD_NESDIS ;
302  Common->method [7].prune_dense = -1. ;
303 
304  /* COLAMD for A*A', AMD for A */
305  Common->method [8].ordering = CHOLMOD_COLAMD ;
306 
307  return (TRUE) ;
308 }
309 
310 
311 /* ========================================================================== */
312 /* === cholmod_finish ======================================================= */
313 /* ========================================================================== */
314 
315 /* The last call to CHOLMOD must be cholmod_finish. You may call this routine
316  * more than once, and can safely call any other CHOLMOD routine after calling
317  * it (including cholmod_start).
318  *
319  * The statistics and parameter settings in Common are preserved. The
320  * workspace in Common is freed. This routine is just another name for
321  * cholmod_free_work.
322  */
323 
324 int CHOLMOD(finish)
325 (
326  cholmod_common *Common
327 )
328 {
329  return (CHOLMOD(free_work) (Common)) ;
330 }
331 
332 
333 /* ========================================================================== */
334 /* === cholmod_allocate_work ================================================ */
335 /* ========================================================================== */
336 
337 /* Allocate and initialize workspace for CHOLMOD routines, or increase the size
338  * of already-allocated workspace. If enough workspace is already allocated,
339  * then nothing happens.
340  *
341  * workspace: Flag (nrow), Head (nrow+1), Iwork (iworksize), Xwork (xworksize)
342  */
343 
345 (
346  /* ---- input ---- */
347  size_t nrow, /* # of rows in the matrix A */
348  size_t iworksize, /* size of Iwork */
349  size_t xworksize, /* size of Xwork */
350  /* --------------- */
351  cholmod_common *Common
352 )
353 {
354  double *W ;
355  Int *Head ;
356  Int i ;
357  size_t nrow1 ;
358  int ok = TRUE ;
359 
360  /* ---------------------------------------------------------------------- */
361  /* get inputs */
362  /* ---------------------------------------------------------------------- */
363 
365  Common->status = CHOLMOD_OK ;
366 
367  /* ---------------------------------------------------------------------- */
368  /* Allocate Flag (nrow) and Head (nrow+1) */
369  /* ---------------------------------------------------------------------- */
370 
371  nrow = MAX (1, nrow) ;
372 
373  /* nrow1 = nrow + 1 */
374  nrow1 = CHOLMOD(add_size_t) (nrow, 1, &ok) ;
375  if (!ok)
376  {
377  /* nrow+1 causes size_t overflow ; problem is too large */
378  Common->status = CHOLMOD_TOO_LARGE ;
379  CHOLMOD(free_work) (Common) ;
380  return (FALSE) ;
381  }
382 
383  if (nrow > Common->nrow)
384  {
385 
386  if (Common->no_workspace_reallocate)
387  {
388  /* CHOLMOD is not allowed to change the workspace here */
389  Common->status = CHOLMOD_INVALID ;
390  return (FALSE) ;
391  }
392 
393  /* free the old workspace (if any) and allocate new space */
394  Common->Flag = CHOLMOD(free) (Common->nrow, sizeof (Int), Common->Flag,
395  Common) ;
396  Common->Head = CHOLMOD(free) (Common->nrow+1,sizeof (Int), Common->Head,
397  Common) ;
398  Common->Flag = CHOLMOD(malloc) (nrow, sizeof (Int), Common) ;
399  Common->Head = CHOLMOD(malloc) (nrow1, sizeof (Int), Common) ;
400 
401  /* record the new size of Flag and Head */
402  Common->nrow = nrow ;
403 
404  if (Common->status < CHOLMOD_OK)
405  {
406  CHOLMOD(free_work) (Common) ;
407  return (FALSE) ;
408  }
409 
410  /* initialize Flag and Head */
411  Common->mark = EMPTY ;
412  CHOLMOD(clear_flag) (Common) ;
413  Head = Common->Head ;
414  for (i = 0 ; i <= (Int) (nrow) ; i++)
415  {
416  Head [i] = EMPTY ;
417  }
418  }
419 
420  /* ---------------------------------------------------------------------- */
421  /* Allocate Iwork (iworksize) */
422  /* ---------------------------------------------------------------------- */
423 
424  iworksize = MAX (1, iworksize) ;
425  if (iworksize > Common->iworksize)
426  {
427 
428  if (Common->no_workspace_reallocate)
429  {
430  /* CHOLMOD is not allowed to change the workspace here */
431  Common->status = CHOLMOD_INVALID ;
432  return (FALSE) ;
433  }
434 
435  /* free the old workspace (if any) and allocate new space.
436  * integer overflow safely detected in cholmod_malloc */
437  CHOLMOD(free) (Common->iworksize, sizeof (Int), Common->Iwork, Common) ;
438  Common->Iwork = CHOLMOD(malloc) (iworksize, sizeof (Int), Common) ;
439 
440  /* record the new size of Iwork */
441  Common->iworksize = iworksize ;
442 
443  if (Common->status < CHOLMOD_OK)
444  {
445  CHOLMOD(free_work) (Common) ;
446  return (FALSE) ;
447  }
448 
449  /* note that Iwork does not need to be initialized */
450  }
451 
452  /* ---------------------------------------------------------------------- */
453  /* Allocate Xwork (xworksize) and set it to ((double) 0.) */
454  /* ---------------------------------------------------------------------- */
455 
456  /* make sure xworksize is >= 1 */
457  xworksize = MAX (1, xworksize) ;
458  if (xworksize > Common->xworksize)
459  {
460 
461  if (Common->no_workspace_reallocate)
462  {
463  /* CHOLMOD is not allowed to change the workspace here */
464  Common->status = CHOLMOD_INVALID ;
465  return (FALSE) ;
466  }
467 
468  /* free the old workspace (if any) and allocate new space */
469  CHOLMOD(free) (Common->xworksize, sizeof (double), Common->Xwork,
470  Common) ;
471  Common->Xwork = CHOLMOD(malloc) (xworksize, sizeof (double), Common) ;
472 
473  /* record the new size of Xwork */
474  Common->xworksize = xworksize ;
475 
476  if (Common->status < CHOLMOD_OK)
477  {
478  CHOLMOD(free_work) (Common) ;
479  return (FALSE) ;
480  }
481 
482  /* initialize Xwork */
483  W = Common->Xwork ;
484  for (i = 0 ; i < (Int) xworksize ; i++)
485  {
486  W [i] = 0. ;
487  }
488  }
489 
490  return (TRUE) ;
491 }
492 
493 
494 /* ========================================================================== */
495 /* === cholmod_free_work ==================================================== */
496 /* ========================================================================== */
497 
498 /* Deallocate the CHOLMOD workspace.
499  *
500  * workspace: deallocates all workspace in Common
501  */
502 
503 int CHOLMOD(free_work)
504 (
505  cholmod_common *Common
506 )
507 {
509  Common->Flag = CHOLMOD(free) (Common->nrow, sizeof (Int),
510  Common->Flag, Common) ;
511  Common->Head = CHOLMOD(free) (Common->nrow+1, sizeof (Int),
512  Common->Head, Common) ;
513  Common->Iwork = CHOLMOD(free) (Common->iworksize, sizeof (Int),
514  Common->Iwork, Common) ;
515  Common->Xwork = CHOLMOD(free) (Common->xworksize, sizeof (double),
516  Common->Xwork, Common) ;
517  Common->nrow = 0 ;
518  Common->iworksize = 0 ;
519  Common->xworksize = 0 ;
520  return (TRUE) ;
521 }
522 
523 
524 /* ========================================================================== */
525 /* === cholmod_clear_flag =================================================== */
526 /* ========================================================================== */
527 
528 /* Increment mark to ensure Flag [0..nrow-1] < mark. If integer overflow
529  * occurs, or mark was initially negative, reset the entire array. This is
530  * not an error condition, but an intended function of the Flag workspace.
531  *
532  * workspace: Flag (nrow). Does not modify Flag if nrow is zero.
533  */
534 
536 (
537  cholmod_common *Common
538 )
539 {
540  Int i, nrow, *Flag ;
541 
542  RETURN_IF_NULL_COMMON (-1) ;
543 
544  Common->mark++ ;
545  if (Common->mark <= 0)
546  {
547  nrow = Common->nrow ;
548  Flag = Common->Flag ;
549  PRINT2 (("reset Flag: nrow "ID"\n", nrow)) ;
550  PRINT2 (("reset Flag: mark %ld\n", Common->mark)) ;
551  for (i = 0 ; i < nrow ; i++)
552  {
553  Flag [i] = EMPTY ;
554  }
555  Common->mark = 0 ;
556  }
557  return (Common->mark) ;
558 }
559 
560 
561 /* ========================================================================== */
562 /* ==== cholmod_maxrank ===================================================== */
563 /* ========================================================================== */
564 
565 /* Find a valid value of Common->maxrank. Returns 0 if error, or 2, 4, or 8
566  * if successful. */
567 
568 size_t CHOLMOD(maxrank) /* returns validated value of Common->maxrank */
569 (
570  /* ---- input ---- */
571  size_t n, /* A and L will have n rows */
572  /* --------------- */
573  cholmod_common *Common
574 )
575 {
576  size_t maxrank ;
578  maxrank = Common->maxrank ;
579  if (n > 0)
580  {
581  /* Ensure maxrank*n*sizeof(double) does not result in integer overflow.
582  * If n is so large that 2*n*sizeof(double) results in integer overflow
583  * (n = 268,435,455 if an Int is 32 bits), then maxrank will be 0 or 1,
584  * but maxrank will be set to 2 below. 2*n will not result in integer
585  * overflow, and CHOLMOD will run out of memory or safely detect integer
586  * overflow elsewhere.
587  */
588  maxrank = MIN (maxrank, Size_max / (n * sizeof (double))) ;
589  }
590  if (maxrank <= 2)
591  {
592  maxrank = 2 ;
593  }
594  else if (maxrank <= 4)
595  {
596  maxrank = 4 ;
597  }
598  else
599  {
600  maxrank = 8 ;
601  }
602  return (maxrank) ;
603 }
604 
605 
606 /* ========================================================================== */
607 /* === cholmod_dbound ======================================================= */
608 /* ========================================================================== */
609 
610 /* Ensure the absolute value of a diagonal entry, D (j,j), is greater than
611  * Common->dbound. This routine is not meant for the user to call. It is used
612  * by the various LDL' factorization and update/downdate routines. The
613  * default value of Common->dbound is zero, and in that case this routine is not
614  * called at all. No change is made if D (j,j) is NaN. CHOLMOD does not call
615  * this routine if Common->dbound is NaN.
616  */
617 
618 double CHOLMOD(dbound) /* returns modified diagonal entry of D */
619 (
620  /* ---- input ---- */
621  double dj, /* diagonal entry of D, for LDL' factorization */
622  /* --------------- */
623  cholmod_common *Common
624 )
625 {
626  double dbound ;
628  if (!IS_NAN (dj))
629  {
630  dbound = Common->dbound ;
631  if (dj < 0)
632  {
633  if (dj > -dbound)
634  {
635  dj = -dbound ;
636  Common->ndbounds_hit++ ;
637  if (Common->status == CHOLMOD_OK)
638  {
639  ERROR (CHOLMOD_DSMALL, "diagonal below threshold") ;
640  }
641  }
642  }
643  else
644  {
645  if (dj < dbound)
646  {
647  dj = dbound ;
648  Common->ndbounds_hit++ ;
649  if (Common->status == CHOLMOD_OK)
650  {
651  ERROR (CHOLMOD_DSMALL, "diagonal below threshold") ;
652  }
653  }
654  }
655  }
656  return (dj) ;
657 }
#define CHOLMOD_TOO_LARGE
#define EMPTY
#define CHOLMOD_AUTO
#define Int
size_t CHOLMOD() add_size_t(size_t a, size_t b, int *ok)
#define FALSE
int CHOLMOD() divcomplex(double ar, double ai, double br, double bi, double *cr, double *ci)
#define RETURN_IF_NULL_COMMON(result)
#define MAX(a, b)
#define CHOLMOD_GIVEN
#define CHOLMOD_AMD
#define NULL
int CHOLMOD() free_work(cholmod_common *Common)
#define PRINT2(params)
int CHOLMOD() start(cholmod_common *Common)
#define ID
#define CHOLMOD_METIS
size_t CHOLMOD(maxrank)
#define DTYPE
int CHOLMOD() finish(cholmod_common *Common)
#define CHOLMOD_INVALID
#define CHOLMOD_OK
int CHOLMOD() allocate_work(size_t nrow, size_t iworksize, size_t xworksize, cholmod_common *Common)
#define CHOLMOD_MAXMETHODS
#define Size_max
#define IS_NAN(x)
#define CHOLMOD_DSMALL
double CHOLMOD() hypot(double x, double y)
#define DEBUG_INIT(s)
#define CHOLMOD_COLAMD
#define MIN(a, b)
UF_long CHOLMOD() clear_flag(cholmod_common *Common)
#define CHOLMOD_NESDIS
#define UF_long
int n
#define ERROR(status, msg)
#define TRUE
#define CHOLMOD_NATURAL
int CHOLMOD() defaults(cholmod_common *Common)
#define ITYPE