From cab0f6d808befb8294b729e27c8ef75b239b5a70 Mon Sep 17 00:00:00 2001 From: Julien Schueller Date: Wed, 3 Jul 2024 23:23:05 +0200 Subject: [PATCH] CMake: Add LONGINT option --- .github/workflows/build.yml | 4 ++-- CMakeLists.txt | 1 + EXAMPLE/pclinsol.c | 3 ++- EXAMPLE/pclinsolx.c | 6 ++++-- EXAMPLE/pclinsolx1.c | 6 ++++-- EXAMPLE/pclinsolx2.c | 6 ++++-- EXAMPLE/pcrepeat.c | 2 +- EXAMPLE/pcspmd.c | 2 +- EXAMPLE/pdlinsol.c | 3 ++- EXAMPLE/pdlinsolx.c | 4 +++- EXAMPLE/pdlinsolx1.c | 4 +++- EXAMPLE/pdlinsolx2.c | 4 +++- EXAMPLE/pdrepeat.c | 2 +- EXAMPLE/pdspmd.c | 2 +- EXAMPLE/pslinsol.c | 3 ++- EXAMPLE/pslinsolx.c | 6 ++++-- EXAMPLE/pslinsolx1.c | 6 ++++-- EXAMPLE/pslinsolx2.c | 6 ++++-- EXAMPLE/psrepeat.c | 2 +- EXAMPLE/psspmd.c | 2 +- EXAMPLE/pzlinsol.c | 3 ++- EXAMPLE/pzlinsolx.c | 4 +++- EXAMPLE/pzlinsolx1.c | 5 +++-- EXAMPLE/pzlinsolx2.c | 4 +++- EXAMPLE/pzrepeat.c | 2 +- EXAMPLE/pzspmd.c | 2 +- SRC/CMakeLists.txt | 4 ++++ SRC/creadmt.c | 4 ++-- SRC/dreadmt.c | 4 ++-- SRC/slu_mt_cdefs.h | 2 +- SRC/slu_mt_ddefs.h | 2 +- SRC/slu_mt_sdefs.h | 2 +- SRC/slu_mt_zdefs.h | 2 +- SRC/sreadmt.c | 4 ++-- SRC/zreadmt.c | 4 ++-- TESTING/CMakeLists.txt | 4 ++-- TESTING/pcdrive.c | 10 ++++++---- TESTING/pddrive.c | 10 ++++++---- TESTING/psdrive.c | 10 ++++++---- TESTING/pzdrive.c | 10 ++++++---- 40 files changed, 103 insertions(+), 63 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4d71665..73426a4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -15,7 +15,7 @@ jobs: - name: Build run: | cmake -DCMAKE_C_FLAGS="-Wall -Wextra -Wpedantic" -DCMAKE_INSTALL_PREFIX=$PWD/install . - make -j2 + make -j4 - name: Test - run: ctest -R LA --output-on-failure -j2 --schedule-random --timeout 500 + run: ctest --output-on-failure -j4 --schedule-random --timeout 500 diff --git a/CMakeLists.txt b/CMakeLists.txt index 3adc85f..4d374dc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -102,6 +102,7 @@ else () message (SEND_ERROR "invalid PLAT setting") endif () +option (LONGINT "use 64-bit integers for indexing sparse matrices (default is 32-bit)" OFF) enable_language(C) if (enable_fortran) diff --git a/EXAMPLE/pclinsol.c b/EXAMPLE/pclinsol.c index 61a3e9b..94c4756 100644 --- a/EXAMPLE/pclinsol.c +++ b/EXAMPLE/pclinsol.c @@ -41,7 +41,8 @@ main(int argc, char *argv[]) trans_t trans; complex *xact, *rhs; superlu_memusage_t superlu_memusage; - void parse_command_line(); + void parse_command_line(int argc, char *argv[], int_t *procs, + int_t *n, int_t *b, int_t *w, int_t *r, int_t *maxsup); nrhs = 1; trans = NOTRANS; diff --git a/EXAMPLE/pclinsolx.c b/EXAMPLE/pclinsolx.c index 26703d4..05ef50e 100644 --- a/EXAMPLE/pclinsolx.c +++ b/EXAMPLE/pclinsolx.c @@ -46,7 +46,9 @@ main(int argc, char *argv[]) float *ferr, *berr; float u, drop_tol, rpg, rcond; superlu_memusage_t superlu_memusage; - void parse_command_line(); + void parse_command_line(int argc, char *argv[], int_t *nprocs, int_t *lwork, + int_t *w, int_t *relax, float *u, fact_t *fact, + trans_t *trans, yes_no_t *refact, equed_t *equed); /* Default parameters to control factorization. */ nprocs = 1; @@ -218,7 +220,7 @@ main(int argc, char *argv[]) */ void parse_command_line(int argc, char *argv[], int_t *nprocs, int_t *lwork, - int_t *w, int_t *relax, double *u, fact_t *fact, + int_t *w, int_t *relax, float *u, fact_t *fact, trans_t *trans, yes_no_t *refact, equed_t *equed) { int c; diff --git a/EXAMPLE/pclinsolx1.c b/EXAMPLE/pclinsolx1.c index ea6fbfe..583bbe9 100644 --- a/EXAMPLE/pclinsolx1.c +++ b/EXAMPLE/pclinsolx1.c @@ -55,7 +55,9 @@ main(int argc, char *argv[]) float *ferr, *berr; float u, drop_tol, rpg, rcond; superlu_memusage_t superlu_memusage; - void parse_command_line(); + void parse_command_line(int argc, char *argv[], int_t *nprocs, int_t *lwork, + int_t *w, int_t *relax, float *u, fact_t *fact, + trans_t *trans, yes_no_t *refact, equed_t *equed); /* Default parameters to control factorization. */ nprocs = 1; @@ -276,7 +278,7 @@ main(int argc, char *argv[]) */ void parse_command_line(int argc, char *argv[], int_t *nprocs, int_t *lwork, - int_t *w, int_t *relax, double *u, fact_t *fact, + int_t *w, int_t *relax, float *u, fact_t *fact, trans_t *trans, yes_no_t *refact, equed_t *equed) { int c; diff --git a/EXAMPLE/pclinsolx2.c b/EXAMPLE/pclinsolx2.c index aa3a38b..37c931b 100644 --- a/EXAMPLE/pclinsolx2.c +++ b/EXAMPLE/pclinsolx2.c @@ -54,7 +54,9 @@ main(int argc, char *argv[]) float *ferr, *berr; float u, drop_tol, rpg, rcond; superlu_memusage_t superlu_memusage; - void parse_command_line(); + void parse_command_line(int argc, char *argv[], int_t *nprocs, int_t *lwork, + int_t *w, int_t *relax, float *u, fact_t *fact, + trans_t *trans, yes_no_t *refact, equed_t *equed); /* Default parameters to control factorization. */ nprocs = 1; @@ -234,7 +236,7 @@ main(int argc, char *argv[]) */ void parse_command_line(int argc, char *argv[], int_t *nprocs, int_t *lwork, - int_t *w, int_t *relax, double *u, fact_t *fact, + int_t *w, int_t *relax, float *u, fact_t *fact, trans_t *trans, yes_no_t *refact, equed_t *equed) { int c; diff --git a/EXAMPLE/pcrepeat.c b/EXAMPLE/pcrepeat.c index 903c441..faae51c 100644 --- a/EXAMPLE/pcrepeat.c +++ b/EXAMPLE/pcrepeat.c @@ -59,7 +59,7 @@ main(int argc, char *argv[]) complex *rhsb, *xact; Gstat_t Gstat; flops_t flopcnt; - void parse_command_line(); + void parse_command_line(int argc, char *argv[], int_t *nprocs); /* Default parameters to control factorization. */ nprocs = 1; diff --git a/EXAMPLE/pcspmd.c b/EXAMPLE/pcspmd.c index 9054657..9728fc1 100644 --- a/EXAMPLE/pcspmd.c +++ b/EXAMPLE/pcspmd.c @@ -94,7 +94,7 @@ main(int argc, char *argv[]) pthread_t *thread_id; void *status; #endif - void parse_command_line(); + void parse_command_line(int argc, char *argv[], int_t *nprocs); /* Default parameters to control factorization. */ nprocs = 1; diff --git a/EXAMPLE/pdlinsol.c b/EXAMPLE/pdlinsol.c index cf2039d..47e1837 100644 --- a/EXAMPLE/pdlinsol.c +++ b/EXAMPLE/pdlinsol.c @@ -41,7 +41,8 @@ main(int argc, char *argv[]) trans_t trans; double *xact, *rhs; superlu_memusage_t superlu_memusage; - void parse_command_line(); + void parse_command_line(int argc, char *argv[], int_t *procs, int_t *n, + int_t *b, int_t *w, int_t *r, int_t *maxsup); nrhs = 1; trans = NOTRANS; diff --git a/EXAMPLE/pdlinsolx.c b/EXAMPLE/pdlinsolx.c index f3fc32c..e2a93ec 100644 --- a/EXAMPLE/pdlinsolx.c +++ b/EXAMPLE/pdlinsolx.c @@ -46,7 +46,9 @@ main(int argc, char *argv[]) double *ferr, *berr; double u, drop_tol, rpg, rcond; superlu_memusage_t superlu_memusage; - void parse_command_line(); + void parse_command_line(int argc, char *argv[], int_t *nprocs, int_t *lwork, + int_t *w, int_t *relax, double *u, fact_t *fact, + trans_t *trans, yes_no_t *refact, equed_t *equed); /* Default parameters to control factorization. */ nprocs = 1; diff --git a/EXAMPLE/pdlinsolx1.c b/EXAMPLE/pdlinsolx1.c index d012c28..74bad93 100644 --- a/EXAMPLE/pdlinsolx1.c +++ b/EXAMPLE/pdlinsolx1.c @@ -55,7 +55,9 @@ main(int argc, char *argv[]) double *ferr, *berr; double u, drop_tol, rpg, rcond; superlu_memusage_t superlu_memusage; - void parse_command_line(); + void parse_command_line(int argc, char *argv[], int_t *nprocs, int_t *lwork, + int_t *w, int_t *relax, double *u, fact_t *fact, + trans_t *trans, yes_no_t *refact, equed_t *equed); /* Default parameters to control factorization. */ nprocs = 1; diff --git a/EXAMPLE/pdlinsolx2.c b/EXAMPLE/pdlinsolx2.c index dbd3d9a..57b2d21 100644 --- a/EXAMPLE/pdlinsolx2.c +++ b/EXAMPLE/pdlinsolx2.c @@ -54,7 +54,9 @@ main(int argc, char *argv[]) double *ferr, *berr; double u, drop_tol, rpg, rcond; superlu_memusage_t superlu_memusage; - void parse_command_line(); + void parse_command_line(int argc, char *argv[], int_t *nprocs, int_t *lwork, + int_t *w, int_t *relax, double *u, fact_t *fact, + trans_t *trans, yes_no_t *refact, equed_t *equed); /* Default parameters to control factorization. */ nprocs = 1; diff --git a/EXAMPLE/pdrepeat.c b/EXAMPLE/pdrepeat.c index 2e27d32..d47ab92 100644 --- a/EXAMPLE/pdrepeat.c +++ b/EXAMPLE/pdrepeat.c @@ -59,7 +59,7 @@ main(int argc, char *argv[]) double *rhsb, *xact; Gstat_t Gstat; flops_t flopcnt; - void parse_command_line(); + void parse_command_line(int argc, char *argv[], int_t *nprocs); /* Default parameters to control factorization. */ nprocs = 1; diff --git a/EXAMPLE/pdspmd.c b/EXAMPLE/pdspmd.c index 2f17bf9..ca2f6b9 100644 --- a/EXAMPLE/pdspmd.c +++ b/EXAMPLE/pdspmd.c @@ -94,7 +94,7 @@ main(int argc, char *argv[]) pthread_t *thread_id; void *status; #endif - void parse_command_line(); + void parse_command_line(int argc, char *argv[], int_t *nprocs); /* Default parameters to control factorization. */ nprocs = 1; diff --git a/EXAMPLE/pslinsol.c b/EXAMPLE/pslinsol.c index edea77b..fc09705 100644 --- a/EXAMPLE/pslinsol.c +++ b/EXAMPLE/pslinsol.c @@ -41,7 +41,8 @@ main(int argc, char *argv[]) trans_t trans; float *xact, *rhs; superlu_memusage_t superlu_memusage; - void parse_command_line(); + void parse_command_line(int argc, char *argv[], int_t *procs, int_t *n, + int_t *b, int_t *w, int_t *r, int_t *maxsup); nrhs = 1; trans = NOTRANS; diff --git a/EXAMPLE/pslinsolx.c b/EXAMPLE/pslinsolx.c index 9a61049..6d8bd48 100644 --- a/EXAMPLE/pslinsolx.c +++ b/EXAMPLE/pslinsolx.c @@ -46,7 +46,9 @@ main(int argc, char *argv[]) float *ferr, *berr; float u, drop_tol, rpg, rcond; superlu_memusage_t superlu_memusage; - void parse_command_line(); + void parse_command_line(int argc, char *argv[], int_t *nprocs, int_t *lwork, + int_t *w, int_t *relax, float *u, fact_t *fact, + trans_t *trans, yes_no_t *refact, equed_t *equed); /* Default parameters to control factorization. */ nprocs = 1; @@ -218,7 +220,7 @@ main(int argc, char *argv[]) */ void parse_command_line(int argc, char *argv[], int_t *nprocs, int_t *lwork, - int_t *w, int_t *relax, double *u, fact_t *fact, + int_t *w, int_t *relax, float *u, fact_t *fact, trans_t *trans, yes_no_t *refact, equed_t *equed) { int c; diff --git a/EXAMPLE/pslinsolx1.c b/EXAMPLE/pslinsolx1.c index d43fdc1..b58a406 100644 --- a/EXAMPLE/pslinsolx1.c +++ b/EXAMPLE/pslinsolx1.c @@ -55,7 +55,9 @@ main(int argc, char *argv[]) float *ferr, *berr; float u, drop_tol, rpg, rcond; superlu_memusage_t superlu_memusage; - void parse_command_line(); + void parse_command_line(int argc, char *argv[], int_t *nprocs, int_t *lwork, + int_t *w, int_t *relax, float *u, fact_t *fact, + trans_t *trans, yes_no_t *refact, equed_t *equed); /* Default parameters to control factorization. */ nprocs = 1; @@ -276,7 +278,7 @@ main(int argc, char *argv[]) */ void parse_command_line(int argc, char *argv[], int_t *nprocs, int_t *lwork, - int_t *w, int_t *relax, double *u, fact_t *fact, + int_t *w, int_t *relax, float *u, fact_t *fact, trans_t *trans, yes_no_t *refact, equed_t *equed) { int c; diff --git a/EXAMPLE/pslinsolx2.c b/EXAMPLE/pslinsolx2.c index 0b25bb9..504a6e4 100644 --- a/EXAMPLE/pslinsolx2.c +++ b/EXAMPLE/pslinsolx2.c @@ -54,7 +54,9 @@ main(int argc, char *argv[]) float *ferr, *berr; float u, drop_tol, rpg, rcond; superlu_memusage_t superlu_memusage; - void parse_command_line(); + void parse_command_line(int argc, char *argv[], int_t *nprocs, int_t *lwork, + int_t *w, int_t *relax, float *u, fact_t *fact, + trans_t *trans, yes_no_t *refact, equed_t *equed); /* Default parameters to control factorization. */ nprocs = 1; @@ -234,7 +236,7 @@ main(int argc, char *argv[]) */ void parse_command_line(int argc, char *argv[], int_t *nprocs, int_t *lwork, - int_t *w, int_t *relax, double *u, fact_t *fact, + int_t *w, int_t *relax, float *u, fact_t *fact, trans_t *trans, yes_no_t *refact, equed_t *equed) { int c; diff --git a/EXAMPLE/psrepeat.c b/EXAMPLE/psrepeat.c index 36e1131..602f4fc 100644 --- a/EXAMPLE/psrepeat.c +++ b/EXAMPLE/psrepeat.c @@ -59,7 +59,7 @@ main(int argc, char *argv[]) float *rhsb, *xact; Gstat_t Gstat; flops_t flopcnt; - void parse_command_line(); + void parse_command_line(int argc, char *argv[], int_t *nprocs); /* Default parameters to control factorization. */ nprocs = 1; diff --git a/EXAMPLE/psspmd.c b/EXAMPLE/psspmd.c index d19d23e..1306c6a 100644 --- a/EXAMPLE/psspmd.c +++ b/EXAMPLE/psspmd.c @@ -94,7 +94,7 @@ main(int argc, char *argv[]) pthread_t *thread_id; void *status; #endif - void parse_command_line(); + void parse_command_line(int argc, char *argv[], int_t *nprocs); /* Default parameters to control factorization. */ nprocs = 1; diff --git a/EXAMPLE/pzlinsol.c b/EXAMPLE/pzlinsol.c index 2fffa7f..0d67c2b 100644 --- a/EXAMPLE/pzlinsol.c +++ b/EXAMPLE/pzlinsol.c @@ -41,7 +41,8 @@ main(int argc, char *argv[]) trans_t trans; doublecomplex *xact, *rhs; superlu_memusage_t superlu_memusage; - void parse_command_line(); + void parse_command_line(int argc, char *argv[], int_t *procs, int_t *n, + int_t *b, int_t *w, int_t *r, int_t *maxsup); nrhs = 1; trans = NOTRANS; diff --git a/EXAMPLE/pzlinsolx.c b/EXAMPLE/pzlinsolx.c index 0d9c27c..f71c910 100644 --- a/EXAMPLE/pzlinsolx.c +++ b/EXAMPLE/pzlinsolx.c @@ -46,7 +46,9 @@ main(int argc, char *argv[]) double *ferr, *berr; double u, drop_tol, rpg, rcond; superlu_memusage_t superlu_memusage; - void parse_command_line(); + void parse_command_line(int argc, char *argv[], int_t *nprocs, int_t *lwork, + int_t *w, int_t *relax, double *u, fact_t *fact, + trans_t *trans, yes_no_t *refact, equed_t *equed); /* Default parameters to control factorization. */ nprocs = 1; diff --git a/EXAMPLE/pzlinsolx1.c b/EXAMPLE/pzlinsolx1.c index 70bdbff..86cdad9 100644 --- a/EXAMPLE/pzlinsolx1.c +++ b/EXAMPLE/pzlinsolx1.c @@ -55,8 +55,9 @@ main(int argc, char *argv[]) double *ferr, *berr; double u, drop_tol, rpg, rcond; superlu_memusage_t superlu_memusage; - void parse_command_line(); - + void parse_command_line(int argc, char *argv[], int_t *nprocs, int_t *lwork, + int_t *w, int_t *relax, double *u, fact_t *fact, + trans_t *trans, yes_no_t *refact, equed_t *equed); /* Default parameters to control factorization. */ nprocs = 1; fact = EQUILIBRATE; diff --git a/EXAMPLE/pzlinsolx2.c b/EXAMPLE/pzlinsolx2.c index 2392e65..b35fdd2 100644 --- a/EXAMPLE/pzlinsolx2.c +++ b/EXAMPLE/pzlinsolx2.c @@ -54,7 +54,9 @@ main(int argc, char *argv[]) double *ferr, *berr; double u, drop_tol, rpg, rcond; superlu_memusage_t superlu_memusage; - void parse_command_line(); + void parse_command_line(int argc, char *argv[], int_t *nprocs, int_t *lwork, + int_t *w, int_t *relax, double *u, fact_t *fact, + trans_t *trans, yes_no_t *refact, equed_t *equed); /* Default parameters to control factorization. */ nprocs = 1; diff --git a/EXAMPLE/pzrepeat.c b/EXAMPLE/pzrepeat.c index 9072d06..275c157 100644 --- a/EXAMPLE/pzrepeat.c +++ b/EXAMPLE/pzrepeat.c @@ -59,7 +59,7 @@ main(int argc, char *argv[]) doublecomplex *rhsb, *xact; Gstat_t Gstat; flops_t flopcnt; - void parse_command_line(); + void parse_command_line(int argc, char *argv[], int_t *nprocs); /* Default parameters to control factorization. */ nprocs = 1; diff --git a/EXAMPLE/pzspmd.c b/EXAMPLE/pzspmd.c index 73f4704..db9eb3a 100644 --- a/EXAMPLE/pzspmd.c +++ b/EXAMPLE/pzspmd.c @@ -94,7 +94,7 @@ main(int argc, char *argv[]) pthread_t *thread_id; void *status; #endif - void parse_command_line(); + void parse_command_line(int argc, char *argv[], int_t *nprocs); /* Default parameters to control factorization. */ nprocs = 1; diff --git a/SRC/CMakeLists.txt b/SRC/CMakeLists.txt index 5d1029b..3845e55 100644 --- a/SRC/CMakeLists.txt +++ b/SRC/CMakeLists.txt @@ -20,6 +20,10 @@ elseif (PLAT STREQUAL "_OPENMP") target_link_libraries (superlu_mt${PLAT} PRIVATE OpenMP::OpenMP_C) endif () +if (LONGINT) + target_compile_definitions (superlu_mt${PLAT} PUBLIC _LONGINT) +endif () + target_include_directories (superlu_mt${PLAT} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}) target_include_directories (superlu_mt${PLAT} INTERFACE $) install (TARGETS superlu_mt${PLAT} DESTINATION ${CMAKE_INSTALL_LIBDIR}) diff --git a/SRC/creadmt.c b/SRC/creadmt.c index 5c43814..824b950 100644 --- a/SRC/creadmt.c +++ b/SRC/creadmt.c @@ -40,8 +40,8 @@ creadmt(int_t *m, int_t *n, int_t *nonz, complex **nzval, int_t **rowind, int_t int lasta; char title[TLEN]; complex *a; - int *asub; - int *xa; + int_t *asub; + int_t *xa; /* Matrix format: * up to 60 characters title diff --git a/SRC/dreadmt.c b/SRC/dreadmt.c index 90eb0e1..90fe690 100644 --- a/SRC/dreadmt.c +++ b/SRC/dreadmt.c @@ -40,8 +40,8 @@ dreadmt(int_t *m, int_t *n, int_t *nonz, double **nzval, int_t **rowind, int_t * int lasta; char title[TLEN]; double *a; - int *asub; - int *xa; + int_t *asub; + int_t *xa; /* Matrix format: * up to 60 characters title diff --git a/SRC/slu_mt_cdefs.h b/SRC/slu_mt_cdefs.h index c92b643..6ac86be 100644 --- a/SRC/slu_mt_cdefs.h +++ b/SRC/slu_mt_cdefs.h @@ -468,7 +468,7 @@ extern int_t Glu_alloc (const int_t, const int_t, const int_t, const MemType, -------------------*/ extern double SuperLU_timer_(); extern int_t sp_ienv(int_t); -extern double slamch_(); +extern double slamch_(char *); extern int lsame_(char *, char *); extern int xerbla_(char *, int *); extern void superlu_abort_and_exit(char *); diff --git a/SRC/slu_mt_ddefs.h b/SRC/slu_mt_ddefs.h index 463b887..c124e98 100644 --- a/SRC/slu_mt_ddefs.h +++ b/SRC/slu_mt_ddefs.h @@ -467,7 +467,7 @@ extern int_t Glu_alloc (const int_t, const int_t, const int_t, const MemType, -------------------*/ extern double SuperLU_timer_(); extern int_t sp_ienv(int_t); -extern double dlamch_(); +extern double dlamch_(char *); extern int lsame_(char *, char *); extern int xerbla_(char *, int *); extern void superlu_abort_and_exit(char *); diff --git a/SRC/slu_mt_sdefs.h b/SRC/slu_mt_sdefs.h index 19bcc93..318134e 100644 --- a/SRC/slu_mt_sdefs.h +++ b/SRC/slu_mt_sdefs.h @@ -467,7 +467,7 @@ extern int_t Glu_alloc (const int_t, const int_t, const int_t, const MemType, -------------------*/ extern double SuperLU_timer_(); extern int_t sp_ienv(int_t); -extern double slamch_(); +extern double slamch_(char *); extern int lsame_(char *, char *); extern int xerbla_(char *, int *); extern void superlu_abort_and_exit(char *); diff --git a/SRC/slu_mt_zdefs.h b/SRC/slu_mt_zdefs.h index 3fff7ef..e9e230b 100644 --- a/SRC/slu_mt_zdefs.h +++ b/SRC/slu_mt_zdefs.h @@ -468,7 +468,7 @@ extern int_t Glu_alloc (const int_t, const int_t, const int_t, const MemType, -------------------*/ extern double SuperLU_timer_(); extern int_t sp_ienv(int_t); -extern double dlamch_(); +extern double dlamch_(char *); extern int lsame_(char *, char *); extern int xerbla_(char *, int *); extern void superlu_abort_and_exit(char *); diff --git a/SRC/sreadmt.c b/SRC/sreadmt.c index ee68209..c0cba4e 100644 --- a/SRC/sreadmt.c +++ b/SRC/sreadmt.c @@ -40,8 +40,8 @@ sreadmt(int_t *m, int_t *n, int_t *nonz, float **nzval, int_t **rowind, int_t ** int lasta; char title[TLEN]; float *a; - int *asub; - int *xa; + int_t *asub; + int_t *xa; /* Matrix format: * up to 60 characters title diff --git a/SRC/zreadmt.c b/SRC/zreadmt.c index 4f17907..40c0f91 100644 --- a/SRC/zreadmt.c +++ b/SRC/zreadmt.c @@ -40,8 +40,8 @@ zreadmt(int_t *m, int_t *n, int_t *nonz, doublecomplex **nzval, int_t **rowind, int lasta; char title[TLEN]; doublecomplex *a; - int *asub; - int *xa; + int_t *asub; + int_t *xa; /* Matrix format: * up to 60 characters title diff --git a/TESTING/CMakeLists.txt b/TESTING/CMakeLists.txt index 6945c0d..c3d21eb 100644 --- a/TESTING/CMakeLists.txt +++ b/TESTING/CMakeLists.txt @@ -20,7 +20,7 @@ function(add_superlumt_test target input) set(testName "${target}_${p}_${n}_${s}_${l}") add_test( NAME ${testName}_LA - COMMAND ${target} -t "LA" -n ${n} -s ${s} -l ${l} -p ${p} ) + COMMAND $ -t "LA" -n ${n} -s ${s} -l ${l} -p ${p} ) endforeach() # SP tests @@ -29,7 +29,7 @@ function(add_superlumt_test target input) set(testName "${target}_${p}_${s}_${l}") add_test( NAME ${testName}_SP - COMMAND sh -c ${target} -t "SP" -s ${s} -l ${l} -p ${p} < ${TEST_INPUT} ) + COMMAND sh -c $ -t "SP" -s ${s} -l ${l} -p ${p} < ${TEST_INPUT} ) endforeach() endforeach() endforeach() diff --git a/TESTING/pcdrive.c b/TESTING/pcdrive.c index 5242825..aa87b89 100644 --- a/TESTING/pcdrive.c +++ b/TESTING/pcdrive.c @@ -9,7 +9,7 @@ The source code is distributed under BSD license, see the file License.txt at the top-level directory. */ -#include +#include #include "slu_mt_cdefs.h" #define NTESTS 5 /* Number of test types */ @@ -89,7 +89,9 @@ int main(int argc, char *argv[]) trans_t trans; equed_t equed; yes_no_t refact, usepr; - void parse_command_line(); + void parse_command_line(int argc, char *argv[], char *matrix_type, + int_t *nprocs, int_t *n, int_t *w, int_t *relax, int_t *nrhs, + int_t *maxsuper, int_t *rowblk, int_t *colblk, int_t *lwork); /* Fixed set of parameters */ int iseed[] = {1994, 1995, 1996, 1997}; @@ -605,8 +607,8 @@ int main(int argc, char *argv[]) */ void parse_command_line(int argc, char *argv[], char *matrix_type, - int *nprocs, int *n, int *w, int *relax, int *nrhs, - int *maxsuper, int *rowblk, int *colblk, int *lwork) + int_t *nprocs, int_t *n, int_t *w, int_t *relax, int_t *nrhs, + int_t *maxsuper, int_t *rowblk, int_t *colblk, int_t *lwork) { int c; extern char *optarg; diff --git a/TESTING/pddrive.c b/TESTING/pddrive.c index 4f047dd..a8b929e 100644 --- a/TESTING/pddrive.c +++ b/TESTING/pddrive.c @@ -9,7 +9,7 @@ The source code is distributed under BSD license, see the file License.txt at the top-level directory. */ -#include +#include #include "slu_mt_ddefs.h" #define NTESTS 5 /* Number of test types */ @@ -89,7 +89,9 @@ int main(int argc, char *argv[]) trans_t trans; equed_t equed; yes_no_t refact, usepr; - void parse_command_line(); + void parse_command_line(int argc, char *argv[], char *matrix_type, + int_t *nprocs, int_t *n, int_t *w, int_t *relax, int_t *nrhs, + int_t *maxsuper, int_t *rowblk, int_t *colblk, int_t *lwork); /* Fixed set of parameters */ int iseed[] = {1994, 1995, 1996, 1997}; @@ -605,8 +607,8 @@ int main(int argc, char *argv[]) */ void parse_command_line(int argc, char *argv[], char *matrix_type, - int *nprocs, int *n, int *w, int *relax, int *nrhs, - int *maxsuper, int *rowblk, int *colblk, int *lwork) + int_t *nprocs, int_t *n, int_t *w, int_t *relax, int_t *nrhs, + int_t *maxsuper, int_t *rowblk, int_t *colblk, int_t *lwork) { int c; extern char *optarg; diff --git a/TESTING/psdrive.c b/TESTING/psdrive.c index 6e6acf0..a0a34dd 100644 --- a/TESTING/psdrive.c +++ b/TESTING/psdrive.c @@ -9,7 +9,7 @@ The source code is distributed under BSD license, see the file License.txt at the top-level directory. */ -#include +#include #include "slu_mt_sdefs.h" #define NTESTS 5 /* Number of test types */ @@ -89,7 +89,9 @@ int main(int argc, char *argv[]) trans_t trans; equed_t equed; yes_no_t refact, usepr; - void parse_command_line(); + void parse_command_line(int argc, char *argv[], char *matrix_type, + int_t *nprocs, int_t *n, int_t *w, int_t *relax, int_t *nrhs, + int_t *maxsuper, int_t *rowblk, int_t *colblk, int_t *lwork); /* Fixed set of parameters */ int iseed[] = {1994, 1995, 1996, 1997}; @@ -605,8 +607,8 @@ int main(int argc, char *argv[]) */ void parse_command_line(int argc, char *argv[], char *matrix_type, - int *nprocs, int *n, int *w, int *relax, int *nrhs, - int *maxsuper, int *rowblk, int *colblk, int *lwork) + int_t *nprocs, int_t *n, int_t *w, int_t *relax, int_t *nrhs, + int_t *maxsuper, int_t *rowblk, int_t *colblk, int_t *lwork) { int c; extern char *optarg; diff --git a/TESTING/pzdrive.c b/TESTING/pzdrive.c index f43c208..f070e5f 100644 --- a/TESTING/pzdrive.c +++ b/TESTING/pzdrive.c @@ -9,7 +9,7 @@ The source code is distributed under BSD license, see the file License.txt at the top-level directory. */ -#include +#include #include "slu_mt_zdefs.h" #define NTESTS 5 /* Number of test types */ @@ -89,7 +89,9 @@ int main(int argc, char *argv[]) trans_t trans; equed_t equed; yes_no_t refact, usepr; - void parse_command_line(); + void parse_command_line(int argc, char *argv[], char *matrix_type, + int_t *nprocs, int_t *n, int_t *w, int_t *relax, int_t *nrhs, + int_t *maxsuper, int_t *rowblk, int_t *colblk, int_t *lwork); /* Fixed set of parameters */ int iseed[] = {1994, 1995, 1996, 1997}; @@ -605,8 +607,8 @@ int main(int argc, char *argv[]) */ void parse_command_line(int argc, char *argv[], char *matrix_type, - int *nprocs, int *n, int *w, int *relax, int *nrhs, - int *maxsuper, int *rowblk, int *colblk, int *lwork) + int_t *nprocs, int_t *n, int_t *w, int_t *relax, int_t *nrhs, + int_t *maxsuper, int_t *rowblk, int_t *colblk, int_t *lwork) { int c; extern char *optarg;