From 16756b4eceba4363975a908bf0beda0a6d009f19 Mon Sep 17 00:00:00 2001 From: Antonio Trande Date: Sat, 15 Jul 2023 11:57:53 +0200 Subject: [PATCH] Release 6.0.0 --- .gitignore | 1 + SuperLU-c99.patch | 273 -------------------- SuperLU-fedora-make.inc.in | 1 + SuperLU-fix-align-declarations-malloc.patch | 43 +++ SuperLU-set_soname.patch | 11 - SuperLU.spec | 70 ++--- sources | 2 +- superlu-removemc64.patch | 107 ++++---- 8 files changed, 125 insertions(+), 383 deletions(-) create mode 100644 SuperLU-fix-align-declarations-malloc.patch delete mode 100644 SuperLU-set_soname.patch diff --git a/.gitignore b/.gitignore index a5bf31c..fb3b173 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ /superlu-5.2.1.tar.gz /superlu-5.2.2.tar.gz /superlu-5.3.0.tar.gz +/superlu-6.0.0.tar.gz diff --git a/SuperLU-c99.patch b/SuperLU-c99.patch index 4f7cf33..d8058a1 100644 --- a/SuperLU-c99.patch +++ b/SuperLU-c99.patch @@ -16,276 +16,3 @@ index 0f25f58923aa0c7e..d8f523f9b67fa5ca 100644 extern void cdotc_(complex *, int *, complex [], int *, complex [], int *); extern float scnrm2_(int *, complex [], int *); -diff --git a/EXAMPLE/clinsolx.c b/EXAMPLE/clinsolx.c -index bcf91124458cabbd..e4401b01b03e087f 100644 ---- a/EXAMPLE/clinsolx.c -+++ b/EXAMPLE/clinsolx.c -@@ -18,6 +18,8 @@ at the top-level directory. - */ - #include "slu_cdefs.h" - -+#include -+ - int main(int argc, char *argv[]) - { - char equed[1]; -diff --git a/EXAMPLE/clinsolx1.c b/EXAMPLE/clinsolx1.c -index 8c540d172194c9ad..8a4e8e5a2aa79ea9 100644 ---- a/EXAMPLE/clinsolx1.c -+++ b/EXAMPLE/clinsolx1.c -@@ -20,6 +20,8 @@ at the top-level directory. - */ - #include "slu_cdefs.h" - -+#include -+ - int main(int argc, char *argv[]) - { - /* -diff --git a/EXAMPLE/clinsolx2.c b/EXAMPLE/clinsolx2.c -index 7fd680456c2baf3e..038bb4a77e41b3c8 100644 ---- a/EXAMPLE/clinsolx2.c -+++ b/EXAMPLE/clinsolx2.c -@@ -20,6 +20,8 @@ at the top-level directory. - */ - #include "slu_cdefs.h" - -+#include -+ - int main(int argc, char *argv[]) - { - /* -diff --git a/EXAMPLE/clinsolx3.c b/EXAMPLE/clinsolx3.c -index 973eb2736b00fb4b..33a1ac2e164841b3 100644 ---- a/EXAMPLE/clinsolx3.c -+++ b/EXAMPLE/clinsolx3.c -@@ -20,6 +20,8 @@ at the top-level directory. - */ - #include "slu_cdefs.h" - -+#include -+ - int main(int argc, char *argv[]) - { - /* -diff --git a/EXAMPLE/dfgmr.c b/EXAMPLE/dfgmr.c -index e19f11968199b7d3..97a3250c884d5495 100644 ---- a/EXAMPLE/dfgmr.c -+++ b/EXAMPLE/dfgmr.c -@@ -33,6 +33,8 @@ 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 *); - -diff --git a/EXAMPLE/dlinsolx.c b/EXAMPLE/dlinsolx.c -index fdfd6727909f3308..271dd0b94815649c 100644 ---- a/EXAMPLE/dlinsolx.c -+++ b/EXAMPLE/dlinsolx.c -@@ -18,6 +18,8 @@ at the top-level directory. - */ - #include "slu_ddefs.h" - -+#include -+ - int main(int argc, char *argv[]) - { - char equed[1]; -diff --git a/EXAMPLE/dlinsolx1.c b/EXAMPLE/dlinsolx1.c -index e6993f956f31c5fe..7038ece2ac29aa46 100644 ---- a/EXAMPLE/dlinsolx1.c -+++ b/EXAMPLE/dlinsolx1.c -@@ -20,6 +20,8 @@ at the top-level directory. - */ - #include "slu_ddefs.h" - -+#include -+ - int main(int argc, char *argv[]) - { - /* -diff --git a/EXAMPLE/dlinsolx2.c b/EXAMPLE/dlinsolx2.c -index 7050f438a8f29a96..5d93b81d9871fb11 100644 ---- a/EXAMPLE/dlinsolx2.c -+++ b/EXAMPLE/dlinsolx2.c -@@ -20,6 +20,8 @@ at the top-level directory. - */ - #include "slu_ddefs.h" - -+#include -+ - int main(int argc, char *argv[]) - { - /* -diff --git a/EXAMPLE/dlinsolx3.c b/EXAMPLE/dlinsolx3.c -index 0a82c7bbea362a2d..bc51680e3ddc205d 100644 ---- a/EXAMPLE/dlinsolx3.c -+++ b/EXAMPLE/dlinsolx3.c -@@ -20,6 +20,8 @@ at the top-level directory. - */ - #include "slu_ddefs.h" - -+#include -+ - int main(int argc, char *argv[]) - { - /* -diff --git a/EXAMPLE/sfgmr.c b/EXAMPLE/sfgmr.c -index f2428200f0b27040..1358b5c95c2c1ff2 100644 ---- a/EXAMPLE/sfgmr.c -+++ b/EXAMPLE/sfgmr.c -@@ -33,6 +33,8 @@ 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 *); - -diff --git a/EXAMPLE/slinsolx.c b/EXAMPLE/slinsolx.c -index 32f1788b67bb3a28..9de609badc07c614 100644 ---- a/EXAMPLE/slinsolx.c -+++ b/EXAMPLE/slinsolx.c -@@ -18,6 +18,8 @@ at the top-level directory. - */ - #include "slu_sdefs.h" - -+#include -+ - int main(int argc, char *argv[]) - { - char equed[1]; -diff --git a/EXAMPLE/slinsolx1.c b/EXAMPLE/slinsolx1.c -index 2d9ab0875aba1ac6..c1726cb73f484747 100644 ---- a/EXAMPLE/slinsolx1.c -+++ b/EXAMPLE/slinsolx1.c -@@ -20,6 +20,8 @@ at the top-level directory. - */ - #include "slu_sdefs.h" - -+#include -+ - int main(int argc, char *argv[]) - { - /* -diff --git a/EXAMPLE/slinsolx2.c b/EXAMPLE/slinsolx2.c -index aca9dc13b405b48a..ad4a06f8ed906723 100644 ---- a/EXAMPLE/slinsolx2.c -+++ b/EXAMPLE/slinsolx2.c -@@ -20,6 +20,8 @@ at the top-level directory. - */ - #include "slu_sdefs.h" - -+#include -+ - int main(int argc, char *argv[]) - { - /* -diff --git a/EXAMPLE/slinsolx3.c b/EXAMPLE/slinsolx3.c -index cb3356cd48bd5df9..0aefbd90e698b992 100644 ---- a/EXAMPLE/slinsolx3.c -+++ b/EXAMPLE/slinsolx3.c -@@ -20,6 +20,8 @@ at the top-level directory. - */ - #include "slu_sdefs.h" - -+#include -+ - int main(int argc, char *argv[]) - { - /* -diff --git a/EXAMPLE/sp_ienv.c b/EXAMPLE/sp_ienv.c -index 266b4eeb59f9ee99..2a8d99f48080aa0e 100644 ---- a/EXAMPLE/sp_ienv.c -+++ b/EXAMPLE/sp_ienv.c -@@ -23,7 +23,7 @@ at the top-level directory. - * File name: sp_ienv.c - * History: Modified from lapack routine ILAENV - */ --#include "slu_Cnames.h" -+#include "slu_sdefs.h" - - /*! \brief - -diff --git a/EXAMPLE/superlu.c b/EXAMPLE/superlu.c -index fd42a6ad5ded236a..b32d7e697c76c8e4 100644 ---- a/EXAMPLE/superlu.c -+++ b/EXAMPLE/superlu.c -@@ -20,7 +20,7 @@ at the top-level directory. - */ - #include "slu_ddefs.h" - --main(int argc, char *argv[]) -+int main(int argc, char *argv[]) - { - /* - * Purpose -diff --git a/EXAMPLE/zfgmr.c b/EXAMPLE/zfgmr.c -index 223a4f48ebe6f488..7d094dfbc0864d2c 100644 ---- a/EXAMPLE/zfgmr.c -+++ b/EXAMPLE/zfgmr.c -@@ -33,6 +33,8 @@ 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 *); - -diff --git a/EXAMPLE/zlinsolx.c b/EXAMPLE/zlinsolx.c -index 0540461dc043e2bc..bb2f3851aa57584d 100644 ---- a/EXAMPLE/zlinsolx.c -+++ b/EXAMPLE/zlinsolx.c -@@ -18,6 +18,8 @@ at the top-level directory. - */ - #include "slu_zdefs.h" - -+#include -+ - int main(int argc, char *argv[]) - { - char equed[1]; -diff --git a/EXAMPLE/zlinsolx1.c b/EXAMPLE/zlinsolx1.c -index badbf94cc33ca410..780e87cf594b9b1f 100644 ---- a/EXAMPLE/zlinsolx1.c -+++ b/EXAMPLE/zlinsolx1.c -@@ -20,6 +20,8 @@ at the top-level directory. - */ - #include "slu_zdefs.h" - -+#include -+ - int main(int argc, char *argv[]) - { - /* -diff --git a/EXAMPLE/zlinsolx2.c b/EXAMPLE/zlinsolx2.c -index 902c3535c3a905f5..579922433a7d2464 100644 ---- a/EXAMPLE/zlinsolx2.c -+++ b/EXAMPLE/zlinsolx2.c -@@ -20,6 +20,8 @@ at the top-level directory. - */ - #include "slu_zdefs.h" - -+#include -+ - int main(int argc, char *argv[]) - { - /* -diff --git a/EXAMPLE/zlinsolx3.c b/EXAMPLE/zlinsolx3.c -index 5080c03a34d6c7ae..a1763ed45ccbb028 100644 ---- a/EXAMPLE/zlinsolx3.c -+++ b/EXAMPLE/zlinsolx3.c -@@ -20,6 +20,8 @@ at the top-level directory. - */ - #include "slu_zdefs.h" - -+#include -+ - int main(int argc, char *argv[]) - { - /* diff --git a/SuperLU-fedora-make.inc.in b/SuperLU-fedora-make.inc.in index 6b998c0..6163479 100644 --- a/SuperLU-fedora-make.inc.in +++ b/SuperLU-fedora-make.inc.in @@ -38,6 +38,7 @@ CC = @CMAKE_C_COMPILER@ CFLAGS = @CMAKE_C_FLAGS_RELEASE@ @CMAKE_C_FLAGS@ NOOPTS = FORTRAN = @CMAKE_Fortran_COMPILER@ +FFLAGS = @CMAKE_Fortran_FLAGS_RELEASE@ LOADER = $(CC) LOADOPTS = $(LDFLAGS) diff --git a/SuperLU-fix-align-declarations-malloc.patch b/SuperLU-fix-align-declarations-malloc.patch new file mode 100644 index 0000000..7e0d0c6 --- /dev/null +++ b/SuperLU-fix-align-declarations-malloc.patch @@ -0,0 +1,43 @@ +From c5de971c4dd754da1040121aa5e3a3c00932e3b7 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Christoph=20Gr=C3=BCninger?= +Date: Sun, 4 Jun 2023 23:12:49 +0200 +Subject: [PATCH] Adjust forward delcaration of float/double Malloc/Calloc + +The argument was changed in slu_sdefs.h / slu_ddefs.h and +remained in slu_cdefs.h / slu_zdefs.h. This leads to +incompatible declarations. +--- + SRC/slu_cdefs.h | 4 ++-- + SRC/slu_zdefs.h | 4 ++-- + 2 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/SRC/slu_cdefs.h b/SRC/slu_cdefs.h +index 0cb20900..5d5a5529 100644 +--- a/SRC/slu_cdefs.h ++++ b/SRC/slu_cdefs.h +@@ -236,8 +236,8 @@ extern int_t cLUMemXpand (int, int_t, MemType, int_t *, GlobalLU_t *); + + extern complex *complexMalloc(size_t); + extern complex *complexCalloc(size_t); +-extern float *floatMalloc(int); +-extern float *floatCalloc(int); ++extern float *floatMalloc(size_t); ++extern float *floatCalloc(size_t); + extern int_t cmemory_usage(const int_t, const int_t, const int_t, const int); + extern int cQuerySpace (SuperMatrix *, SuperMatrix *, mem_usage_t *); + extern int ilu_cQuerySpace (SuperMatrix *, SuperMatrix *, mem_usage_t *); +diff --git a/SRC/slu_zdefs.h b/SRC/slu_zdefs.h +index ba5d8636..c6418d58 100644 +--- a/SRC/slu_zdefs.h ++++ b/SRC/slu_zdefs.h +@@ -236,8 +236,8 @@ extern int_t zLUMemXpand (int, int_t, MemType, int_t *, GlobalLU_t *); + + extern doublecomplex *doublecomplexMalloc(size_t); + extern doublecomplex *doublecomplexCalloc(size_t); +-extern double *doubleMalloc(int); +-extern double *doubleCalloc(int); ++extern double *doubleMalloc(size_t); ++extern double *doubleCalloc(size_t); + extern int_t zmemory_usage(const int_t, const int_t, const int_t, const int); + extern int zQuerySpace (SuperMatrix *, SuperMatrix *, mem_usage_t *); + extern int ilu_zQuerySpace (SuperMatrix *, SuperMatrix *, mem_usage_t *); diff --git a/SuperLU-set_soname.patch b/SuperLU-set_soname.patch deleted file mode 100644 index e74c690..0000000 --- a/SuperLU-set_soname.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/SRC/CMakeLists.orig.txt 2018-04-25 15:17:39.786715000 +0200 -+++ b/SRC/CMakeLists.txt 2018-04-25 15:25:00.253317607 +0200 -@@ -242,7 +242,7 @@ - $ - ) - set_target_properties(superlu PROPERTIES -- VERSION ${PROJECT_VERSION} SOVERSION ${VERSION_MAJOR} -+ VERSION ${VERSION_MAJOR}.${VERSION_MINOR} SOVERSION ${VERSION_MAJOR} - ) - - # Define GNU standard installation directories diff --git a/SuperLU.spec b/SuperLU.spec index 8413236..03a542e 100644 --- a/SuperLU.spec +++ b/SuperLU.spec @@ -1,9 +1,8 @@ %global genname superlu -%global libver 5.3 Name: SuperLU -Version: 5.3.0 -Release: 5%{?dist} +Version: 6.0.0 +Release: 1%{?dist} Summary: Subroutines to solve sparse linear systems License: BSD and GPLv2+ URL: https://portal.nersc.gov/project/sparse/superlu/ @@ -14,14 +13,14 @@ Source1: %{name}-fedora-make.inc.in Patch0: %{genname}-removemc64.patch -# Patch soname (5 -> 5.x) of shared library -Patch1: %{name}-set_soname.patch - # Fix ldflags of example files -Patch2: %{name}-fix_example_builds.patch -Patch3: SuperLU-c99.patch +Patch1: %{name}-fix_example_builds.patch + +Patch2: %{name}-c99.patch -%if 0%{?fedora} >= 33 +Patch3: %{name}-fix-align-declarations-malloc.patch + +%if 0%{?fedora} || 0%{?rhel} > 9 BuildRequires: pkgconfig(flexiblas) %else %ifarch %{openblas_arches} @@ -34,6 +33,7 @@ BuildRequires: atlas-devel BuildRequires: epel-rpm-macros %endif %endif +BuildRequires: metis-devel BuildRequires: make BuildRequires: cmake3 BuildRequires: gcc, gcc-gfortran @@ -81,59 +81,34 @@ done sed -e 's|-O0|-O2|g' -i SRC/CMakeLists.txt %build -mkdir -p build -%cmake3 -S . -B build \ +%cmake \ -Denable_internal_blaslib:BOOL=NO \ -%if 0%{?fedora} >= 33 + -DXSDK_ENABLE_Fortran:BOOL=OFF \ + -DCMAKE_Fortran_FLAGS_RELEASE:STRING="%{__global_fflags}" \ +%if 0%{?fedora} || 0%{?rhel} > 9 -DTPL_BLAS_LIBRARIES="`pkg-config --libs flexiblas`" \ %else -DTPL_BLAS_LIBRARIES=-lopenblas \ %endif + -DTPL_ENABLE_METISLIB:BOOL=ON \ + -DTPL_METIS_INCLUDE_DIRS:PATH=%{_includedir} \ + -DTPL_METIS_LIBRARIES:FILEPATH=%{_libdir}/libmetis.so \ -DCMAKE_BUILD_TYPE:STRING=Release \ -DCMAKE_INSTALL_INCLUDEDIR:PATH=include/%{name} \ -DCMAKE_INSTALL_LIBDIR:PATH=%{_lib} \ -DCMAKE_SKIP_RPATH:BOOL=YES -DCMAKE_SKIP_INSTALL_RPATH:BOOL=YES -%make_build -C build - -# Compile Fortran example interface to use the C routines in SuperLU -%if 0%{?fedora} >= 33 -export TPL_BLAS_LIBRARIES="`pkg-config --libs flexiblas`" \ -%else -export TPL_BLAS_LIBRARIES=-lopenblas \ -%endif -export LDFLAGS="%{build_ldflags}" -export FFLAGS="%{build_fflags}" -export CFLAGS="%{build_cflags}" -make -C FORTRAN -make -C EXAMPLE +%cmake_build %install -%make_install -C build +%cmake_install %check -pushd build -ctest3 -V %{?_smp_mflags} -popd - -# Test Fortran example interface to use the C routines in SuperLU -pushd FORTRAN -export LD_LIBRARY_PATH=%{buildroot}%{_libdir} -./df77exm < ../EXAMPLE/g20.rua -./zf77exm < ../EXAMPLE/cg20.cua -./test_omp < ../EXAMPLE/g20.rua -make clean -popd -# Test sample programs -pushd EXAMPLE -export LD_LIBRARY_PATH=%{buildroot}%{_libdir} -./superlu -make clean -popd +%ctest %files %license License.txt -%{_libdir}/libsuperlu.so.5 -%{_libdir}/libsuperlu.so.%{libver} +%{_libdir}/libsuperlu.so.6 +%{_libdir}/libsuperlu.so.6.0.0 %files devel %{_includedir}/%{name}/ @@ -146,6 +121,9 @@ popd %doc DOC %changelog +* Sat Apr 22 2023 Antonio Trande - 6.0.0-1 +- Release 6.0.0 + * Tue Feb 21 2023 Florian Weimer - 5.3.0-5 - Port to C99 diff --git a/sources b/sources index 940e8e4..9be9153 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (superlu-5.3.0.tar.gz) = 1461b52bc18a8b0345beb70fdd46e07df497a13be840bcc061158ea1d0e61c8745806d1ad21cb2723db80f5ed762c3741f9c0ded2b2013df46da0e8bb6b77b83 +SHA512 (superlu-6.0.0.tar.gz) = 8feeb08404cad58724f0f6478bc785b56d8c725b549f1fdc07d3578c4e14bdbdbd8bcda1cdfd366a39417eda60765825e87cf781c68e6723a8246cb357b41439 diff --git a/superlu-removemc64.patch b/superlu-removemc64.patch index 58596b8..c04accf 100644 --- a/superlu-removemc64.patch +++ b/superlu-removemc64.patch @@ -1,6 +1,6 @@ ---- SuperLU_5.2.1/SRC/mc64ad.c 2016-05-22 17:58:44.000000000 +0200 -+++ mc64ad.c 2018-04-13 17:13:23.571981656 +0200 -@@ -1,2645 +1,16 @@ +--- a/SRC/mc64ad.c 2016-05-22 17:58:44.000000000 +0200 ++++ b/mc64ad.c 2018-04-13 17:13:23.571981656 +0200 +@@ -1,2646 +1,16 @@ -/* mc64ad.f -- translated by f2c (version 20100827). - You must link the resulting object file with libf2c: - on Microsoft Windows system, link with libf2c.lib; @@ -9,9 +9,7 @@ - -- in that order, at the end of the command line, as in - cc *.o -lf2c -lm - Source for libf2c is in /netlib/f2c/libf2c.zip, e.g., -+#include -+#include - +- - http://www.netlib.org/f2c/libf2c.zip -*/ - @@ -119,7 +117,7 @@ - -/* ********************************************************************** */ -/* Subroutine */ int_t mc64ad_(int_t *job, int_t *n, int_t *ne, int_t * -- ip, int_t *irn, double *a, int_t *num, int_t *cperm, +- ip, int_t *irn, double *a, int_t *num, int *cperm, - int_t *liw, int_t *iw, int_t *ldw, double *dw, int_t * - icntl, int_t *info) -{ @@ -135,16 +133,17 @@ - double fact, rinf; - - extern /* Subroutine */ int_t mc21ad_(int_t *, int_t *, int_t *, -- int_t *, int_t *, int_t *, int_t *, int_t *), mc64bd_( -- int_t *, int_t *, int_t *, int_t *, double *, int_t -- *, int_t *, int_t *, int_t *, int_t *, int_t *, -- double *), mc64rd_(int_t *, int_t *, int_t *, int_t *, -- double *), mc64sd_(int_t *, int_t *, int_t *, int_t * -- , double *, int_t *, int_t *, int_t *, int_t *, -- int_t *, int_t *, int_t *, int_t *, int_t *), mc64wd_( -- int_t *, int_t *, int_t *, int_t *, double *, int_t -- *, int_t *, int_t *, int_t *, int_t *, int_t *, int_t -- *, double *, double *); +- int_t *, int_t *, int_t *, int_t *, int_t *), +- mc64bd_(int_t *n, int_t *ne, int_t *ip, int_t *irn, double *a, +- int *iperm, int_t *num, int_t *jperm, +- int_t *pr, int_t *q, int_t *l, double *d__), +- mc64rd_(int_t *n, int_t *ne, int_t *ip, int_t *irn, double *a), +- mc64sd_(int_t *n, int_t *ne, int_t *ip, int_t *irn, double *a, +- int *iperm, int_t *numx, int_t *w, int_t *len, int_t *lenl, +- int_t *lenh, int_t *fc, int_t *iw, int_t *iw4), +- mc64wd_(int_t *n, int_t *ne, int_t *ip, int_t *irn, double *a, +- int *iperm, int_t *num, int_t *jperm, int_t *out, +- int_t *pr, int_t *q, int_t *l, double *u, double *d__); - -/* *** Copyright (c) 1999 Council for the Central Laboratory of the */ -/* Research Councils *** */ @@ -346,7 +345,7 @@ - info[2] = *job; - if (icntl[1] >= 0) { - printf(" ****** Error in MC64A/AD. INFO(1) = %2d" -- " because JOB = %d\n", info[1], *job); +- " because JOB = %d\n", (int) info[1], (int) *job); - } - goto L99; - } @@ -356,7 +355,7 @@ - info[2] = *n; - if (icntl[1] >= 0) { - printf(" ****** Error in MC64A/AD. INFO(1) = %2d" -- " because N = %d\n", info[1], *job); +- " because N = %d\n", (int) info[1], (int) *job); - } - goto L99; - } @@ -366,7 +365,7 @@ - info[2] = *ne; - if (icntl[1] >= 0) { - printf(" ****** Error in MC64A/AD. INFO(1) = %2d" -- " because NE = %d\n", info[1], *job); +- " because NE = %d\n", (int) info[1], (int) *job); - } - goto L99; - } @@ -391,7 +390,7 @@ - info[2] = k; - if (icntl[1] >= 0) { - printf(" ****** Error in MC64A/AD. INFO(1) = %2d" -- " LIW too small, must be at least %8d\n", info[1], k); +- " LIW too small, must be at least %8d\n", (int) info[1], (int) k); - } - goto L99; - } @@ -415,7 +414,7 @@ - info[2] = k; - if (icntl[1] >= 0) { - printf(" ****** Error in MC64A/AD. INFO(1) = %2d" -- " LDW too small, must be at least %8d\n", info[1], k); +- " LDW too small, must be at least %8d\n", (int) info[1], (int) k); - } - goto L99; - } @@ -439,7 +438,7 @@ - if (icntl[1] >= 0) { - printf(" ****** Error in MC64A/AD. INFO(1) = %2d Column %8d" - " contains an entry with invalid row index %8d\n", -- info[1], j, i__); +- (int) info[1], (int) j, (int) i__); - } - goto L99; - } @@ -451,7 +450,7 @@ - printf(" ****** Error in MC64A/AD. INFO(1) = %2d" - " Column %8d" - " contains two or more entries with row index %8d\n", -- info[1], j, i__); +- (int) info[1], (int) j, (int) i__); - } - goto L99; - } else { @@ -465,15 +464,15 @@ -/* Print diagnostics on input */ - if (icntl[3] >= 0) { - printf(" ****** Input parameters for MC64A/AD: JOB = %8d," -- " N = %d, NE = %8d\n", *job, *n, *ne); +- " N = %d, NE = %8d\n", (int) *job, (int) *n, (int) *ne); - printf(" IP(1:N+1) = "); - for (j=1; j<=(*n+1); ++j) { -- printf("%8d", ip[j]); +- printf("%8d", (int) ip[j]); - if (j%8 == 0) printf("\n"); - } - printf("\n IRN(1:NE) = "); - for (j=1; j<=(*ne); ++j) { -- printf("%8d", irn[j]); +- printf("%8d", (int) irn[j]); - if (j%8 == 0) printf("\n"); - } - printf("\n"); @@ -621,24 +620,24 @@ - info[1] = 1; - if (icntl[2] >= 0) { - printf(" ****** Warning from MC64A/AD. INFO(1) = %2d" -- " The matrix is structurally singular.\n", info[1]); +- " The matrix is structurally singular.\n", (int)info[1]); - } - } - if (info[1] == 2) { -/* Scaling factors are large, return with warning */ - if (icntl[2] >= 0) { - printf(" ****** Warning from MC64A/AD. INFO(1) = %2d\n" -- " Some scaling factors may be too large.\n", info[1]); +- " Some scaling factors may be too large.\n", (int) info[1]); - } - } -/* Print diagnostics on output */ - if (icntl[3] >= 0) { - printf(" ****** Output parameters for MC64A/AD: INFO(1:2) = %8d%8d\n", -- info[1], info[2]); -- printf(" NUM = %8d", *num); +- (int) info[1], (int) info[2]); +- printf(" NUM = %8d", (int) *num); - printf(" CPERM(1:N) = "); - for (j=1; j<=*n; ++j) { -- printf("%8d", cperm[j]); +- printf("%8d", (int) cperm[j]); - if (j%8 == 0) printf("\n"); - } - if (*job == 5) { @@ -662,7 +661,7 @@ - -/* ********************************************************************** */ -/* Subroutine */ int_t mc64bd_(int_t *n, int_t *ne, int_t *ip, int_t * -- irn, double *a, int_t *iperm, int_t *num, int_t *jperm, +- irn, double *a, int *iperm, int_t *num, int_t *jperm, - int_t *pr, int_t *q, int_t *l, double *d__) -{ - /* System generated locals */ @@ -685,10 +684,10 @@ - double dnew; - int_t jord, qlen, idum, jdum; - double rinf; -- extern /* Subroutine */ int_t mc64dd_(int_t *, int_t *, int_t *, -- double *, int_t *, int_t *), mc64ed_(int_t *, int_t *, -- int_t *, double *, int_t *, int_t *), mc64fd_(int_t * -- , int_t *, int_t *, int_t *, double *, int_t *, int_t *); +- extern /* Subroutine */ int_t +- mc64dd_(int_t *, int_t *, int_t *, double *, int_t *, int_t *), +- mc64ed_(int_t *, int_t *, int_t *, double *, int_t *, int_t *), +- mc64fd_(int_t *, int_t *, int_t *, int_t *, double *, int_t *, int_t *); - - -/* *** Copyright (c) 1999 Council for the Central Laboratory of the */ @@ -1550,11 +1549,10 @@ - -/* ********************************************************************** */ -/* Subroutine */ int_t mc64sd_(int_t *n, int_t *ne, int_t *ip, int_t * -- irn, double *a, int_t *iperm, int_t *numx, int_t *w, +- irn, double *a, int *iperm, int_t *numx, int_t *w, - int_t *len, int_t *lenl, int_t *lenh, int_t *fc, int_t *iw, - int_t *iw4) -+void mc64id_(int *a) - { +-{ - /* System generated locals */ - int_t i__1, i__2, i__3, i__4; - @@ -1562,11 +1560,12 @@ - int_t i__, j, k, l, ii, mod, cnt, num; - double bval, bmin, bmax, rinf; - int_t nval, wlen, idum1, idum2, idum3; -- extern /* Subroutine */ int_t mc64qd_(int_t *, int_t *, int_t *, -- int_t *, int_t *, double *, int_t *, double *), -- mc64ud_(int_t *, int_t *, int_t *, int_t *, int_t *, -- int_t *, int_t *, int_t *, int_t *, int_t *, int_t *, -- int_t *, int_t *, int_t *, int_t *); +- extern /* Subroutine */ int_t +- mc64qd_(int_t *, int_t *, int_t *, int_t *, int_t *, double *, +- int_t *, double *), +- mc64ud_(int_t *, int_t *, int_t *, int_t *, int_t *, +- int_t *, int_t *, int_t *, int_t *, int_t *, int_t *, +- int_t *, int_t *, int_t *, int_t *); - -/* *** Copyright (c) 1999 Council for the Central Laboratory of the */ -/* Research Councils *** */ @@ -2165,7 +2164,7 @@ - -/* ********************************************************************** */ -/* Subroutine */ int_t mc64wd_(int_t *n, int_t *ne, int_t *ip, int_t * -- irn, double *a, int_t *iperm, int_t *num, int_t *jperm, +- irn, double *a, int *iperm, int_t *num, int_t *jperm, - int_t *out, int_t *pr, int_t *q, int_t *l, double *u, - double *d__) -{ @@ -2185,11 +2184,10 @@ - double dmin__, dnew; - int_t jord, qlen, jdum; - double rinf; -- extern /* Subroutine */ int_t mc64dd_(int_t *, int_t *, int_t *, -- double *, int_t *, int_t *), mc64ed_(int_t *, int_t *, -- int_t *, double *, int_t *, int_t *), mc64fd_(int_t * -- , int_t *, int_t *, int_t *, double *, int_t *, -- int_t *); +- extern /* Subroutine */ int_t +- mc64dd_(int_t *, int_t *, int_t *, double *, int_t *, int_t *), +- mc64ed_(int_t *, int_t *, int_t *, double *, int_t *, int_t *), +- mc64fd_(int_t *, int_t *, int_t *, int_t *, double *, int_t *, int_t *); - - -/* *** Copyright (c) 1999 Council for the Central Laboratory of the */ @@ -2648,7 +2646,11 @@ - return 0; -} /* mc64wd_ */ - -- ++#include ++#include + ++void mc64id_(int *a) ++ { + fprintf(stderr, "SuperLU: MC64 functionality not available (it uses non-free code). Aborting.\n"); + abort(); +} @@ -2660,3 +2662,4 @@ + fprintf(stderr, "SuperLU: MC64 functionality not available (it uses non-free code). Aborting.\n"); + abort(); +} +