Skip to content

Commit

Permalink
Gaurd printf in get_perm_c.c
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoyeli committed Apr 23, 2023
1 parent 0060a50 commit 5ad0fe1
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 14 deletions.
2 changes: 0 additions & 2 deletions EXAMPLE/cfgmr.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ For information on ITSOL contact saad@cs.umn.edu

#define epsmac 1.0e-16

extern int ccopy_(int *, complex *, int *, complex *, int *);
extern void caxpy_(int *, complex *, complex *, int *, complex *, int *);
extern void cdotc_(complex *, int *, complex [], int *, complex [], int *);
extern float scnrm2_(int *, complex [], int *);

Expand Down
2 changes: 0 additions & 2 deletions EXAMPLE/dfgmr.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ For information on ITSOL contact saad@cs.umn.edu

#define epsmac 1.0e-16

extern int dcopy_(int *, double *, int *, double *, int *);
extern void daxpy_(int *, double *, double *, int *, double *, int *);
extern double ddot_(int *, double [], int *, double [], int *);
extern double dnrm2_(int *, double [], int *);

Expand Down
2 changes: 0 additions & 2 deletions EXAMPLE/sfgmr.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ For information on ITSOL contact saad@cs.umn.edu

#define epsmac 1.0e-16

extern int scopy_(int *, float *, int *, float *, int *);
extern void saxpy_(int *, float *, float *, int *, float *, int *);
extern float sdot_(int *, float [], int *, float [], int *);
extern float snrm2_(int *, float [], int *);

Expand Down
9 changes: 5 additions & 4 deletions EXAMPLE/superlu.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,11 @@ int main(int argc, char *argv[])
SuperMatrix A, L, U, B;
double *a, *rhs;
double s, u, p, e, r, l;
int *asub, *xa;
int_t *asub, *xa;
int *perm_r; /* row permutations from partial pivoting */
int *perm_c; /* column permutation vector */
int nrhs, info, i, m, n, nnz, permc_spec;
int nrhs, i, m, n, permc_spec;
int_t info, nnz;
superlu_options_t options;
SuperLUStat_t stat;

Expand All @@ -64,8 +65,8 @@ int main(int argc, char *argv[])
for (i = 0; i < m; ++i) rhs[i] = 1.0;
dCreate_Dense_Matrix(&B, m, nrhs, rhs, m, SLU_DN, SLU_D, SLU_GE);

if ( !(perm_r = intMalloc(m)) ) ABORT("Malloc fails for perm_r[].");
if ( !(perm_c = intMalloc(n)) ) ABORT("Malloc fails for perm_c[].");
if ( !(perm_r = int32Malloc(m)) ) ABORT("Malloc fails for perm_r[].");
if ( !(perm_c = int32Malloc(n)) ) ABORT("Malloc fails for perm_c[].");

/* Set the default input options. */
set_default_options(&options);
Expand Down
2 changes: 0 additions & 2 deletions EXAMPLE/zfgmr.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ For information on ITSOL contact saad@cs.umn.edu

#define epsmac 1.0e-16

extern int zcopy_(int *, doublecomplex *, int *, doublecomplex *, int *);
extern void zaxpy_(int *, doublecomplex *, doublecomplex *, int *, doublecomplex *, int *);
extern void zdotc_(doublecomplex *, int *, doublecomplex [], int *, doublecomplex [], int *);
extern double dznrm2_(int *, doublecomplex [], int *);

Expand Down
2 changes: 1 addition & 1 deletion SRC/get_perm_c.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ get_colamd(

info = COLAMD_MAIN(m, n, Alen, A, p, knobs, stats);

printf("after COLAMD_MAIN info %d\n", info);
//printf("after COLAMD_MAIN info %d\n", info);
if ( info == FALSE ) ABORT("COLAMD failed");

for (i = 0; i < n; ++i) perm_c[p[i]] = i;
Expand Down
2 changes: 1 addition & 1 deletion SRC/superlu_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
/* #undef HAVE_COLAMD */

/* enable 64bit index mode */
/* #undef XSDK_INDEX_SIZE */
#define XSDK_INDEX_SIZE 64

/* Integer type for indexing sparse matrix meta structure */
#if (XSDK_INDEX_SIZE == 64)
Expand Down

0 comments on commit 5ad0fe1

Please sign in to comment.