diff --git a/AMD/Config/amd.h.in b/AMD/Config/amd.h.in index fe403677d..885ca1ac7 100644 --- a/AMD/Config/amd.h.in +++ b/AMD/Config/amd.h.in @@ -313,6 +313,10 @@ void amd_l_control (double Control [ ]) ; void amd_info (double Info [ ]) ; void amd_l_info (double Info [ ]) ; +// amd_version: return AMD version. The version array is returned with +// version [0..2] = {AMD_MAIN_VERSION, AMD_SUB_VERSION, AMD_SUBSUB_VERSION} +void amd_version (int version [3]) ; + #ifdef __cplusplus } #endif diff --git a/AMD/Demo/amd_demo.c b/AMD/Demo/amd_demo.c index 507ab7ccf..b599d06df 100644 --- a/AMD/Demo/amd_demo.c +++ b/AMD/Demo/amd_demo.c @@ -52,14 +52,17 @@ int main (void) double Control [AMD_CONTROL], Info [AMD_INFO] ; char A [24][24] ; - /* here is an example of how to use AMD_VERSION. This code will work in - * any version of AMD. */ -#if defined(AMD_VERSION) && (AMD_VERSION >= AMD_VERSION_CODE(1,2)) printf ("AMD version %d.%d.%d, date: %s\n", AMD_MAIN_VERSION, AMD_SUB_VERSION, AMD_SUBSUB_VERSION, AMD_DATE) ; -#else - printf ("AMD version: 1.1 or earlier\n") ; -#endif + int version [3] ; + amd_version (version) ; + if ((version [0] != AMD_MAIN_VERSION) || + (version [1] != AMD_SUB_VERSION) || + (version [2] != AMD_SUBSUB_VERSION)) + { + fprintf (stderr, "version in header does not match library\n") ; + abort ( ) ; + } printf ("AMD demo, with the 24-by-24 Harwell/Boeing matrix, can_24:\n") ; diff --git a/AMD/Demo/amd_l_demo.c b/AMD/Demo/amd_l_demo.c index 7def82c7a..ff5816ae8 100644 --- a/AMD/Demo/amd_l_demo.c +++ b/AMD/Demo/amd_l_demo.c @@ -53,14 +53,17 @@ int main (void) double Control [AMD_CONTROL], Info [AMD_INFO] ; char A [24][24] ; - /* here is an example of how to use AMD_VERSION. This code will work in - * any version of AMD. */ -#if defined(AMD_VERSION) && (AMD_VERSION >= AMD_VERSION_CODE(1,2)) printf ("AMD version %d.%d.%d, date: %s\n", AMD_MAIN_VERSION, AMD_SUB_VERSION, AMD_SUBSUB_VERSION, AMD_DATE) ; -#else - printf ("AMD version: 1.1 or earlier\n") ; -#endif + int version [3] ; + amd_version (version) ; + if ((version [0] != AMD_MAIN_VERSION) || + (version [1] != AMD_SUB_VERSION) || + (version [2] != AMD_SUBSUB_VERSION)) + { + fprintf (stderr, "version in header does not match library\n") ; + abort ( ) ; + } printf ("AMD demo, with the 24-by-24 Harwell/Boeing matrix, can_24:\n") ; diff --git a/AMD/Doc/AMD_UserGuide.pdf b/AMD/Doc/AMD_UserGuide.pdf index 3fc5b136b..da7a9c959 100644 Binary files a/AMD/Doc/AMD_UserGuide.pdf and b/AMD/Doc/AMD_UserGuide.pdf differ diff --git a/AMD/Doc/AMD_UserGuide.tex b/AMD/Doc/AMD_UserGuide.tex index 2dc47add9..794a29cde 100644 --- a/AMD/Doc/AMD_UserGuide.tex +++ b/AMD/Doc/AMD_UserGuide.tex @@ -202,8 +202,8 @@ \section{Using AMD in a C program} \label{Cversion} %------------------------------------------------------------------------------ -The C-callable AMD library consists of seven user-callable routines and one -include file. There are two versions of each of the routines, with +The C-callable AMD library consists of eight user-callable routines and one +include file. There are two versions of seven of the routines, with \verb'int32_t' and \verb'int64_t' integers. The routines with prefix {\tt amd\_l\_} use \verb'int64_t' integer arguments; the others use @@ -303,6 +303,8 @@ \section{Using AMD in a C program} but it destroys the matrix on output. Additional workspace must be passed. Refer to the source file {\tt AMD/Source/amd\_2.c} for a description. +\item \verb'amd_version': returns the AMD version. + \end{itemize} The nonzero pattern of the matrix $\m{A}$ is represented in compressed column @@ -480,6 +482,16 @@ \section{Synopsis of C-callable routines} \end{verbatim} } +The \verb'amd_version' function uses plain \verb'int': + +{\footnotesize +\begin{verbatim} +#include "amd.h" +int version [3] ; +amd_version (version) ; +\end{verbatim} +} + %------------------------------------------------------------------------------ \section{Using AMD in a Fortran program} %------------------------------------------------------------------------------ diff --git a/AMD/Doc/ChangeLog b/AMD/Doc/ChangeLog index 662793f9f..5a3b39cd9 100644 --- a/AMD/Doc/ChangeLog +++ b/AMD/Doc/ChangeLog @@ -2,6 +2,7 @@ Dec 30, 2023: version 3.3.0 * major change to build system: by Markus Mützel * revised test for integer overflow: for CHOLMOD 5.1.0 tests + * amd_version: added to return version of AMD Sept 18, 2023: version 3.2.1 diff --git a/AMD/Include/amd.h b/AMD/Include/amd.h index 990df534b..fb2fd4beb 100644 --- a/AMD/Include/amd.h +++ b/AMD/Include/amd.h @@ -313,6 +313,10 @@ void amd_l_control (double Control [ ]) ; void amd_info (double Info [ ]) ; void amd_l_info (double Info [ ]) ; +// amd_version: return AMD version. The version array is returned with +// version [0..2] = {AMD_MAIN_VERSION, AMD_SUB_VERSION, AMD_SUBSUB_VERSION} +void amd_version (int version [3]) ; + #ifdef __cplusplus } #endif diff --git a/AMD/Source/amd_version.c b/AMD/Source/amd_version.c new file mode 100644 index 000000000..7d045f351 --- /dev/null +++ b/AMD/Source/amd_version.c @@ -0,0 +1,19 @@ +//------------------------------------------------------------------------------ +// AMD/Source/amd_version: return AMD version +//------------------------------------------------------------------------------ + +// AMD, Copyright (c) 1996-2023, Timothy A. Davis, Patrick R. Amestoy, and +// Iain S. Duff. All Rights Reserved. +// SPDX-License-Identifier: BSD-3-clause + +//------------------------------------------------------------------------------ + +#include "amd_internal.h" + +void amd_version (int version [3]) +{ + version [0] = AMD_MAIN_VERSION ; + version [1] = AMD_SUB_VERSION ; + version [2] = AMD_SUBSUB_VERSION ; +} + diff --git a/BTF/Config/btf.h.in b/BTF/Config/btf.h.in index 4714b0195..057a9df52 100644 --- a/BTF/Config/btf.h.in +++ b/BTF/Config/btf.h.in @@ -218,6 +218,12 @@ int32_t btf_order /* returns number of blocks found */ int64_t btf_l_order (int64_t, int64_t *, int64_t *, double , double *, int64_t *, int64_t *, int64_t *, int64_t *, int64_t *) ; +//------------------------------------------------------------------------------ +// btf_version: return BTF version +//------------------------------------------------------------------------------ + +void btf_version (int version [3]) ; + #ifdef __cplusplus } #endif diff --git a/BTF/Doc/ChangeLog b/BTF/Doc/ChangeLog index ea8758061..4c181456b 100644 --- a/BTF/Doc/ChangeLog +++ b/BTF/Doc/ChangeLog @@ -1,6 +1,7 @@ Dec 30, 2023: version 2.3.0 * major change to build system: by Markus Mützel + * btf_version: added to return version of BTF Sept 18, 2023: version 2.2.1 diff --git a/BTF/Include/btf.h b/BTF/Include/btf.h index c3ccd3f8a..768e7daf0 100644 --- a/BTF/Include/btf.h +++ b/BTF/Include/btf.h @@ -218,6 +218,12 @@ int32_t btf_order /* returns number of blocks found */ int64_t btf_l_order (int64_t, int64_t *, int64_t *, double , double *, int64_t *, int64_t *, int64_t *, int64_t *, int64_t *) ; +//------------------------------------------------------------------------------ +// btf_version: return BTF version +//------------------------------------------------------------------------------ + +void btf_version (int version [3]) ; + #ifdef __cplusplus } #endif diff --git a/BTF/Source/btf_version.c b/BTF/Source/btf_version.c new file mode 100644 index 000000000..151f24d79 --- /dev/null +++ b/BTF/Source/btf_version.c @@ -0,0 +1,19 @@ +//------------------------------------------------------------------------------ +// BTF/Source/btf_version: return BTF version +//------------------------------------------------------------------------------ + +// BTF, Copyright (c) 2004-2023, University of Florida. All Rights Reserved. +// Author: Timothy A. Davis. +// SPDX-License-Identifier: LGPL-2.1+ + +//------------------------------------------------------------------------------ + +#include "btf.h" + +void btf_version (int version [3]) +{ + version [0] = BTF_MAIN_VERSION ; + version [1] = BTF_SUB_VERSION ; + version [2] = BTF_SUBSUB_VERSION ; +} + diff --git a/CAMD/Config/camd.h.in b/CAMD/Config/camd.h.in index acb464239..70d5c9fb5 100644 --- a/CAMD/Config/camd.h.in +++ b/CAMD/Config/camd.h.in @@ -327,6 +327,10 @@ void camd_l_control (double Control [ ]) ; void camd_info (double Info [ ]) ; void camd_l_info (double Info [ ]) ; +// camd_version: return CAMD version. The version array is returned with +// version [0..2] = {CAMD_MAIN_VERSION, CAMD_SUB_VERSION, CAMD_SUBSUB_VERSION} +void camd_version (int version [3]) ; + #ifdef __cplusplus } #endif diff --git a/CAMD/Demo/camd_demo.c b/CAMD/Demo/camd_demo.c index 4930ea3fe..a484e69d7 100644 --- a/CAMD/Demo/camd_demo.c +++ b/CAMD/Demo/camd_demo.c @@ -54,8 +54,18 @@ int main (void) int32_t C [ ] = { 0, 0, 4, 0, 1, 0, 2, 2, 1, 1, 3, 4, 5, 5, 3, 4, 5, 2, 5, 3, 4, 2, 1, 0 } ; - printf ("CAMD version %d.%d, date: %s\n", CAMD_MAIN_VERSION, - CAMD_SUB_VERSION, CAMD_DATE) ; + printf ("CAMD version %d.%d.%d, date: %s\n", + CAMD_MAIN_VERSION, CAMD_SUB_VERSION, CAMD_SUBSUB_VERSION, CAMD_DATE) ; + int version [3] ; + camd_version (version) ; + if ((version [0] != CAMD_MAIN_VERSION) || + (version [1] != CAMD_SUB_VERSION) || + (version [2] != CAMD_SUBSUB_VERSION)) + { + fprintf (stderr, "version in header does not match library\n") ; + abort ( ) ; + } + printf ("CAMD demo, with the 24-by-24 Harwell/Boeing matrix, can_24:\n") ; /* get the default parameters, and print them */ diff --git a/CAMD/Demo/camd_demo.out b/CAMD/Demo/camd_demo.out index 555f49a8d..fce82ea16 100644 --- a/CAMD/Demo/camd_demo.out +++ b/CAMD/Demo/camd_demo.out @@ -1,4 +1,4 @@ -CAMD version 3.3, date: Dec 30, 2023 +CAMD version 3.3.0, date: Dec 30, 2023 CAMD demo, with the 24-by-24 Harwell/Boeing matrix, can_24: camd version 3.3.0, Dec 30, 2023: approximate minimum degree ordering: diff --git a/CAMD/Demo/camd_l_demo.c b/CAMD/Demo/camd_l_demo.c index dad9ee9fc..eb6610f8d 100644 --- a/CAMD/Demo/camd_l_demo.c +++ b/CAMD/Demo/camd_l_demo.c @@ -55,8 +55,18 @@ int main (void) int64_t C [ ] = { 0, 0, 4, 0, 1, 0, 2, 2, 1, 1, 3, 4, 5, 5, 3, 4, 5, 2, 5, 3, 4, 2, 1, 0 }; - printf ("CAMD version %d.%d, date: %s\n", CAMD_MAIN_VERSION, - CAMD_SUB_VERSION, CAMD_DATE) ; + printf ("CAMD version %d.%d.%d, date: %s\n", + CAMD_MAIN_VERSION, CAMD_SUB_VERSION, CAMD_SUBSUB_VERSION, CAMD_DATE) ; + int version [3] ; + camd_version (version) ; + if ((version [0] != CAMD_MAIN_VERSION) || + (version [1] != CAMD_SUB_VERSION) || + (version [2] != CAMD_SUBSUB_VERSION)) + { + fprintf (stderr, "version in header does not match library\n") ; + abort ( ) ; + } + printf ("CAMD demo, with the 24-by-24 Harwell/Boeing matrix, can_24:\n") ; /* get the default parameters, and print them */ diff --git a/CAMD/Demo/camd_l_demo.out b/CAMD/Demo/camd_l_demo.out index a8a5b8f96..2898584d1 100644 --- a/CAMD/Demo/camd_l_demo.out +++ b/CAMD/Demo/camd_l_demo.out @@ -1,4 +1,4 @@ -CAMD version 3.3, date: Dec 30, 2023 +CAMD version 3.3.0, date: Dec 30, 2023 CAMD demo, with the 24-by-24 Harwell/Boeing matrix, can_24: camd version 3.3.0, Dec 30, 2023: approximate minimum degree ordering: diff --git a/CAMD/Doc/CAMD_UserGuide.tex b/CAMD/Doc/CAMD_UserGuide.tex index 6dbe6f60f..d2a2974ef 100644 --- a/CAMD/Doc/CAMD_UserGuide.tex +++ b/CAMD/Doc/CAMD_UserGuide.tex @@ -207,8 +207,8 @@ \section{Using CAMD in a C program} \label{Cversion} %------------------------------------------------------------------------------ -The C-callable CAMD library consists of seven user-callable routines and one -include file. There are two versions of each of the routines, with +The C-callable CAMD library consists of eight user-callable routines and one +include file. There are two versions of seven of the routines, with \verb'int32_t' and \verb'int64_t' integers. The routines with prefix {\tt camd\_l\_} use \verb'int64_t' integer arguments; the others use @@ -314,6 +314,8 @@ \section{Using CAMD in a C program} but it destroys the matrix on output. Additional workspace must be passed. Refer to the source file {\tt CAMD/Source/camd\_2.c} for a description. +\item \verb'camd_version': returns the CAMD version + \end{itemize} The nonzero pattern of the matrix $\m{A}$ is represented in compressed column @@ -495,6 +497,16 @@ \section{Synopsis of C-callable routines} \end{verbatim} } +The \verb'camd_version' function uses plain \verb'int': + +{\footnotesize +\begin{verbatim} +#include "camd.h" +int version [3] ; +camd_version (version) ; +\end{verbatim} +} + %------------------------------------------------------------------------------ \section{Installation} \label{Install} diff --git a/CAMD/Doc/ChangeLog b/CAMD/Doc/ChangeLog index d3006d5af..5614229b1 100644 --- a/CAMD/Doc/ChangeLog +++ b/CAMD/Doc/ChangeLog @@ -2,6 +2,7 @@ Dec 30, 2023: version 3.3.0 * major change to build system: by Markus Mützel * revised test for integer overflow: for CHOLMOD 5.1.0 tests + * camd_version: added to return version of CAMD Sept 18, 2023: version 3.2.1 diff --git a/CAMD/Include/camd.h b/CAMD/Include/camd.h index 29712acfc..59a06c10c 100644 --- a/CAMD/Include/camd.h +++ b/CAMD/Include/camd.h @@ -327,6 +327,10 @@ void camd_l_control (double Control [ ]) ; void camd_info (double Info [ ]) ; void camd_l_info (double Info [ ]) ; +// camd_version: return CAMD version. The version array is returned with +// version [0..2] = {CAMD_MAIN_VERSION, CAMD_SUB_VERSION, CAMD_SUBSUB_VERSION} +void camd_version (int version [3]) ; + #ifdef __cplusplus } #endif diff --git a/CAMD/Source/camd_version.c b/CAMD/Source/camd_version.c new file mode 100644 index 000000000..eec82ca9f --- /dev/null +++ b/CAMD/Source/camd_version.c @@ -0,0 +1,19 @@ +//------------------------------------------------------------------------------ +// CAMD/Source/camd_version: return CAMD version +//------------------------------------------------------------------------------ + +// CAMD, Copyright (c) 2007-2023, Timothy A. Davis, Yanqing Chen, Patrick R. +// Amestoy, and Iain S. Duff. All Rights Reserved. +// SPDX-License-Identifier: BSD-3-clause + +//------------------------------------------------------------------------------ + +#include "camd_internal.h" + +void camd_version (int version [3]) +{ + version [0] = CAMD_MAIN_VERSION ; + version [1] = CAMD_SUB_VERSION ; + version [2] = CAMD_SUBSUB_VERSION ; +} + diff --git a/CCOLAMD/Config/ccolamd.h.in b/CCOLAMD/Config/ccolamd.h.in index ad33d1082..554a39185 100644 --- a/CCOLAMD/Config/ccolamd.h.in +++ b/CCOLAMD/Config/ccolamd.h.in @@ -217,6 +217,7 @@ void csymamd_l_report int64_t stats [CCOLAMD_STATS] ) ; +void ccolamd_version (int version [3]) ; /* ========================================================================== */ /* === Prototypes of "expert" routines ====================================== */ diff --git a/CCOLAMD/Demo/ccolamd_example.c b/CCOLAMD/Demo/ccolamd_example.c index 24fab6049..05e3b5418 100644 --- a/CCOLAMD/Demo/ccolamd_example.c +++ b/CCOLAMD/Demo/ccolamd_example.c @@ -99,6 +99,21 @@ int main (void) int row, col, pp, length, ok ; + //-------------------------------------------------------------------------- + // ccolamd version + //-------------------------------------------------------------------------- + + int version [3] ; + ccolamd_version (version) ; + printf ("CCOLAMD v%d.%d.%d\n", version [0], version [1], version [2]) ; + if ((version [0] != CCOLAMD_MAIN_VERSION) || + (version [1] != CCOLAMD_SUB_VERSION) || + (version [2] != CCOLAMD_SUBSUB_VERSION)) + { + fprintf (stderr, "version in header does not match library\n") ; + abort ( ) ; + } + /* ====================================================================== */ /* dump the input matrix A */ /* ====================================================================== */ diff --git a/CCOLAMD/Demo/ccolamd_example.out b/CCOLAMD/Demo/ccolamd_example.out index 3b8a9d224..ccc7e4857 100644 --- a/CCOLAMD/Demo/ccolamd_example.out +++ b/CCOLAMD/Demo/ccolamd_example.out @@ -1,3 +1,4 @@ +CCOLAMD v3.3.0 ccolamd 5-by-4 input matrix: Column 0, with 3 entries: row 0 diff --git a/CCOLAMD/Demo/ccolamd_l_example.c b/CCOLAMD/Demo/ccolamd_l_example.c index 57bd806e5..f4a122c8e 100644 --- a/CCOLAMD/Demo/ccolamd_l_example.c +++ b/CCOLAMD/Demo/ccolamd_l_example.c @@ -99,6 +99,21 @@ int main (void) int64_t row, col, pp, length ; int ok ; + //-------------------------------------------------------------------------- + // ccolamd version + //-------------------------------------------------------------------------- + + int version [3] ; + ccolamd_version (version) ; + printf ("CCOLAMD v%d.%d.%d\n", version [0], version [1], version [2]) ; + if ((version [0] != CCOLAMD_MAIN_VERSION) || + (version [1] != CCOLAMD_SUB_VERSION) || + (version [2] != CCOLAMD_SUBSUB_VERSION)) + { + fprintf (stderr, "version in header does not match library\n") ; + abort ( ) ; + } + /* ====================================================================== */ /* dump the input matrix A */ /* ====================================================================== */ diff --git a/CCOLAMD/Demo/ccolamd_l_example.out b/CCOLAMD/Demo/ccolamd_l_example.out index 89309dbf4..8fef5e268 100644 --- a/CCOLAMD/Demo/ccolamd_l_example.out +++ b/CCOLAMD/Demo/ccolamd_l_example.out @@ -1,3 +1,4 @@ +CCOLAMD v3.3.0 ccolamd 5-by-4 input matrix: Column 0, with 3 entries: row 0 diff --git a/CCOLAMD/Doc/ChangeLog b/CCOLAMD/Doc/ChangeLog index 89c44ff84..fa92ef772 100644 --- a/CCOLAMD/Doc/ChangeLog +++ b/CCOLAMD/Doc/ChangeLog @@ -1,6 +1,7 @@ Dec 30, 2023: version 3.3.0 * major change to build system: by Markus Mützel + * ccolamd_version: added to return version of CCOLAMD Sept 18, 2023: version 3.2.1 diff --git a/CCOLAMD/Include/ccolamd.h b/CCOLAMD/Include/ccolamd.h index 9795bf908..0df99feff 100644 --- a/CCOLAMD/Include/ccolamd.h +++ b/CCOLAMD/Include/ccolamd.h @@ -217,6 +217,7 @@ void csymamd_l_report int64_t stats [CCOLAMD_STATS] ) ; +void ccolamd_version (int version [3]) ; /* ========================================================================== */ /* === Prototypes of "expert" routines ====================================== */ diff --git a/CCOLAMD/Source/ccolamd.c b/CCOLAMD/Source/ccolamd.c index 445f14d55..8fd5f3584 100644 --- a/CCOLAMD/Source/ccolamd.c +++ b/CCOLAMD/Source/ccolamd.c @@ -973,6 +973,19 @@ PRIVATE void print_report /* === USER-CALLABLE ROUTINES: ============================================== */ /* ========================================================================== */ +//------------------------------------------------------------------------------ +// ccolamd_version: return CCOLAMD version +//------------------------------------------------------------------------------ + +#ifndef DLONG +void ccolamd_version (int version [3]) +{ + version [0] = CCOLAMD_MAIN_VERSION ; + version [1] = CCOLAMD_SUB_VERSION ; + version [2] = CCOLAMD_SUBSUB_VERSION ; +} +#endif + /* ========================================================================== */ /* === ccolamd_recommended ================================================== */ diff --git a/CHOLMOD/Demo/cholmod_demo.h b/CHOLMOD/Demo/cholmod_demo.h index 84c96b3f4..9cedf573f 100644 --- a/CHOLMOD/Demo/cholmod_demo.h +++ b/CHOLMOD/Demo/cholmod_demo.h @@ -9,6 +9,12 @@ //------------------------------------------------------------------------------ #include "cholmod.h" +#include "amd.h" +#include "colamd.h" +#ifndef NCAMD +#include "camd.h" +#include "ccolamd.h" +#endif #include #define TRUE 1 #define FALSE 0 diff --git a/CHOLMOD/Demo/cholmod_di_demo.c b/CHOLMOD/Demo/cholmod_di_demo.c index fbd27bf50..b99ecd9b0 100644 --- a/CHOLMOD/Demo/cholmod_di_demo.c +++ b/CHOLMOD/Demo/cholmod_di_demo.c @@ -55,6 +55,19 @@ static void my_handler (int status, const char *file, int line, } } +static void check_version (char *package, int ver [3], + int major, int minor, int patch) +{ + printf ("%s version %d.%d.%d\n", package, ver [0], ver [1], ver [2]) ; + if (ver [0] != major || ver [1] != minor || ver [2] != patch) + { + printf ("header version differs (%d,%d,%d) from library\n", + major, minor, patch) ; + my_handler (CHOLMOD_INVALID, __FILE__, __LINE__, + "version mismatch") ; + } +} + int main (int argc, char **argv) { double @@ -136,14 +149,41 @@ int main (int argc, char **argv) beta [1] = 0 ; //-------------------------------------------------------------------------- - // read in a matrix + // check versions //-------------------------------------------------------------------------- printf ("\n---------------------------------- cholmod_di_demo:\n") ; + cholmod_version (ver) ; - printf ("cholmod version %d.%d.%d\n", ver [0], ver [1], ver [2]) ; + check_version ("cholmod", ver, CHOLMOD_MAIN_VERSION, + CHOLMOD_SUB_VERSION, CHOLMOD_SUBSUB_VERSION) ; + SuiteSparse_version (ver) ; - printf ("SuiteSparse version %d.%d.%d\n", ver [0], ver [1], ver [2]) ; + check_version ("SuiteSparse", ver, SUITESPARSE_MAIN_VERSION, + SUITESPARSE_SUB_VERSION, SUITESPARSE_SUBSUB_VERSION) ; + + amd_version (ver) ; + check_version ("AMD", ver, AMD_MAIN_VERSION, + AMD_SUB_VERSION, AMD_SUBSUB_VERSION) ; + + colamd_version (ver) ; + check_version ("COLAMD", ver, COLAMD_MAIN_VERSION, + COLAMD_SUB_VERSION, COLAMD_SUBSUB_VERSION) ; + + #ifndef NCAMD + camd_version (ver) ; + check_version ("CAMD", ver, CAMD_MAIN_VERSION, + CAMD_SUB_VERSION, CAMD_SUBSUB_VERSION) ; + + ccolamd_version (ver) ; + check_version ("CCOLAMD", ver, CCOLAMD_MAIN_VERSION, + CCOLAMD_SUB_VERSION, CCOLAMD_SUBSUB_VERSION) ; + #endif + + //-------------------------------------------------------------------------- + // read in a matrix + //-------------------------------------------------------------------------- + A = cholmod_read_sparse2 (f, CHOLMOD_DOUBLE, cm) ; if (ff != NULL) { diff --git a/CHOLMOD/Demo/cholmod_dl_demo.c b/CHOLMOD/Demo/cholmod_dl_demo.c index 906fda8f5..f932ff80b 100644 --- a/CHOLMOD/Demo/cholmod_dl_demo.c +++ b/CHOLMOD/Demo/cholmod_dl_demo.c @@ -55,6 +55,19 @@ static void my_handler (int status, const char *file, int line, } } +static void check_version (char *package, int ver [3], + int major, int minor, int patch) +{ + printf ("%s version %d.%d.%d\n", package, ver [0], ver [1], ver [2]) ; + if (ver [0] != major || ver [1] != minor || ver [2] != patch) + { + printf ("header version differs (%d,%d,%d) from library\n", + major, minor, patch) ; + my_handler (CHOLMOD_INVALID, __FILE__, __LINE__, + "version mismatch") ; + } +} + int main (int argc, char **argv) { double @@ -136,14 +149,41 @@ int main (int argc, char **argv) beta [1] = 0 ; //-------------------------------------------------------------------------- - // read in a matrix + // check versions //-------------------------------------------------------------------------- printf ("\n---------------------------------- cholmod_dl_demo:\n") ; + cholmod_l_version (ver) ; - printf ("cholmod version %d.%d.%d\n", ver [0], ver [1], ver [2]) ; + check_version ("cholmod", ver, CHOLMOD_MAIN_VERSION, + CHOLMOD_SUB_VERSION, CHOLMOD_SUBSUB_VERSION) ; + SuiteSparse_version (ver) ; - printf ("SuiteSparse version %d.%d.%d\n", ver [0], ver [1], ver [2]) ; + check_version ("SuiteSparse", ver, SUITESPARSE_MAIN_VERSION, + SUITESPARSE_SUB_VERSION, SUITESPARSE_SUBSUB_VERSION) ; + + amd_version (ver) ; + check_version ("AMD", ver, AMD_MAIN_VERSION, + AMD_SUB_VERSION, AMD_SUBSUB_VERSION) ; + + colamd_version (ver) ; + check_version ("COLAMD", ver, COLAMD_MAIN_VERSION, + COLAMD_SUB_VERSION, COLAMD_SUBSUB_VERSION) ; + + #ifndef NCAMD + camd_version (ver) ; + check_version ("CAMD", ver, CAMD_MAIN_VERSION, + CAMD_SUB_VERSION, CAMD_SUBSUB_VERSION) ; + + ccolamd_version (ver) ; + check_version ("CCOLAMD", ver, CCOLAMD_MAIN_VERSION, + CCOLAMD_SUB_VERSION, CCOLAMD_SUBSUB_VERSION) ; + #endif + + //-------------------------------------------------------------------------- + // read in a matrix + //-------------------------------------------------------------------------- + A = cholmod_l_read_sparse2 (f, CHOLMOD_DOUBLE, cm) ; if (ff != NULL) { diff --git a/CHOLMOD/Demo/cholmod_si_demo.c b/CHOLMOD/Demo/cholmod_si_demo.c index 8026f4130..2b4151ead 100644 --- a/CHOLMOD/Demo/cholmod_si_demo.c +++ b/CHOLMOD/Demo/cholmod_si_demo.c @@ -55,6 +55,19 @@ static void my_handler (int status, const char *file, int line, } } +static void check_version (char *package, int ver [3], + int major, int minor, int patch) +{ + printf ("%s version %d.%d.%d\n", package, ver [0], ver [1], ver [2]) ; + if (ver [0] != major || ver [1] != minor || ver [2] != patch) + { + printf ("header version differs (%d,%d,%d) from library\n", + major, minor, patch) ; + my_handler (CHOLMOD_INVALID, __FILE__, __LINE__, + "version mismatch") ; + } +} + int main (int argc, char **argv) { double @@ -136,14 +149,41 @@ int main (int argc, char **argv) beta [1] = 0 ; //-------------------------------------------------------------------------- - // read in a matrix + // check versions //-------------------------------------------------------------------------- printf ("\n---------------------------------- cholmod_si_demo:\n") ; + cholmod_version (ver) ; - printf ("cholmod version %d.%d.%d\n", ver [0], ver [1], ver [2]) ; + check_version ("cholmod", ver, CHOLMOD_MAIN_VERSION, + CHOLMOD_SUB_VERSION, CHOLMOD_SUBSUB_VERSION) ; + SuiteSparse_version (ver) ; - printf ("SuiteSparse version %d.%d.%d\n", ver [0], ver [1], ver [2]) ; + check_version ("SuiteSparse", ver, SUITESPARSE_MAIN_VERSION, + SUITESPARSE_SUB_VERSION, SUITESPARSE_SUBSUB_VERSION) ; + + amd_version (ver) ; + check_version ("AMD", ver, AMD_MAIN_VERSION, + AMD_SUB_VERSION, AMD_SUBSUB_VERSION) ; + + colamd_version (ver) ; + check_version ("COLAMD", ver, COLAMD_MAIN_VERSION, + COLAMD_SUB_VERSION, COLAMD_SUBSUB_VERSION) ; + + #ifndef NCAMD + camd_version (ver) ; + check_version ("CAMD", ver, CAMD_MAIN_VERSION, + CAMD_SUB_VERSION, CAMD_SUBSUB_VERSION) ; + + ccolamd_version (ver) ; + check_version ("CCOLAMD", ver, CCOLAMD_MAIN_VERSION, + CCOLAMD_SUB_VERSION, CCOLAMD_SUBSUB_VERSION) ; + #endif + + //-------------------------------------------------------------------------- + // read in a matrix + //-------------------------------------------------------------------------- + A = cholmod_read_sparse2 (f, CHOLMOD_SINGLE, cm) ; if (ff != NULL) { diff --git a/CHOLMOD/Demo/cholmod_sl_demo.c b/CHOLMOD/Demo/cholmod_sl_demo.c index 71b3ad237..348407bc2 100644 --- a/CHOLMOD/Demo/cholmod_sl_demo.c +++ b/CHOLMOD/Demo/cholmod_sl_demo.c @@ -55,6 +55,19 @@ static void my_handler (int status, const char *file, int line, } } +static void check_version (char *package, int ver [3], + int major, int minor, int patch) +{ + printf ("%s version %d.%d.%d\n", package, ver [0], ver [1], ver [2]) ; + if (ver [0] != major || ver [1] != minor || ver [2] != patch) + { + printf ("header version differs (%d,%d,%d) from library\n", + major, minor, patch) ; + my_handler (CHOLMOD_INVALID, __FILE__, __LINE__, + "version mismatch") ; + } +} + int main (int argc, char **argv) { double @@ -136,14 +149,41 @@ int main (int argc, char **argv) beta [1] = 0 ; //-------------------------------------------------------------------------- - // read in a matrix + // check versions //-------------------------------------------------------------------------- printf ("\n---------------------------------- cholmod_sl_demo:\n") ; + cholmod_l_version (ver) ; - printf ("cholmod version %d.%d.%d\n", ver [0], ver [1], ver [2]) ; + check_version ("cholmod", ver, CHOLMOD_MAIN_VERSION, + CHOLMOD_SUB_VERSION, CHOLMOD_SUBSUB_VERSION) ; + SuiteSparse_version (ver) ; - printf ("SuiteSparse version %d.%d.%d\n", ver [0], ver [1], ver [2]) ; + check_version ("SuiteSparse", ver, SUITESPARSE_MAIN_VERSION, + SUITESPARSE_SUB_VERSION, SUITESPARSE_SUBSUB_VERSION) ; + + amd_version (ver) ; + check_version ("AMD", ver, AMD_MAIN_VERSION, + AMD_SUB_VERSION, AMD_SUBSUB_VERSION) ; + + colamd_version (ver) ; + check_version ("COLAMD", ver, COLAMD_MAIN_VERSION, + COLAMD_SUB_VERSION, COLAMD_SUBSUB_VERSION) ; + + #ifndef NCAMD + camd_version (ver) ; + check_version ("CAMD", ver, CAMD_MAIN_VERSION, + CAMD_SUB_VERSION, CAMD_SUBSUB_VERSION) ; + + ccolamd_version (ver) ; + check_version ("CCOLAMD", ver, CCOLAMD_MAIN_VERSION, + CCOLAMD_SUB_VERSION, CCOLAMD_SUBSUB_VERSION) ; + #endif + + //-------------------------------------------------------------------------- + // read in a matrix + //-------------------------------------------------------------------------- + A = cholmod_l_read_sparse2 (f, CHOLMOD_SINGLE, cm) ; if (ff != NULL) { diff --git a/CHOLMOD/Tcov/t_amdtest.c b/CHOLMOD/Tcov/t_amdtest.c index 866b9d1d2..e026af401 100644 --- a/CHOLMOD/Tcov/t_amdtest.c +++ b/CHOLMOD/Tcov/t_amdtest.c @@ -10,6 +10,7 @@ #undef ASSERT #include "amd.h" +#include "colamd.h" #include "amd_internal.h" #undef FLIP @@ -30,11 +31,31 @@ void amdtest (cholmod_sparse *A) Int i, j, n, nrow, ncol, ok, cnz, bnz, p, trial, sorted ; //-------------------------------------------------------------------------- - // get inputs + // check version //-------------------------------------------------------------------------- printf ("\nAMD test\n") ; + printf ("AMD version %d.%d.%d, date: %s\n", + AMD_MAIN_VERSION, AMD_SUB_VERSION, AMD_SUBSUB_VERSION, AMD_DATE) ; + int version [3] ; + amd_version (version) ; + OK ((version [0] == AMD_MAIN_VERSION) && + (version [1] == AMD_SUB_VERSION) && + (version [2] == AMD_SUBSUB_VERSION)) ; + + printf ("COLAMD version %d.%d.%d, date: %s\n", + COLAMD_MAIN_VERSION, COLAMD_SUB_VERSION, COLAMD_SUBSUB_VERSION, + COLAMD_DATE) ; + colamd_version (version) ; + OK ((version [0] == COLAMD_MAIN_VERSION) && + (version [1] == COLAMD_SUB_VERSION) && + (version [2] == COLAMD_SUBSUB_VERSION)) ; + + //-------------------------------------------------------------------------- + // get inputs + //-------------------------------------------------------------------------- + if (A == NULL) { return ; diff --git a/CHOLMOD/Tcov/t_camdtest.c b/CHOLMOD/Tcov/t_camdtest.c index 9ed047651..dd5e4b7fd 100644 --- a/CHOLMOD/Tcov/t_camdtest.c +++ b/CHOLMOD/Tcov/t_camdtest.c @@ -16,6 +16,7 @@ #undef ASSERT #ifndef NCAMD #include "camd.h" +#include "ccolamd.h" #include "camd_internal.h" //------------------------------------------------------------------------------ @@ -32,11 +33,31 @@ void camdtest (cholmod_sparse *A) Int i, j, n, nrow, ncol, ok, cnz, bnz, p, trial, sorted ; //-------------------------------------------------------------------------- - // get inputs + // check version //-------------------------------------------------------------------------- printf ("\nCAMD test\n") ; + printf ("CAMD version %d.%d.%d, date: %s\n", + CAMD_MAIN_VERSION, CAMD_SUB_VERSION, CAMD_SUBSUB_VERSION, CAMD_DATE) ; + int version [3] ; + camd_version (version) ; + OK ((version [0] == CAMD_MAIN_VERSION) && + (version [1] == CAMD_SUB_VERSION) && + (version [2] == CAMD_SUBSUB_VERSION)) ; + + printf ("CCOLAMD version %d.%d.%d, date: %s\n", + CCOLAMD_MAIN_VERSION, CCOLAMD_SUB_VERSION, CCOLAMD_SUBSUB_VERSION, + CCOLAMD_DATE) ; + ccolamd_version (version) ; + OK ((version [0] == CCOLAMD_MAIN_VERSION) && + (version [1] == CCOLAMD_SUB_VERSION) && + (version [2] == CCOLAMD_SUBSUB_VERSION)) ; + + //-------------------------------------------------------------------------- + // get inputs + //-------------------------------------------------------------------------- + if (A == NULL) { return ; diff --git a/COLAMD/Config/colamd.h.in b/COLAMD/Config/colamd.h.in index ac509df7a..9740501a5 100644 --- a/COLAMD/Config/colamd.h.in +++ b/COLAMD/Config/colamd.h.in @@ -234,6 +234,8 @@ void symamd_l_report int64_t stats [COLAMD_STATS] ) ; +void colamd_version (int version [3]) ; + #ifdef __cplusplus } #endif diff --git a/COLAMD/Demo/colamd_example.c b/COLAMD/Demo/colamd_example.c index e478f7d21..b64ca33e9 100644 --- a/COLAMD/Demo/colamd_example.c +++ b/COLAMD/Demo/colamd_example.c @@ -98,6 +98,21 @@ int main (void) int row, col, pp, length, ok ; + //-------------------------------------------------------------------------- + // colamd version + //-------------------------------------------------------------------------- + + int version [3] ; + colamd_version (version) ; + printf ("COLAMD v%d.%d.%d\n", version [0], version [1], version [2]) ; + if ((version [0] != COLAMD_MAIN_VERSION) || + (version [1] != COLAMD_SUB_VERSION) || + (version [2] != COLAMD_SUBSUB_VERSION)) + { + fprintf (stderr, "version in header does not match library\n") ; + abort ( ) ; + } + /* ====================================================================== */ /* dump the input matrix A */ /* ====================================================================== */ diff --git a/COLAMD/Demo/colamd_example.out b/COLAMD/Demo/colamd_example.out index ecfaac7c6..04e46e022 100644 --- a/COLAMD/Demo/colamd_example.out +++ b/COLAMD/Demo/colamd_example.out @@ -1,3 +1,4 @@ +COLAMD v3.3.0 colamd 5-by-4 input matrix: Column 0, with 3 entries: row 0 diff --git a/COLAMD/Demo/colamd_l_example.c b/COLAMD/Demo/colamd_l_example.c index b48a55bff..3bf4c18ca 100644 --- a/COLAMD/Demo/colamd_l_example.c +++ b/COLAMD/Demo/colamd_l_example.c @@ -99,6 +99,21 @@ int main (void) int64_t row, col, pp, length ; int ok ; + //-------------------------------------------------------------------------- + // colamd version + //-------------------------------------------------------------------------- + + int version [3] ; + colamd_version (version) ; + printf ("COLAMD v%d.%d.%d\n", version [0], version [1], version [2]) ; + if ((version [0] != COLAMD_MAIN_VERSION) || + (version [1] != COLAMD_SUB_VERSION) || + (version [2] != COLAMD_SUBSUB_VERSION)) + { + fprintf (stderr, "version in header does not match library\n") ; + abort ( ) ; + } + /* ====================================================================== */ /* dump the input matrix A */ /* ====================================================================== */ diff --git a/COLAMD/Demo/colamd_l_example.out b/COLAMD/Demo/colamd_l_example.out index 479ac3d75..a284430c4 100644 --- a/COLAMD/Demo/colamd_l_example.out +++ b/COLAMD/Demo/colamd_l_example.out @@ -1,3 +1,4 @@ +COLAMD v3.3.0 colamd 5-by-4 input matrix: Column 0, with 3 entries: row 0 diff --git a/COLAMD/Doc/ChangeLog b/COLAMD/Doc/ChangeLog index 7ca85dfc2..778aac9cd 100644 --- a/COLAMD/Doc/ChangeLog +++ b/COLAMD/Doc/ChangeLog @@ -1,6 +1,7 @@ Dec 30, 2023: version 3.3.0 * major change to build system: by Markus Mützel + * colamd_version: added to return version of COLAMD Sept 18, 2023: version 3.2.1 diff --git a/COLAMD/Include/colamd.h b/COLAMD/Include/colamd.h index 405cff873..2ced53788 100644 --- a/COLAMD/Include/colamd.h +++ b/COLAMD/Include/colamd.h @@ -234,6 +234,8 @@ void symamd_l_report int64_t stats [COLAMD_STATS] ) ; +void colamd_version (int version [3]) ; + #ifdef __cplusplus } #endif diff --git a/COLAMD/Source/colamd.c b/COLAMD/Source/colamd.c index af5b27f7a..bc4160bb4 100644 --- a/COLAMD/Source/colamd.c +++ b/COLAMD/Source/colamd.c @@ -974,6 +974,19 @@ PRIVATE void debug_structures /* === USER-CALLABLE ROUTINES: ============================================== */ /* ========================================================================== */ +//------------------------------------------------------------------------------ +// colamd_version: return COLAMD version +//------------------------------------------------------------------------------ + +#ifndef DLONG +void colamd_version (int version [3]) +{ + version [0] = COLAMD_MAIN_VERSION ; + version [1] = COLAMD_SUB_VERSION ; + version [2] = COLAMD_SUBSUB_VERSION ; +} +#endif + /* ========================================================================== */ /* === colamd_recommended =================================================== */ /* ========================================================================== */ @@ -1046,7 +1059,6 @@ size_t COLAMD_recommended /* returns recommended value of Alen. */ return (ok ? s : 0) ; } - /* ========================================================================== */ /* === colamd_set_defaults ================================================== */ /* ========================================================================== */ diff --git a/CSparse/Config/cs.h.in b/CSparse/Config/cs.h.in index 4be5cca39..920dfe9e8 100644 --- a/CSparse/Config/cs.h.in +++ b/CSparse/Config/cs.h.in @@ -22,6 +22,8 @@ #define csi int64_t #endif +void csparse_version (int version [3]) ; // return version number + /* --- primary CSparse routines and data structures ------------------------- */ typedef struct cs_sparse /* matrix in compressed-column or triplet form */ { diff --git a/CSparse/Demo/cs_demo.out b/CSparse/Demo/cs_demo.out index ea926068d..923eebb45 100644 --- a/CSparse/Demo/cs_demo.out +++ b/CSparse/Demo/cs_demo.out @@ -1,72 +1,35 @@ ( cd build && cmake .. && cmake --build . --config Release -j8 ) -- Building CSparse version: v4.3.0 (Dec 30, 2023) --- Source: /home/davis/dev2/SuiteSparse/CSparse --- Build: /home/davis/dev2/SuiteSparse/CSparse/build +-- Source: /Users/davis/dev2/SuiteSparse/CSparse +-- Build: /Users/davis/dev2/SuiteSparse/CSparse/build -- Build type: Release -- Also compiling the demos in CSparse/Demo --- Configuring done --- Generating done --- Build files have been written to: /home/davis/dev2/SuiteSparse/CSparse/build -make[1]: Entering directory '/home/davis/dev2/SuiteSparse/CSparse/build' -make[2]: Entering directory '/home/davis/dev2/SuiteSparse/CSparse/build' -make[3]: Entering directory '/home/davis/dev2/SuiteSparse/CSparse/build' -make[3]: Entering directory '/home/davis/dev2/SuiteSparse/CSparse/build' -Consolidate compiler generated dependencies of target csparse -make[3]: Leaving directory '/home/davis/dev2/SuiteSparse/CSparse/build' -Consolidate compiler generated dependencies of target csparse_static -make[3]: Leaving directory '/home/davis/dev2/SuiteSparse/CSparse/build' -[ 46%] Built target csparse +-- Configuring done (0.0s) +-- Generating done (0.0s) +-- Build files have been written to: /Users/davis/dev2/SuiteSparse/CSparse/build +[ 93%] Built target csparse [ 93%] Built target csparse_static -make[3]: Entering directory '/home/davis/dev2/SuiteSparse/CSparse/build' -make[3]: Entering directory '/home/davis/dev2/SuiteSparse/CSparse/build' -make[3]: Entering directory '/home/davis/dev2/SuiteSparse/CSparse/build' -Consolidate compiler generated dependencies of target cs_demo2 -make[3]: Leaving directory '/home/davis/dev2/SuiteSparse/CSparse/build' -Consolidate compiler generated dependencies of target cs_demo3 -make[3]: Leaving directory '/home/davis/dev2/SuiteSparse/CSparse/build' -Consolidate compiler generated dependencies of target cs_demo1 -make[3]: Leaving directory '/home/davis/dev2/SuiteSparse/CSparse/build' -[ 96%] Built target cs_demo2 -[ 98%] Built target cs_demo3 -[100%] Built target cs_demo1 -make[2]: Leaving directory '/home/davis/dev2/SuiteSparse/CSparse/build' -make[1]: Leaving directory '/home/davis/dev2/SuiteSparse/CSparse/build' +[ 99%] Built target cs_demo3 +[ 99%] Built target cs_demo1 +[100%] Built target cs_demo2 ( cd build && cmake -DDEMO=1 .. && cmake --build . --config Release -j8 ) -- Building CSparse version: v4.3.0 (Dec 30, 2023) --- Source: /home/davis/dev2/SuiteSparse/CSparse --- Build: /home/davis/dev2/SuiteSparse/CSparse/build +-- Source: /Users/davis/dev2/SuiteSparse/CSparse +-- Build: /Users/davis/dev2/SuiteSparse/CSparse/build -- Build type: Release -- Also compiling the demos in CSparse/Demo --- Configuring done --- Generating done --- Build files have been written to: /home/davis/dev2/SuiteSparse/CSparse/build -make[1]: Entering directory '/home/davis/dev2/SuiteSparse/CSparse/build' -make[2]: Entering directory '/home/davis/dev2/SuiteSparse/CSparse/build' -make[3]: Entering directory '/home/davis/dev2/SuiteSparse/CSparse/build' -make[3]: Entering directory '/home/davis/dev2/SuiteSparse/CSparse/build' -Consolidate compiler generated dependencies of target csparse_static -make[3]: Leaving directory '/home/davis/dev2/SuiteSparse/CSparse/build' -Consolidate compiler generated dependencies of target csparse -make[3]: Leaving directory '/home/davis/dev2/SuiteSparse/CSparse/build' -[ 47%] Built target csparse_static -[ 93%] Built target csparse -make[3]: Entering directory '/home/davis/dev2/SuiteSparse/CSparse/build' -make[3]: Entering directory '/home/davis/dev2/SuiteSparse/CSparse/build' -make[3]: Entering directory '/home/davis/dev2/SuiteSparse/CSparse/build' -Consolidate compiler generated dependencies of target cs_demo3 -make[3]: Leaving directory '/home/davis/dev2/SuiteSparse/CSparse/build' -Consolidate compiler generated dependencies of target cs_demo2 -make[3]: Leaving directory '/home/davis/dev2/SuiteSparse/CSparse/build' -Consolidate compiler generated dependencies of target cs_demo1 -make[3]: Leaving directory '/home/davis/dev2/SuiteSparse/CSparse/build' -[ 95%] Built target cs_demo3 -[ 97%] Built target cs_demo1 +-- Configuring done (0.0s) +-- Generating done (0.0s) +-- Build files have been written to: /Users/davis/dev2/SuiteSparse/CSparse/build +[ 92%] Built target csparse +[ 93%] Built target csparse_static +[100%] Built target cs_demo1 [100%] Built target cs_demo2 -make[2]: Leaving directory '/home/davis/dev2/SuiteSparse/CSparse/build' -make[1]: Leaving directory '/home/davis/dev2/SuiteSparse/CSparse/build' +[100%] Built target cs_demo3 ./build/cs_demo1 < ./Matrix/t1 +CSparse v4.3.0 T: -CSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2022 +CSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2023 triplet: 4-by-4, nzmax: 16 nnz: 10 2 2 : 3 1 0 : 3.1 @@ -79,7 +42,7 @@ triplet: 4-by-4, nzmax: 16 nnz: 10 0 0 : 4.5 2 1 : 1.7 A: -CSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2022 +CSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2023 4-by-4, nzmax: 10 nnz: 10, 1-norm: 11.1 col 0 : locations 0 to 2 1 : 3.1 @@ -96,7 +59,7 @@ CSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2022 3 : 1 1 : 0.9 AT: -CSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2022 +CSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2023 4-by-4, nzmax: 10 nnz: 10, 1-norm: 7.7 col 0 : locations 0 to 1 0 : 4.5 @@ -113,7 +76,7 @@ CSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2022 1 : 0.4 3 : 1 D: -CSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2022 +CSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2023 4-by-4, nzmax: 16 nnz: 16, 1-norm: 139.58 col 0 : locations 0 to 3 1 : 13.95 @@ -139,12 +102,12 @@ CSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2022 --- Matrix: 4-by-4, nnz: 10 (sym: 0: nnz 0), norm: 1.11e+01 blocks: 1 singletons: 0 structural rank: 4 -QR natural time: 0.00 resid: 3.06e-17 -QR amd(A'*A) time: 0.00 resid: 3.06e-17 -LU natural time: 0.00 resid: 1.53e-17 -LU amd(A+A') time: 0.00 resid: 1.53e-17 -LU amd(S'*S) time: 0.00 resid: 0.00e+00 -LU amd(A'*A) time: 0.00 resid: 1.53e-17 +QR natural time: 0.00 resid: 1.15e-17 +QR amd(A'*A) time: 0.00 resid: 1.53e-17 +LU natural time: 0.00 resid: 1.04e-17 +LU amd(A+A') time: 0.00 resid: 4.94e-18 +LU amd(S'*S) time: 0.00 resid: 4.94e-18 +LU amd(A'*A) time: 0.00 resid: 4.94e-18 ./build/cs_demo2 < ./Matrix/ash219 --- Matrix: 219-by-85, nnz: 438 (sym: 0: nnz 0), norm: 9.00e+00 @@ -155,57 +118,57 @@ QR amd(A'*A) time: 0.00 resid: 1.61e-02 --- Matrix: 48-by-48, nnz: 224 (sym: -1: nnz 400), norm: 3.57e+09 blocks: 1 singletons: 0 structural rank: 48 -QR natural time: 0.00 resid: 2.62e-19 -QR amd(A'*A) time: 0.00 resid: 5.27e-19 -LU natural time: 0.00 resid: 2.17e-19 -LU amd(A+A') time: 0.00 resid: 1.87e-19 -LU amd(S'*S) time: 0.00 resid: 2.38e-19 -LU amd(A'*A) time: 0.00 resid: 2.38e-19 -Chol natural time: 0.00 resid: 2.64e-19 -Chol amd(A+A') time: 0.00 resid: 2.55e-19 +QR natural time: 0.00 resid: 3.98e-19 +QR amd(A'*A) time: 0.00 resid: 3.07e-19 +LU natural time: 0.00 resid: 2.63e-19 +LU amd(A+A') time: 0.00 resid: 8.21e-20 +LU amd(S'*S) time: 0.00 resid: 1.96e-19 +LU amd(A'*A) time: 0.00 resid: 1.96e-19 +Chol natural time: 0.00 resid: 2.03e-19 +Chol amd(A+A') time: 0.00 resid: 2.01e-19 ./build/cs_demo2 < ./Matrix/fs_183_1 --- Matrix: 183-by-183, nnz: 988 (sym: 0: nnz 0), norm: 1.70e+09 zero entries dropped: 71 tiny entries dropped: 10 blocks: 38 singletons: 37 structural rank: 183 -QR natural time: 0.01 resid: 6.84e-28 -QR amd(A'*A) time: 0.00 resid: 9.38e-28 -LU natural time: 0.00 resid: 6.20e-28 -LU amd(A+A') time: 0.00 resid: 1.55e-27 -LU amd(S'*S) time: 0.00 resid: 6.98e-28 -LU amd(A'*A) time: 0.00 resid: 6.98e-28 +QR natural time: 0.00 resid: 7.33e-28 +QR amd(A'*A) time: 0.00 resid: 1.88e-27 +LU natural time: 0.00 resid: 4.65e-28 +LU amd(A+A') time: 0.00 resid: 1.51e-27 +LU amd(S'*S) time: 0.00 resid: 7.82e-28 +LU amd(A'*A) time: 0.00 resid: 7.82e-28 ./build/cs_demo2 < ./Matrix/mbeacxc --- Matrix: 492-by-490, nnz: 49920 (sym: 0: nnz 0), norm: 9.29e-01 blocks: 10 singletons: 8 structural rank: 448 -QR natural time: 0.11 resid: nan -QR amd(A'*A) time: 0.14 resid: nan +QR natural time: 0.03 resid: nan +QR amd(A'*A) time: 0.04 resid: nan ./build/cs_demo2 < ./Matrix/west0067 --- Matrix: 67-by-67, nnz: 294 (sym: 0: nnz 0), norm: 6.14e+00 blocks: 2 singletons: 1 structural rank: 67 -QR natural time: 0.00 resid: 7.14e-17 -QR amd(A'*A) time: 0.00 resid: 3.10e-17 -LU natural time: 0.00 resid: 3.89e-17 -LU amd(A+A') time: 0.00 resid: 2.27e-17 -LU amd(S'*S) time: 0.00 resid: 1.95e-17 -LU amd(A'*A) time: 0.00 resid: 2.60e-17 +QR natural time: 0.00 resid: 4.31e-17 +QR amd(A'*A) time: 0.00 resid: 2.56e-17 +LU natural time: 0.00 resid: 2.18e-17 +LU amd(A+A') time: 0.00 resid: 2.90e-17 +LU amd(S'*S) time: 0.00 resid: 2.20e-17 +LU amd(A'*A) time: 0.00 resid: 2.20e-17 ./build/cs_demo2 < ./Matrix/lp_afiro --- Matrix: 27-by-51, nnz: 102 (sym: 0: nnz 0), norm: 3.43e+00 blocks: 1 singletons: 0 structural rank: 27 -QR natural time: 0.00 resid: 3.96e-16 -QR amd(A'*A) time: 0.00 resid: 2.25e-16 +QR natural time: 0.00 resid: 4.17e-16 +QR amd(A'*A) time: 0.00 resid: 4.27e-16 ./build/cs_demo2 < ./Matrix/bcsstk16 --- Matrix: 4884-by-4884, nnz: 147631 (sym: -1: nnz 290378), norm: 7.01e+09 blocks: 75 singletons: 74 structural rank: 4884 -QR amd(A'*A) time: 1.41 resid: 1.39e-22 -LU amd(A+A') time: 0.81 resid: 1.10e-22 -LU amd(S'*S) time: 0.79 resid: 1.28e-22 -LU amd(A'*A) time: 0.83 resid: 1.78e-22 -Chol amd(A+A') time: 0.25 resid: 1.19e-22 +QR amd(A'*A) time: 0.39 resid: 1.34e-22 +LU amd(A+A') time: 0.18 resid: 1.07e-22 +LU amd(S'*S) time: 0.17 resid: 1.25e-22 +LU amd(A'*A) time: 0.18 resid: 1.91e-22 +Chol amd(A+A') time: 0.05 resid: 1.15e-22 ./build/cs_demo3 < ./Matrix/bcsstk01 --- Matrix: 48-by-48, nnz: 224 (sym: -1: nnz 400), norm: 3.57e+09 @@ -214,23 +177,23 @@ chol then update/downdate amd(A+A') symbolic chol time 0.00 numeric chol time 0.00 solve chol time 0.00 -original: resid: 2.55e-19 +original: resid: 2.01e-19 update: time: 0.00 -update: time: 0.00 (incl solve) resid: 9.66e-19 -rechol: time: 0.00 (incl solve) resid: 1.55e-18 +update: time: 0.00 (incl solve) resid: 3.21e-18 +rechol: time: 0.00 (incl solve) resid: 3.07e-18 downdate: time: 0.00 -downdate: time: 0.00 (incl solve) resid: 3.74e-17 +downdate: time: 0.00 (incl solve) resid: 4.46e-17 ./build/cs_demo3 < ./Matrix/bcsstk16 --- Matrix: 4884-by-4884, nnz: 147631 (sym: -1: nnz 290378), norm: 7.01e+09 chol then update/downdate amd(A+A') -symbolic chol time 0.02 -numeric chol time 0.22 +symbolic chol time 0.00 +numeric chol time 0.05 solve chol time 0.00 -original: resid: 1.19e-22 +original: resid: 1.15e-22 update: time: 0.00 -update: time: 0.00 (incl solve) resid: 1.12e-23 -rechol: time: 0.23 (incl solve) resid: 1.17e-23 +update: time: 0.00 (incl solve) resid: 1.31e-23 +rechol: time: 0.05 (incl solve) resid: 1.44e-23 downdate: time: 0.00 -downdate: time: 0.01 (incl solve) resid: 4.09e-22 +downdate: time: 0.00 (incl solve) resid: 1.25e-21 diff --git a/CSparse/Demo/cs_demo1.c b/CSparse/Demo/cs_demo1.c index 0786e3e18..5ca3bc132 100644 --- a/CSparse/Demo/cs_demo1.c +++ b/CSparse/Demo/cs_demo1.c @@ -6,6 +6,16 @@ int main (void) { cs *T, *A, *Eye, *AT, *C, *D ; csi i, m ; + int version [3] ; + csparse_version (version) ; + printf ("CSparse v%d.%d.%d\n", version [0], version [1], version [2]) ; + if ((version [0] != CS_VER) || (version [1] != CS_SUBVER) || + (version [2] != CS_SUBSUB)) + { + fprintf (stderr, "version in header does not match library\n") ; + abort ( ) ; + } + T = cs_load (stdin) ; /* load triplet matrix T from stdin */ printf ("T:\n") ; cs_print (T, 0) ; /* print T */ A = cs_compress (T) ; /* A = compressed-column form of T */ diff --git a/CSparse/Doc/ChangeLog b/CSparse/Doc/ChangeLog index 5ce89a86e..ba86929c6 100644 --- a/CSparse/Doc/ChangeLog +++ b/CSparse/Doc/ChangeLog @@ -1,6 +1,7 @@ Dec 30, 2023: version 4.3.0 * major change to build system: by Markus Mützel + * csparse_version: added to return CSparse version Sept 8, 2023: version 4.2.0 diff --git a/CSparse/Include/cs.h b/CSparse/Include/cs.h index 74f93d884..176347d1b 100644 --- a/CSparse/Include/cs.h +++ b/CSparse/Include/cs.h @@ -22,6 +22,8 @@ #define csi int64_t #endif +void csparse_version (int version [3]) ; // return version number + /* --- primary CSparse routines and data structures ------------------------- */ typedef struct cs_sparse /* matrix in compressed-column or triplet form */ { diff --git a/CSparse/Source/cs_version.c b/CSparse/Source/cs_version.c new file mode 100644 index 000000000..018269f8b --- /dev/null +++ b/CSparse/Source/cs_version.c @@ -0,0 +1,10 @@ +// CSparse/Source/csparse_version: return CSparse version +// CSparse, Copyright (c) 2006-2023, Timothy A. Davis. All Rights Reserved. +// SPDX-License-Identifier: LGPL-2.1+ +#include "cs.h" +void csparse_version (int version [3]) +{ + version [0] = CS_VER ; + version [1] = CS_SUBVER ; + version [2] = CS_SUBSUB ; +} diff --git a/CXSparse/Config/cs.h.in b/CXSparse/Config/cs.h.in index b2b4a34b5..f8c14e5cc 100644 --- a/CXSparse/Config/cs.h.in +++ b/CXSparse/Config/cs.h.in @@ -57,6 +57,8 @@ extern "C" { #endif +void cxsparse_version (int version [3]) ; // return version + /* -------------------------------------------------------------------------- */ /* double/int32_t version of CXSparse */ /* -------------------------------------------------------------------------- */ diff --git a/CXSparse/Demo/cs_ci_demo1.c b/CXSparse/Demo/cs_ci_demo1.c index e67fecb27..b07939d9e 100644 --- a/CXSparse/Demo/cs_ci_demo1.c +++ b/CXSparse/Demo/cs_ci_demo1.c @@ -1,4 +1,4 @@ -// CSparse/Demo/cs_demo1: demo program for CXSparse +// CXSparse/Demo/cs_demo1: demo program for CXSparse // CXSparse, Copyright (c) 2006-2022, Timothy A. Davis. All Rights Reserved. // SPDX-License-Identifier: LGPL-2.1+ #include "cs.h" @@ -6,6 +6,16 @@ int main (void) { cs_ci *T, *A, *Eye, *AT, *C, *D ; int i, m ; + int version [3] ; + cxsparse_version (version) ; + printf ("CXSparse v%d.%d.%d\n", version [0], version [1], version [2]) ; + if ((version [0] != CS_VER) || (version [1] != CS_SUBVER) || + (version [2] != CS_SUBSUB)) + { + fprintf (stderr, "version in header does not match library\n") ; + abort ( ) ; + } + T = cs_ci_load (stdin) ; /* load triplet matrix T from stdin */ printf ("T:\n") ; cs_ci_print (T, 0) ; /* print T */ A = cs_ci_compress (T) ; /* A = compressed-column form of T */ diff --git a/CXSparse/Demo/cs_cl_demo1.c b/CXSparse/Demo/cs_cl_demo1.c index 39f393a7f..9f8ba7298 100644 --- a/CXSparse/Demo/cs_cl_demo1.c +++ b/CXSparse/Demo/cs_cl_demo1.c @@ -1,4 +1,4 @@ -// CSparse/Demo/cs_cl_demo1: demo program for CXSparse (complex int64_t) +// CXSparse/Demo/cs_cl_demo1: demo program for CXSparse (complex int64_t) // CXSparse, Copyright (c) 2006-2022, Timothy A. Davis. All Rights Reserved. // SPDX-License-Identifier: LGPL-2.1+ #include "cs.h" @@ -6,6 +6,16 @@ int main (void) { cs_cl *T, *A, *Eye, *AT, *C, *D ; int64_t i, m ; + int version [3] ; + cxsparse_version (version) ; + printf ("CXSparse v%d.%d.%d\n", version [0], version [1], version [2]) ; + if ((version [0] != CS_VER) || (version [1] != CS_SUBVER) || + (version [2] != CS_SUBSUB)) + { + fprintf (stderr, "version in header does not match library\n") ; + abort ( ) ; + } + T = cs_cl_load (stdin) ; /* load triplet matrix T from stdin */ printf ("T:\n") ; cs_cl_print (T, 0) ; /* print T */ A = cs_cl_compress (T) ; /* A = compressed-column form of T */ diff --git a/CXSparse/Demo/cs_demo.c b/CXSparse/Demo/cs_demo.c index 29034afdf..6adc27ee4 100644 --- a/CXSparse/Demo/cs_demo.c +++ b/CXSparse/Demo/cs_demo.c @@ -1,4 +1,4 @@ -// CSparse/Demo/cs_demo: demo utilities for CXSparse (complex int32_t) +// CSparse/Demo/cs_demo: demo utilities for CXSparse (double int32_t) // CXSparse, Copyright (c) 2006-2022, Timothy A. Davis. All Rights Reserved. // SPDX-License-Identifier: LGPL-2.1+ #include "cs_demo.h" diff --git a/CXSparse/Demo/cs_demo.out b/CXSparse/Demo/cs_demo.out index 6666552ab..8e289b7b7 100644 --- a/CXSparse/Demo/cs_demo.out +++ b/CXSparse/Demo/cs_demo.out @@ -1,21 +1,21 @@ ( cd build && cmake -DDEMO=1 .. && cmake --build . --config Release -j8 ) -- Building CXSparse version: v4.3.0 (Dec 30, 2023) --- Source: /home/davis/dev2/SuiteSparse/CXSparse --- Build: /home/davis/dev2/SuiteSparse/CXSparse/build +-- Source: /Users/davis/dev2/SuiteSparse/CXSparse +-- Build: /Users/davis/dev2/SuiteSparse/CXSparse/build -- Install lib: lib -- Install include: include -- Install bin: bin -- Install pkg-file: lib -- Install rpath: --- Build rpath: /home/davis/dev2/SuiteSparse/CXSparse/build +-- Build rpath: /Users/davis/dev2/SuiteSparse/CXSparse/build -- Build type: Release --- Fortran: /usr/bin/f95 +-- Fortran: /opt/homebrew/bin/gfortran -- CUDA: not enabled -- complex data type: enabled -- SuiteSparse_config version: 7.4.0 --- SuiteSparse_config include: /home/davis/dev2/SuiteSparse/SuiteSparse_config --- SuiteSparse_config library: /home/davis/dev2/SuiteSparse/SuiteSparse_config/build/libsuitesparseconfig.so.7.4.0 --- SuiteSparse_config static: /home/davis/dev2/SuiteSparse/SuiteSparse_config/build/libsuitesparseconfig.a +-- SuiteSparse_config include: /Users/davis/dev2/SuiteSparse/SuiteSparse_config +-- SuiteSparse_config library: /Users/davis/dev2/SuiteSparse/SuiteSparse_config/build/libsuitesparseconfig.7.4.0.dylib +-- SuiteSparse_config static: /Users/davis/dev2/SuiteSparse/SuiteSparse_config/build/libsuitesparseconfig.a -- Also compiling the demos in CXSparse/Demo -- ------------------------------------------------------------------------ -- SuiteSparse CMAKE report for: cxsparse @@ -26,101 +26,41 @@ -- BUILD_SHARED_LIBS: ON -- BUILD_STATIC_LIBS: ON -- use OpenMP: no --- C compiler: /usr/bin/cc +-- C compiler: /Library/Developer/CommandLineTools/usr/bin/cc -- C flags: -- C++ compiler: -- C++ flags: -- C Flags release: -O3 -DNDEBUG -- C++ Flags release: --- Fortran compiler: /usr/bin/f95 +-- Fortran compiler: /opt/homebrew/bin/gfortran -- compile definitions: -- ------------------------------------------------------------------------ --- Configuring done --- Generating done --- Build files have been written to: /home/davis/dev2/SuiteSparse/CXSparse/build -make[1]: Entering directory '/home/davis/dev2/SuiteSparse/CXSparse/build' -make[2]: Entering directory '/home/davis/dev2/SuiteSparse/CXSparse/build' -make[3]: Entering directory '/home/davis/dev2/SuiteSparse/CXSparse/build' -make[3]: Entering directory '/home/davis/dev2/SuiteSparse/CXSparse/build' -Consolidate compiler generated dependencies of target CXSparse_static -make[3]: Leaving directory '/home/davis/dev2/SuiteSparse/CXSparse/build' -Consolidate compiler generated dependencies of target CXSparse -make[3]: Leaving directory '/home/davis/dev2/SuiteSparse/CXSparse/build' -[ 45%] Built target CXSparse_static -[ 89%] Built target CXSparse -make[3]: Entering directory '/home/davis/dev2/SuiteSparse/CXSparse/build' -make[3]: Entering directory '/home/davis/dev2/SuiteSparse/CXSparse/build' -make[3]: Entering directory '/home/davis/dev2/SuiteSparse/CXSparse/build' -make[3]: Entering directory '/home/davis/dev2/SuiteSparse/CXSparse/build' -make[3]: Entering directory '/home/davis/dev2/SuiteSparse/CXSparse/build' -make[3]: Entering directory '/home/davis/dev2/SuiteSparse/CXSparse/build' -make[3]: Entering directory '/home/davis/dev2/SuiteSparse/CXSparse/build' -make[3]: Entering directory '/home/davis/dev2/SuiteSparse/CXSparse/build' -Consolidate compiler generated dependencies of target cs_dl_demo1 -make[3]: Leaving directory '/home/davis/dev2/SuiteSparse/CXSparse/build' -Consolidate compiler generated dependencies of target cs_demo1 -make[3]: Leaving directory '/home/davis/dev2/SuiteSparse/CXSparse/build' -Consolidate compiler generated dependencies of target cs_di_demo3 -make[3]: Leaving directory '/home/davis/dev2/SuiteSparse/CXSparse/build' -Consolidate compiler generated dependencies of target cs_demo2 -make[3]: Leaving directory '/home/davis/dev2/SuiteSparse/CXSparse/build' -Consolidate compiler generated dependencies of target cs_dl_demo2 -make[3]: Leaving directory '/home/davis/dev2/SuiteSparse/CXSparse/build' -Consolidate compiler generated dependencies of target cs_demo3 -make[3]: Leaving directory '/home/davis/dev2/SuiteSparse/CXSparse/build' -Consolidate compiler generated dependencies of target cs_di_demo2 -make[3]: Leaving directory '/home/davis/dev2/SuiteSparse/CXSparse/build' -Consolidate compiler generated dependencies of target cs_di_demo1 -make[3]: Leaving directory '/home/davis/dev2/SuiteSparse/CXSparse/build' -[ 90%] Built target cs_dl_demo1 -make[3]: Entering directory '/home/davis/dev2/SuiteSparse/CXSparse/build' -[ 90%] Built target cs_demo3 -[ 92%] Built target cs_di_demo3 -[ 93%] Built target cs_dl_demo2 -[ 91%] Built target cs_demo1 -[ 93%] Built target cs_demo2 -[ 93%] Built target cs_di_demo1 -[ 94%] Built target cs_di_demo2 -Consolidate compiler generated dependencies of target cs_dl_demo3 -make[3]: Leaving directory '/home/davis/dev2/SuiteSparse/CXSparse/build' -make[3]: Entering directory '/home/davis/dev2/SuiteSparse/CXSparse/build' -make[3]: Entering directory '/home/davis/dev2/SuiteSparse/CXSparse/build' -make[3]: Entering directory '/home/davis/dev2/SuiteSparse/CXSparse/build' -make[3]: Entering directory '/home/davis/dev2/SuiteSparse/CXSparse/build' -make[3]: Entering directory '/home/davis/dev2/SuiteSparse/CXSparse/build' -make[3]: Entering directory '/home/davis/dev2/SuiteSparse/CXSparse/build' -make[3]: Entering directory '/home/davis/dev2/SuiteSparse/CXSparse/build' -Consolidate compiler generated dependencies of target cs_cl_demo2 -make[3]: Leaving directory '/home/davis/dev2/SuiteSparse/CXSparse/build' -Consolidate compiler generated dependencies of target cs_ci_demo1 -make[3]: Leaving directory '/home/davis/dev2/SuiteSparse/CXSparse/build' +-- Configuring done (0.0s) +-- Generating done (0.1s) +-- Build files have been written to: /Users/davis/dev2/SuiteSparse/CXSparse/build +[ 82%] Built target CXSparse +[ 89%] Built target CXSparse_static +[ 89%] Built target cs_di_demo1 +[ 90%] Built target cs_di_demo2 +[ 90%] Built target cs_demo1 +[ 91%] Built target cs_demo3 +[ 92%] Built target cs_dl_demo2 +[ 94%] Built target cs_di_demo3 +[ 94%] Built target cs_demo2 +[ 94%] Built target cs_dl_demo1 [ 95%] Built target cs_dl_demo3 -Consolidate compiler generated dependencies of target cs_ci_demo2 -make[3]: Leaving directory '/home/davis/dev2/SuiteSparse/CXSparse/build' -Consolidate compiler generated dependencies of target cs_cl_demo3 -make[3]: Leaving directory '/home/davis/dev2/SuiteSparse/CXSparse/build' -Consolidate compiler generated dependencies of target cs_cl_demo1 -make[3]: Leaving directory '/home/davis/dev2/SuiteSparse/CXSparse/build' -make[3]: Entering directory '/home/davis/dev2/SuiteSparse/CXSparse/build' -Consolidate compiler generated dependencies of target cs_idemo -make[3]: Leaving directory '/home/davis/dev2/SuiteSparse/CXSparse/build' -Consolidate compiler generated dependencies of target cs_ci_demo3 -make[3]: Leaving directory '/home/davis/dev2/SuiteSparse/CXSparse/build' -[ 96%] Built target cs_ci_demo1 -[ 96%] Built target cs_cl_demo1 -[ 97%] Built target cs_cl_demo2 -[ 98%] Built target cs_cl_demo3 -Consolidate compiler generated dependencies of target cs_ldemo -make[3]: Leaving directory '/home/davis/dev2/SuiteSparse/CXSparse/build' -[ 98%] Built target cs_ci_demo2 -[ 99%] Built target cs_ci_demo3 +[ 95%] Built target cs_ci_demo2 +[ 96%] Built target cs_ci_demo3 +[ 97%] Built target cs_cl_demo3 +[ 98%] Built target cs_ci_demo1 +[ 98%] Built target cs_cl_demo2 +[ 99%] Built target cs_cl_demo1 [ 99%] Built target cs_idemo [100%] Built target cs_ldemo -make[2]: Leaving directory '/home/davis/dev2/SuiteSparse/CXSparse/build' -make[1]: Leaving directory '/home/davis/dev2/SuiteSparse/CXSparse/build' ./build/cs_demo1 < Matrix/t1 +CXSparse v4.3.0 T: -CXSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2022 +CXSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2023 triplet: 4-by-4, nzmax: 16 nnz: 10 2 2 : 3 1 0 : 3.1 @@ -133,7 +73,7 @@ triplet: 4-by-4, nzmax: 16 nnz: 10 0 0 : 4.5 2 1 : 1.7 A: -CXSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2022 +CXSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2023 4-by-4, nzmax: 10 nnz: 10, 1-norm: 11.1 col 0 : locations 0 to 2 1 : 3.1 @@ -150,7 +90,7 @@ CXSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2022 3 : 1 1 : 0.9 AT: -CXSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2022 +CXSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2023 4-by-4, nzmax: 10 nnz: 10, 1-norm: 7.7 col 0 : locations 0 to 1 0 : 4.5 @@ -167,7 +107,7 @@ CXSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2022 1 : 0.4 3 : 1 D: -CXSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2022 +CXSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2023 4-by-4, nzmax: 16 nnz: 16, 1-norm: 139.58 col 0 : locations 0 to 3 1 : 13.95 @@ -193,40 +133,40 @@ CXSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2022 --- Matrix: 4-by-4, nnz: 10 (sym: 0: nnz 0), norm: 1.11e+01 blocks: 1 singletons: 0 structural rank: 4 -QR natural time: 0.00 resid: 3.06e-17 -QR amd(A'*A) time: 0.00 resid: 2.30e-17 -LU natural time: 0.00 resid: 1.53e-17 -LU amd(A+A') time: 0.00 resid: 1.53e-17 -LU amd(S'*S) time: 0.00 resid: 0.00e+00 -LU amd(A'*A) time: 0.00 resid: 1.53e-17 +QR natural time: 0.00 resid: 2.87e-17 +QR amd(A'*A) time: 0.00 resid: 1.04e-17 +LU natural time: 0.00 resid: 1.04e-17 +LU amd(A+A') time: 0.00 resid: 4.94e-18 +LU amd(S'*S) time: 0.00 resid: 4.94e-18 +LU amd(A'*A) time: 0.00 resid: 4.94e-18 ./build/cs_demo2 < Matrix/fs_183_1 --- Matrix: 183-by-183, nnz: 988 (sym: 0: nnz 0), norm: 1.70e+09 zero entries dropped: 71 tiny entries dropped: 10 blocks: 38 singletons: 37 structural rank: 183 -QR natural time: 0.01 resid: 1.42e-27 -QR amd(A'*A) time: 0.00 resid: 3.35e-28 -LU natural time: 0.00 resid: 6.20e-28 -LU amd(A+A') time: 0.00 resid: 1.55e-27 -LU amd(S'*S) time: 0.00 resid: 6.98e-28 -LU amd(A'*A) time: 0.00 resid: 6.98e-28 +QR natural time: 0.00 resid: 1.16e-27 +QR amd(A'*A) time: 0.00 resid: 6.82e-28 +LU natural time: 0.00 resid: 4.65e-28 +LU amd(A+A') time: 0.00 resid: 1.51e-27 +LU amd(S'*S) time: 0.00 resid: 7.82e-28 +LU amd(A'*A) time: 0.00 resid: 7.82e-28 ./build/cs_demo2 < Matrix/west0067 --- Matrix: 67-by-67, nnz: 294 (sym: 0: nnz 0), norm: 6.14e+00 blocks: 2 singletons: 1 structural rank: 67 -QR natural time: 0.00 resid: 5.19e-17 -QR amd(A'*A) time: 0.00 resid: 3.25e-17 -LU natural time: 0.00 resid: 3.89e-17 -LU amd(A+A') time: 0.00 resid: 2.27e-17 -LU amd(S'*S) time: 0.00 resid: 1.95e-17 -LU amd(A'*A) time: 0.00 resid: 2.60e-17 +QR natural time: 0.00 resid: 4.46e-17 +QR amd(A'*A) time: 0.00 resid: 5.76e-17 +LU natural time: 0.00 resid: 2.18e-17 +LU amd(A+A') time: 0.00 resid: 2.90e-17 +LU amd(S'*S) time: 0.00 resid: 2.20e-17 +LU amd(A'*A) time: 0.00 resid: 2.20e-17 ./build/cs_demo2 < Matrix/lp_afiro --- Matrix: 27-by-51, nnz: 102 (sym: 0: nnz 0), norm: 3.43e+00 blocks: 1 singletons: 0 structural rank: 27 -QR natural time: 0.00 resid: 3.85e-16 -QR amd(A'*A) time: 0.00 resid: 1.50e-16 +QR natural time: 0.00 resid: 1.71e-16 +QR amd(A'*A) time: 0.00 resid: 9.63e-17 ./build/cs_demo2 < Matrix/ash219 --- Matrix: 219-by-85, nnz: 438 (sym: 0: nnz 0), norm: 9.00e+00 @@ -237,20 +177,20 @@ QR amd(A'*A) time: 0.00 resid: 1.61e-02 --- Matrix: 492-by-490, nnz: 49920 (sym: 0: nnz 0), norm: 9.29e-01 blocks: 10 singletons: 8 structural rank: 448 -QR natural time: 0.11 resid: nan -QR amd(A'*A) time: 0.14 resid: nan +QR natural time: 0.03 resid: nan +QR amd(A'*A) time: 0.04 resid: nan ./build/cs_demo2 < Matrix/bcsstk01 --- Matrix: 48-by-48, nnz: 224 (sym: -1: nnz 400), norm: 3.57e+09 blocks: 1 singletons: 0 structural rank: 48 -QR natural time: 0.00 resid: 3.65e-19 -QR amd(A'*A) time: 0.00 resid: 4.02e-19 -LU natural time: 0.00 resid: 2.17e-19 -LU amd(A+A') time: 0.00 resid: 1.87e-19 -LU amd(S'*S) time: 0.00 resid: 2.38e-19 -LU amd(A'*A) time: 0.00 resid: 2.38e-19 -Chol natural time: 0.00 resid: 2.64e-19 -Chol amd(A+A') time: 0.00 resid: 2.55e-19 +QR natural time: 0.00 resid: 3.01e-19 +QR amd(A'*A) time: 0.00 resid: 5.05e-19 +LU natural time: 0.00 resid: 2.63e-19 +LU amd(A+A') time: 0.00 resid: 8.21e-20 +LU amd(S'*S) time: 0.00 resid: 1.96e-19 +LU amd(A'*A) time: 0.00 resid: 1.96e-19 +Chol natural time: 0.00 resid: 2.03e-19 +Chol amd(A+A') time: 0.00 resid: 2.01e-19 ./build/cs_demo3 < Matrix/bcsstk01 --- Matrix: 48-by-48, nnz: 224 (sym: -1: nnz 400), norm: 3.57e+09 @@ -259,38 +199,39 @@ chol then update/downdate amd(A+A') symbolic chol time 0.00 numeric chol time 0.00 solve chol time 0.00 -original: resid: 2.55e-19 +original: resid: 2.01e-19 update: time: 0.00 -update: time: 0.00 (incl solve) resid: 9.66e-19 -rechol: time: 0.00 (incl solve) resid: 1.55e-18 +update: time: 0.00 (incl solve) resid: 3.21e-18 +rechol: time: 0.00 (incl solve) resid: 3.07e-18 downdate: time: 0.00 -downdate: time: 0.00 (incl solve) resid: 3.74e-17 +downdate: time: 0.00 (incl solve) resid: 4.46e-17 ./build/cs_demo2 < Matrix/bcsstk16 --- Matrix: 4884-by-4884, nnz: 147631 (sym: -1: nnz 290378), norm: 7.01e+09 blocks: 75 singletons: 74 structural rank: 4884 -QR amd(A'*A) time: 1.38 resid: 2.01e-22 -LU amd(A+A') time: 0.89 resid: 1.10e-22 -LU amd(S'*S) time: 0.84 resid: 1.28e-22 -LU amd(A'*A) time: 0.86 resid: 1.78e-22 -Chol amd(A+A') time: 0.26 resid: 1.19e-22 +QR amd(A'*A) time: 0.38 resid: 1.79e-22 +LU amd(A+A') time: 0.17 resid: 1.07e-22 +LU amd(S'*S) time: 0.17 resid: 1.25e-22 +LU amd(A'*A) time: 0.17 resid: 1.91e-22 +Chol amd(A+A') time: 0.05 resid: 1.15e-22 ./build/cs_demo3 < Matrix/bcsstk16 --- Matrix: 4884-by-4884, nnz: 147631 (sym: -1: nnz 290378), norm: 7.01e+09 chol then update/downdate amd(A+A') -symbolic chol time 0.02 -numeric chol time 0.23 +symbolic chol time 0.00 +numeric chol time 0.04 solve chol time 0.00 -original: resid: 1.19e-22 +original: resid: 1.15e-22 update: time: 0.00 -update: time: 0.01 (incl solve) resid: 1.12e-23 -rechol: time: 0.24 (incl solve) resid: 1.17e-23 +update: time: 0.00 (incl solve) resid: 1.31e-23 +rechol: time: 0.04 (incl solve) resid: 1.44e-23 downdate: time: 0.00 -downdate: time: 0.00 (incl solve) resid: 4.09e-22 +downdate: time: 0.00 (incl solve) resid: 1.25e-21 ./build/cs_di_demo1 < Matrix/t1 +CXSparse v4.3.0 T: -CXSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2022 +CXSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2023 triplet: 4-by-4, nzmax: 16 nnz: 10 2 2 : 3 1 0 : 3.1 @@ -303,7 +244,7 @@ triplet: 4-by-4, nzmax: 16 nnz: 10 0 0 : 4.5 2 1 : 1.7 A: -CXSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2022 +CXSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2023 4-by-4, nzmax: 10 nnz: 10, 1-norm: 11.1 col 0 : locations 0 to 2 1 : 3.1 @@ -320,7 +261,7 @@ CXSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2022 3 : 1 1 : 0.9 AT: -CXSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2022 +CXSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2023 4-by-4, nzmax: 10 nnz: 10, 1-norm: 7.7 col 0 : locations 0 to 1 0 : 4.5 @@ -337,7 +278,7 @@ CXSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2022 1 : 0.4 3 : 1 D: -CXSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2022 +CXSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2023 4-by-4, nzmax: 16 nnz: 16, 1-norm: 139.58 col 0 : locations 0 to 3 1 : 13.95 @@ -363,40 +304,40 @@ CXSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2022 --- Matrix: 4-by-4, nnz: 10 (sym: 0: nnz 0), norm: 1.11e+01 blocks: 1 singletons: 0 structural rank: 4 -QR natural time: 0.00 resid: 3.06e-17 -QR amd(A'*A) time: 0.00 resid: 2.30e-17 -LU natural time: 0.00 resid: 1.53e-17 -LU amd(A+A') time: 0.00 resid: 1.53e-17 -LU amd(S'*S) time: 0.00 resid: 0.00e+00 -LU amd(A'*A) time: 0.00 resid: 1.53e-17 +QR natural time: 0.00 resid: 2.87e-17 +QR amd(A'*A) time: 0.00 resid: 1.04e-17 +LU natural time: 0.00 resid: 1.04e-17 +LU amd(A+A') time: 0.00 resid: 4.94e-18 +LU amd(S'*S) time: 0.00 resid: 4.94e-18 +LU amd(A'*A) time: 0.00 resid: 4.94e-18 ./build/cs_di_demo2 < Matrix/fs_183_1 --- Matrix: 183-by-183, nnz: 988 (sym: 0: nnz 0), norm: 1.70e+09 zero entries dropped: 71 tiny entries dropped: 10 blocks: 38 singletons: 37 structural rank: 183 -QR natural time: 0.01 resid: 1.42e-27 -QR amd(A'*A) time: 0.00 resid: 3.35e-28 -LU natural time: 0.00 resid: 6.20e-28 -LU amd(A+A') time: 0.00 resid: 1.55e-27 -LU amd(S'*S) time: 0.00 resid: 6.98e-28 -LU amd(A'*A) time: 0.00 resid: 6.98e-28 +QR natural time: 0.00 resid: 1.16e-27 +QR amd(A'*A) time: 0.00 resid: 6.82e-28 +LU natural time: 0.00 resid: 4.65e-28 +LU amd(A+A') time: 0.00 resid: 1.51e-27 +LU amd(S'*S) time: 0.00 resid: 7.82e-28 +LU amd(A'*A) time: 0.00 resid: 7.82e-28 ./build/cs_di_demo2 < Matrix/west0067 --- Matrix: 67-by-67, nnz: 294 (sym: 0: nnz 0), norm: 6.14e+00 blocks: 2 singletons: 1 structural rank: 67 -QR natural time: 0.00 resid: 5.19e-17 -QR amd(A'*A) time: 0.00 resid: 3.25e-17 -LU natural time: 0.00 resid: 3.89e-17 -LU amd(A+A') time: 0.00 resid: 2.27e-17 -LU amd(S'*S) time: 0.00 resid: 1.95e-17 -LU amd(A'*A) time: 0.00 resid: 2.60e-17 +QR natural time: 0.00 resid: 4.46e-17 +QR amd(A'*A) time: 0.00 resid: 5.76e-17 +LU natural time: 0.00 resid: 2.18e-17 +LU amd(A+A') time: 0.00 resid: 2.90e-17 +LU amd(S'*S) time: 0.00 resid: 2.20e-17 +LU amd(A'*A) time: 0.00 resid: 2.20e-17 ./build/cs_di_demo2 < Matrix/lp_afiro --- Matrix: 27-by-51, nnz: 102 (sym: 0: nnz 0), norm: 3.43e+00 blocks: 1 singletons: 0 structural rank: 27 -QR natural time: 0.00 resid: 3.85e-16 -QR amd(A'*A) time: 0.00 resid: 1.50e-16 +QR natural time: 0.00 resid: 1.71e-16 +QR amd(A'*A) time: 0.00 resid: 9.63e-17 ./build/cs_di_demo2 < Matrix/ash219 --- Matrix: 219-by-85, nnz: 438 (sym: 0: nnz 0), norm: 9.00e+00 @@ -407,20 +348,20 @@ QR amd(A'*A) time: 0.00 resid: 1.61e-02 --- Matrix: 492-by-490, nnz: 49920 (sym: 0: nnz 0), norm: 9.29e-01 blocks: 10 singletons: 8 structural rank: 448 -QR natural time: 0.11 resid: nan -QR amd(A'*A) time: 0.14 resid: nan +QR natural time: 0.03 resid: nan +QR amd(A'*A) time: 0.04 resid: nan ./build/cs_di_demo2 < Matrix/bcsstk01 --- Matrix: 48-by-48, nnz: 224 (sym: -1: nnz 400), norm: 3.57e+09 blocks: 1 singletons: 0 structural rank: 48 -QR natural time: 0.00 resid: 3.65e-19 -QR amd(A'*A) time: 0.00 resid: 4.02e-19 -LU natural time: 0.00 resid: 2.17e-19 -LU amd(A+A') time: 0.00 resid: 1.87e-19 -LU amd(S'*S) time: 0.00 resid: 2.38e-19 -LU amd(A'*A) time: 0.00 resid: 2.38e-19 -Chol natural time: 0.00 resid: 2.64e-19 -Chol amd(A+A') time: 0.00 resid: 2.55e-19 +QR natural time: 0.00 resid: 3.01e-19 +QR amd(A'*A) time: 0.00 resid: 5.05e-19 +LU natural time: 0.00 resid: 2.63e-19 +LU amd(A+A') time: 0.00 resid: 8.21e-20 +LU amd(S'*S) time: 0.00 resid: 1.96e-19 +LU amd(A'*A) time: 0.00 resid: 1.96e-19 +Chol natural time: 0.00 resid: 2.03e-19 +Chol amd(A+A') time: 0.00 resid: 2.01e-19 ./build/cs_di_demo3 < Matrix/bcsstk01 --- Matrix: 48-by-48, nnz: 224 (sym: -1: nnz 400), norm: 3.57e+09 @@ -429,38 +370,39 @@ chol then update/downdate amd(A+A') symbolic chol time 0.00 numeric chol time 0.00 solve chol time 0.00 -original: resid: 2.55e-19 +original: resid: 2.01e-19 update: time: 0.00 -update: time: 0.00 (incl solve) resid: 9.66e-19 -rechol: time: 0.00 (incl solve) resid: 1.55e-18 +update: time: 0.00 (incl solve) resid: 3.21e-18 +rechol: time: 0.00 (incl solve) resid: 3.07e-18 downdate: time: 0.00 -downdate: time: 0.00 (incl solve) resid: 3.74e-17 +downdate: time: 0.00 (incl solve) resid: 4.46e-17 ./build/cs_di_demo2 < Matrix/bcsstk16 --- Matrix: 4884-by-4884, nnz: 147631 (sym: -1: nnz 290378), norm: 7.01e+09 blocks: 75 singletons: 74 structural rank: 4884 -QR amd(A'*A) time: 1.38 resid: 2.01e-22 -LU amd(A+A') time: 0.81 resid: 1.10e-22 -LU amd(S'*S) time: 0.83 resid: 1.28e-22 -LU amd(A'*A) time: 0.86 resid: 1.78e-22 -Chol amd(A+A') time: 0.25 resid: 1.19e-22 +QR amd(A'*A) time: 0.38 resid: 1.79e-22 +LU amd(A+A') time: 0.17 resid: 1.07e-22 +LU amd(S'*S) time: 0.16 resid: 1.25e-22 +LU amd(A'*A) time: 0.17 resid: 1.91e-22 +Chol amd(A+A') time: 0.05 resid: 1.15e-22 ./build/cs_di_demo3 < Matrix/bcsstk16 --- Matrix: 4884-by-4884, nnz: 147631 (sym: -1: nnz 290378), norm: 7.01e+09 chol then update/downdate amd(A+A') -symbolic chol time 0.02 -numeric chol time 0.22 +symbolic chol time 0.00 +numeric chol time 0.04 solve chol time 0.00 -original: resid: 1.19e-22 +original: resid: 1.15e-22 update: time: 0.00 -update: time: 0.01 (incl solve) resid: 1.12e-23 -rechol: time: 0.23 (incl solve) resid: 1.17e-23 +update: time: 0.00 (incl solve) resid: 1.31e-23 +rechol: time: 0.04 (incl solve) resid: 1.44e-23 downdate: time: 0.00 -downdate: time: 0.01 (incl solve) resid: 4.09e-22 +downdate: time: 0.00 (incl solve) resid: 1.25e-21 ./build/cs_dl_demo1 < Matrix/t1 +CXSparse v4.3.0 T: -CXSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2022 +CXSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2023 triplet: 4-by-4, nzmax: 16 nnz: 10 2 2 : 3 1 0 : 3.1 @@ -473,7 +415,7 @@ triplet: 4-by-4, nzmax: 16 nnz: 10 0 0 : 4.5 2 1 : 1.7 A: -CXSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2022 +CXSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2023 4-by-4, nzmax: 10 nnz: 10, 1-norm: 11.1 col 0 : locations 0 to 2 1 : 3.1 @@ -490,7 +432,7 @@ CXSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2022 3 : 1 1 : 0.9 AT: -CXSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2022 +CXSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2023 4-by-4, nzmax: 10 nnz: 10, 1-norm: 7.7 col 0 : locations 0 to 1 0 : 4.5 @@ -507,7 +449,7 @@ CXSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2022 1 : 0.4 3 : 1 D: -CXSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2022 +CXSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2023 4-by-4, nzmax: 16 nnz: 16, 1-norm: 139.58 col 0 : locations 0 to 3 1 : 13.95 @@ -533,40 +475,40 @@ CXSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2022 --- Matrix: 4-by-4, nnz: 10 (sym: 0: nnz 0), norm: 1.11e+01 blocks: 1 singletons: 0 structural rank: 4 -QR natural time: 0.00 resid: 3.06e-17 -QR amd(A'*A) time: 0.00 resid: 2.30e-17 -LU natural time: 0.00 resid: 1.53e-17 -LU amd(A+A') time: 0.00 resid: 1.53e-17 -LU amd(S'*S) time: 0.00 resid: 0.00e+00 -LU amd(A'*A) time: 0.00 resid: 1.53e-17 +QR natural time: 0.00 resid: 2.87e-17 +QR amd(A'*A) time: 0.00 resid: 1.04e-17 +LU natural time: 0.00 resid: 1.04e-17 +LU amd(A+A') time: 0.00 resid: 4.94e-18 +LU amd(S'*S) time: 0.00 resid: 4.94e-18 +LU amd(A'*A) time: 0.00 resid: 4.94e-18 ./build/cs_dl_demo2 < Matrix/fs_183_1 --- Matrix: 183-by-183, nnz: 988 (sym: 0: nnz 0), norm: 1.70e+09 zero entries dropped: 71 tiny entries dropped: 10 blocks: 38 singletons: 37 structural rank: 183 -QR natural time: 0.01 resid: 1.42e-27 -QR amd(A'*A) time: 0.00 resid: 3.35e-28 -LU natural time: 0.00 resid: 6.20e-28 -LU amd(A+A') time: 0.00 resid: 1.55e-27 -LU amd(S'*S) time: 0.00 resid: 6.98e-28 -LU amd(A'*A) time: 0.00 resid: 6.98e-28 +QR natural time: 0.00 resid: 1.16e-27 +QR amd(A'*A) time: 0.00 resid: 6.82e-28 +LU natural time: 0.00 resid: 4.65e-28 +LU amd(A+A') time: 0.00 resid: 1.51e-27 +LU amd(S'*S) time: 0.00 resid: 7.82e-28 +LU amd(A'*A) time: 0.00 resid: 7.82e-28 ./build/cs_dl_demo2 < Matrix/west0067 --- Matrix: 67-by-67, nnz: 294 (sym: 0: nnz 0), norm: 6.14e+00 blocks: 2 singletons: 1 structural rank: 67 -QR natural time: 0.00 resid: 5.19e-17 -QR amd(A'*A) time: 0.00 resid: 3.25e-17 -LU natural time: 0.00 resid: 3.89e-17 -LU amd(A+A') time: 0.00 resid: 2.27e-17 -LU amd(S'*S) time: 0.00 resid: 1.95e-17 -LU amd(A'*A) time: 0.00 resid: 2.60e-17 +QR natural time: 0.00 resid: 4.46e-17 +QR amd(A'*A) time: 0.00 resid: 5.76e-17 +LU natural time: 0.00 resid: 2.18e-17 +LU amd(A+A') time: 0.00 resid: 2.90e-17 +LU amd(S'*S) time: 0.00 resid: 2.20e-17 +LU amd(A'*A) time: 0.00 resid: 2.20e-17 ./build/cs_dl_demo2 < Matrix/lp_afiro --- Matrix: 27-by-51, nnz: 102 (sym: 0: nnz 0), norm: 3.43e+00 blocks: 1 singletons: 0 structural rank: 27 -QR natural time: 0.00 resid: 3.85e-16 -QR amd(A'*A) time: 0.00 resid: 1.50e-16 +QR natural time: 0.00 resid: 1.71e-16 +QR amd(A'*A) time: 0.00 resid: 9.63e-17 ./build/cs_dl_demo2 < Matrix/ash219 --- Matrix: 219-by-85, nnz: 438 (sym: 0: nnz 0), norm: 9.00e+00 @@ -577,20 +519,20 @@ QR amd(A'*A) time: 0.00 resid: 1.61e-02 --- Matrix: 492-by-490, nnz: 49920 (sym: 0: nnz 0), norm: 9.29e-01 blocks: 10 singletons: 8 structural rank: 448 -QR natural time: 0.11 resid: nan -QR amd(A'*A) time: 0.13 resid: nan +QR natural time: 0.03 resid: nan +QR amd(A'*A) time: 0.04 resid: nan ./build/cs_dl_demo2 < Matrix/bcsstk01 --- Matrix: 48-by-48, nnz: 224 (sym: -1: nnz 400), norm: 3.57e+09 blocks: 1 singletons: 0 structural rank: 48 -QR natural time: 0.00 resid: 3.65e-19 -QR amd(A'*A) time: 0.00 resid: 4.02e-19 -LU natural time: 0.00 resid: 2.17e-19 -LU amd(A+A') time: 0.00 resid: 1.87e-19 -LU amd(S'*S) time: 0.00 resid: 2.38e-19 -LU amd(A'*A) time: 0.00 resid: 2.38e-19 -Chol natural time: 0.00 resid: 2.64e-19 -Chol amd(A+A') time: 0.00 resid: 2.55e-19 +QR natural time: 0.00 resid: 3.01e-19 +QR amd(A'*A) time: 0.00 resid: 5.05e-19 +LU natural time: 0.00 resid: 2.63e-19 +LU amd(A+A') time: 0.00 resid: 8.21e-20 +LU amd(S'*S) time: 0.00 resid: 1.96e-19 +LU amd(A'*A) time: 0.00 resid: 1.96e-19 +Chol natural time: 0.00 resid: 2.03e-19 +Chol amd(A+A') time: 0.00 resid: 2.01e-19 ./build/cs_dl_demo3 < Matrix/bcsstk01 --- Matrix: 48-by-48, nnz: 224 (sym: -1: nnz 400), norm: 3.57e+09 @@ -599,53 +541,53 @@ chol then update/downdate amd(A+A') symbolic chol time 0.00 numeric chol time 0.00 solve chol time 0.00 -original: resid: 2.55e-19 +original: resid: 2.01e-19 update: time: 0.00 -update: time: 0.00 (incl solve) resid: 9.66e-19 -rechol: time: 0.00 (incl solve) resid: 1.55e-18 +update: time: 0.00 (incl solve) resid: 3.21e-18 +rechol: time: 0.00 (incl solve) resid: 3.07e-18 downdate: time: 0.00 -downdate: time: 0.00 (incl solve) resid: 3.74e-17 +downdate: time: 0.00 (incl solve) resid: 4.46e-17 ./build/cs_dl_demo2 < Matrix/bcsstk16 --- Matrix: 4884-by-4884, nnz: 147631 (sym: -1: nnz 290378), norm: 7.01e+09 blocks: 75 singletons: 74 structural rank: 4884 -QR amd(A'*A) time: 1.42 resid: 2.01e-22 -LU amd(A+A') time: 0.80 resid: 1.10e-22 -LU amd(S'*S) time: 0.80 resid: 1.28e-22 -LU amd(A'*A) time: 0.83 resid: 1.78e-22 -Chol amd(A+A') time: 0.24 resid: 1.19e-22 +QR amd(A'*A) time: 0.39 resid: 1.79e-22 +LU amd(A+A') time: 0.18 resid: 1.07e-22 +LU amd(S'*S) time: 0.18 resid: 1.25e-22 +LU amd(A'*A) time: 0.18 resid: 1.91e-22 +Chol amd(A+A') time: 0.05 resid: 1.15e-22 ./build/cs_dl_demo3 < Matrix/bcsstk16 --- Matrix: 4884-by-4884, nnz: 147631 (sym: -1: nnz 290378), norm: 7.01e+09 chol then update/downdate amd(A+A') -symbolic chol time 0.02 -numeric chol time 0.23 +symbolic chol time 0.00 +numeric chol time 0.05 solve chol time 0.00 -original: resid: 1.19e-22 +original: resid: 1.15e-22 update: time: 0.00 -update: time: 0.01 (incl solve) resid: 1.12e-23 -rechol: time: 0.23 (incl solve) resid: 1.17e-23 +update: time: 0.00 (incl solve) resid: 1.31e-23 +rechol: time: 0.05 (incl solve) resid: 1.44e-23 downdate: time: 0.00 -downdate: time: 0.01 (incl solve) resid: 4.09e-22 +downdate: time: 0.00 (incl solve) resid: 1.25e-21 ( cd build && cmake -DDEMO=1 .. && cmake --build . --config Release -j8 ) -- Building CXSparse version: v4.3.0 (Dec 30, 2023) --- Source: /home/davis/dev2/SuiteSparse/CXSparse --- Build: /home/davis/dev2/SuiteSparse/CXSparse/build +-- Source: /Users/davis/dev2/SuiteSparse/CXSparse +-- Build: /Users/davis/dev2/SuiteSparse/CXSparse/build -- Install lib: lib -- Install include: include -- Install bin: bin -- Install pkg-file: lib -- Install rpath: --- Build rpath: /home/davis/dev2/SuiteSparse/CXSparse/build +-- Build rpath: /Users/davis/dev2/SuiteSparse/CXSparse/build -- Build type: Release --- Fortran: /usr/bin/f95 +-- Fortran: /opt/homebrew/bin/gfortran -- CUDA: not enabled -- complex data type: enabled -- SuiteSparse_config version: 7.4.0 --- SuiteSparse_config include: /home/davis/dev2/SuiteSparse/SuiteSparse_config --- SuiteSparse_config library: /home/davis/dev2/SuiteSparse/SuiteSparse_config/build/libsuitesparseconfig.so.7.4.0 --- SuiteSparse_config static: /home/davis/dev2/SuiteSparse/SuiteSparse_config/build/libsuitesparseconfig.a +-- SuiteSparse_config include: /Users/davis/dev2/SuiteSparse/SuiteSparse_config +-- SuiteSparse_config library: /Users/davis/dev2/SuiteSparse/SuiteSparse_config/build/libsuitesparseconfig.7.4.0.dylib +-- SuiteSparse_config static: /Users/davis/dev2/SuiteSparse/SuiteSparse_config/build/libsuitesparseconfig.a -- Also compiling the demos in CXSparse/Demo -- ------------------------------------------------------------------------ -- SuiteSparse CMAKE report for: cxsparse @@ -656,104 +598,43 @@ downdate: time: 0.01 (incl solve) resid: 4.09e-22 -- BUILD_SHARED_LIBS: ON -- BUILD_STATIC_LIBS: ON -- use OpenMP: no --- C compiler: /usr/bin/cc +-- C compiler: /Library/Developer/CommandLineTools/usr/bin/cc -- C flags: -- C++ compiler: -- C++ flags: -- C Flags release: -O3 -DNDEBUG -- C++ Flags release: --- Fortran compiler: /usr/bin/f95 +-- Fortran compiler: /opt/homebrew/bin/gfortran -- compile definitions: -- ------------------------------------------------------------------------ --- Configuring done --- Generating done --- Build files have been written to: /home/davis/dev2/SuiteSparse/CXSparse/build -make[1]: Entering directory '/home/davis/dev2/SuiteSparse/CXSparse/build' -make[2]: Entering directory '/home/davis/dev2/SuiteSparse/CXSparse/build' -make[3]: Entering directory '/home/davis/dev2/SuiteSparse/CXSparse/build' -make[3]: Entering directory '/home/davis/dev2/SuiteSparse/CXSparse/build' -Consolidate compiler generated dependencies of target CXSparse -make[3]: Leaving directory '/home/davis/dev2/SuiteSparse/CXSparse/build' -Consolidate compiler generated dependencies of target CXSparse_static -make[3]: Leaving directory '/home/davis/dev2/SuiteSparse/CXSparse/build' -[ 44%] Built target CXSparse -make[3]: Entering directory '/home/davis/dev2/SuiteSparse/CXSparse/build' -make[3]: Entering directory '/home/davis/dev2/SuiteSparse/CXSparse/build' -make[3]: Entering directory '/home/davis/dev2/SuiteSparse/CXSparse/build' -make[3]: Entering directory '/home/davis/dev2/SuiteSparse/CXSparse/build' -make[3]: Entering directory '/home/davis/dev2/SuiteSparse/CXSparse/build' -make[3]: Entering directory '/home/davis/dev2/SuiteSparse/CXSparse/build' -make[3]: Entering directory '/home/davis/dev2/SuiteSparse/CXSparse/build' -Consolidate compiler generated dependencies of target cs_dl_demo1 -make[3]: Leaving directory '/home/davis/dev2/SuiteSparse/CXSparse/build' -Consolidate compiler generated dependencies of target cs_di_demo2 -Consolidate compiler generated dependencies of target cs_di_demo1 -make[3]: Leaving directory '/home/davis/dev2/SuiteSparse/CXSparse/build' -Consolidate compiler generated dependencies of target cs_demo1 -make[3]: Leaving directory '/home/davis/dev2/SuiteSparse/CXSparse/build' -Consolidate compiler generated dependencies of target cs_demo2 -make[3]: Leaving directory '/home/davis/dev2/SuiteSparse/CXSparse/build' -Consolidate compiler generated dependencies of target cs_di_demo3 -make[3]: Leaving directory '/home/davis/dev2/SuiteSparse/CXSparse/build' -make[3]: Leaving directory '/home/davis/dev2/SuiteSparse/CXSparse/build' -Consolidate compiler generated dependencies of target cs_demo3 -make[3]: Leaving directory '/home/davis/dev2/SuiteSparse/CXSparse/build' +-- Configuring done (0.0s) +-- Generating done (0.1s) +-- Build files have been written to: /Users/davis/dev2/SuiteSparse/CXSparse/build +[ 89%] Built target CXSparse [ 89%] Built target CXSparse_static -[ 89%] Built target cs_dl_demo1 -make[3]: Entering directory '/home/davis/dev2/SuiteSparse/CXSparse/build' [ 89%] Built target cs_di_demo1 -[ 90%] Built target cs_di_demo2 -[ 90%] Built target cs_demo1 -make[3]: Entering directory '/home/davis/dev2/SuiteSparse/CXSparse/build' -[ 91%] Built target cs_demo2 -make[3]: Entering directory '/home/davis/dev2/SuiteSparse/CXSparse/build' -make[3]: Entering directory '/home/davis/dev2/SuiteSparse/CXSparse/build' -make[3]: Entering directory '/home/davis/dev2/SuiteSparse/CXSparse/build' -[ 92%] Built target cs_demo3 -Consolidate compiler generated dependencies of target cs_dl_demo3 -Consolidate compiler generated dependencies of target cs_dl_demo2 -make[3]: Leaving directory '/home/davis/dev2/SuiteSparse/CXSparse/build' -make[3]: Leaving directory '/home/davis/dev2/SuiteSparse/CXSparse/build' +[ 90%] Built target cs_demo3 +[ 91%] Built target cs_di_demo2 +[ 91%] Built target cs_demo1 +[ 92%] Built target cs_dl_demo2 [ 93%] Built target cs_di_demo3 -make[3]: Entering directory '/home/davis/dev2/SuiteSparse/CXSparse/build' -Consolidate compiler generated dependencies of target cs_ci_demo1 -make[3]: Leaving directory '/home/davis/dev2/SuiteSparse/CXSparse/build' -make[3]: Entering directory '/home/davis/dev2/SuiteSparse/CXSparse/build' -Consolidate compiler generated dependencies of target cs_cl_demo1 -make[3]: Entering directory '/home/davis/dev2/SuiteSparse/CXSparse/build' -make[3]: Leaving directory '/home/davis/dev2/SuiteSparse/CXSparse/build' -Consolidate compiler generated dependencies of target cs_ci_demo2 -make[3]: Leaving directory '/home/davis/dev2/SuiteSparse/CXSparse/build' -Consolidate compiler generated dependencies of target cs_ci_demo3 -make[3]: Leaving directory '/home/davis/dev2/SuiteSparse/CXSparse/build' -Consolidate compiler generated dependencies of target cs_cl_demo3 -make[3]: Leaving directory '/home/davis/dev2/SuiteSparse/CXSparse/build' -[ 94%] Built target cs_dl_demo3 -[ 95%] Built target cs_ci_demo1 -[ 96%] Built target cs_dl_demo2 -[ 96%] Built target cs_ci_demo2 -Consolidate compiler generated dependencies of target cs_cl_demo2 -make[3]: Leaving directory '/home/davis/dev2/SuiteSparse/CXSparse/build' -make[3]: Entering directory '/home/davis/dev2/SuiteSparse/CXSparse/build' -make[3]: Entering directory '/home/davis/dev2/SuiteSparse/CXSparse/build' +[ 94%] Built target cs_demo2 +[ 94%] Built target cs_dl_demo1 +[ 95%] Built target cs_dl_demo3 [ 97%] Built target cs_cl_demo1 -[ 97%] Built target cs_ci_demo3 -[ 98%] Built target cs_cl_demo2 +[ 97%] Built target cs_ci_demo1 +[ 97%] Built target cs_ci_demo2 +[ 98%] Built target cs_ci_demo3 +[ 97%] Built target cs_idemo [ 99%] Built target cs_cl_demo3 -Consolidate compiler generated dependencies of target cs_idemo -make[3]: Leaving directory '/home/davis/dev2/SuiteSparse/CXSparse/build' -Consolidate compiler generated dependencies of target cs_ldemo -make[3]: Leaving directory '/home/davis/dev2/SuiteSparse/CXSparse/build' -[ 99%] Built target cs_idemo +[ 99%] Built target cs_cl_demo2 [100%] Built target cs_ldemo -make[2]: Leaving directory '/home/davis/dev2/SuiteSparse/CXSparse/build' -make[1]: Leaving directory '/home/davis/dev2/SuiteSparse/CXSparse/build' ./build/cs_idemo < Matrix/t2 --- cs_idemo, size of CS_INT: 4 T: -CXSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2022 +CXSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2023 triplet: 4-by-4, nzmax: 16 nnz: 10 2 2 : (3, 3.14159) 1 0 : (3.1, 42) @@ -767,7 +648,7 @@ triplet: 4-by-4, nzmax: 16 nnz: 10 2 1 : (1.7, 1) Treal: -CXSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2022 +CXSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2023 triplet: 4-by-4, nzmax: 16 nnz: 10 2 2 : 3 1 0 : 3.1 @@ -781,7 +662,7 @@ triplet: 4-by-4, nzmax: 16 nnz: 10 2 1 : 1.7 Timag: -CXSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2022 +CXSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2023 triplet: 4-by-4, nzmax: 16 nnz: 10 2 2 : 3.14159 1 0 : 42 @@ -795,7 +676,7 @@ triplet: 4-by-4, nzmax: 16 nnz: 10 2 1 : 1 A: -CXSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2022 +CXSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2023 4-by-4, nzmax: 10 nnz: 10, 1-norm: 106.075 col 0 : locations 0 to 2 1 : (3.1, 42) @@ -813,7 +694,7 @@ CXSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2022 1 : (0.9, 99) C1 = real(A): -CXSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2022 +CXSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2023 4-by-4, nzmax: 10 nnz: 10, 1-norm: 11.1 col 0 : locations 0 to 2 1 : 3.1 @@ -831,7 +712,7 @@ CXSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2022 1 : 0.9 C2 = imag(A): -CXSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2022 +CXSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2023 4-by-4, nzmax: 10 nnz: 10, 1-norm: 106 col 0 : locations 0 to 2 1 : 42 @@ -849,7 +730,7 @@ CXSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2022 1 : 99 A1: -CXSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2022 +CXSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2023 4-by-4, nzmax: 10 nnz: 10, 1-norm: 11.1 col 0 : locations 0 to 2 1 : (3.1, 0) @@ -867,7 +748,7 @@ CXSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2022 1 : (0.9, 0) A2: -CXSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2022 +CXSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2023 4-by-4, nzmax: 10 nnz: 10, 1-norm: 106 col 0 : locations 0 to 2 1 : (0, 42) @@ -885,7 +766,7 @@ CXSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2022 1 : (0, 99) B = conj(A): -CXSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2022 +CXSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2023 4-by-4, nzmax: 10 nnz: 10, 1-norm: 106.075 col 0 : locations 0 to 2 1 : (3.1, -42) @@ -906,7 +787,7 @@ CXSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2022 --- cs_ldemo, size of CS_INT: 8 T: -CXSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2022 +CXSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2023 triplet: 4-by-4, nzmax: 16 nnz: 10 2 2 : (3, 3.14159) 1 0 : (3.1, 42) @@ -920,7 +801,7 @@ triplet: 4-by-4, nzmax: 16 nnz: 10 2 1 : (1.7, 1) Treal: -CXSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2022 +CXSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2023 triplet: 4-by-4, nzmax: 16 nnz: 10 2 2 : 3 1 0 : 3.1 @@ -934,7 +815,7 @@ triplet: 4-by-4, nzmax: 16 nnz: 10 2 1 : 1.7 Timag: -CXSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2022 +CXSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2023 triplet: 4-by-4, nzmax: 16 nnz: 10 2 2 : 3.14159 1 0 : 42 @@ -948,7 +829,7 @@ triplet: 4-by-4, nzmax: 16 nnz: 10 2 1 : 1 A: -CXSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2022 +CXSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2023 4-by-4, nzmax: 10 nnz: 10, 1-norm: 106.075 col 0 : locations 0 to 2 1 : (3.1, 42) @@ -966,7 +847,7 @@ CXSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2022 1 : (0.9, 99) C1 = real(A): -CXSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2022 +CXSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2023 4-by-4, nzmax: 10 nnz: 10, 1-norm: 11.1 col 0 : locations 0 to 2 1 : 3.1 @@ -984,7 +865,7 @@ CXSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2022 1 : 0.9 C2 = imag(A): -CXSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2022 +CXSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2023 4-by-4, nzmax: 10 nnz: 10, 1-norm: 106 col 0 : locations 0 to 2 1 : 42 @@ -1002,7 +883,7 @@ CXSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2022 1 : 99 A1: -CXSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2022 +CXSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2023 4-by-4, nzmax: 10 nnz: 10, 1-norm: 11.1 col 0 : locations 0 to 2 1 : (3.1, 0) @@ -1020,7 +901,7 @@ CXSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2022 1 : (0.9, 0) A2: -CXSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2022 +CXSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2023 4-by-4, nzmax: 10 nnz: 10, 1-norm: 106 col 0 : locations 0 to 2 1 : (0, 42) @@ -1038,7 +919,7 @@ CXSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2022 1 : (0, 99) B = conj(A): -CXSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2022 +CXSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2023 4-by-4, nzmax: 10 nnz: 10, 1-norm: 106.075 col 0 : locations 0 to 2 1 : (3.1, -42) @@ -1055,8 +936,9 @@ CXSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2022 3 : (1, -7) 1 : (0.9, -99) ./build/cs_ci_demo1 < Matrix/t2 +CXSparse v4.3.0 T: -CXSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2022 +CXSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2023 triplet: 4-by-4, nzmax: 16 nnz: 10 2 2 : (3, 3.14159) 1 0 : (3.1, 42) @@ -1069,7 +951,7 @@ triplet: 4-by-4, nzmax: 16 nnz: 10 0 0 : (4.5, 6) 2 1 : (1.7, 1) A: -CXSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2022 +CXSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2023 4-by-4, nzmax: 10 nnz: 10, 1-norm: 106.075 col 0 : locations 0 to 2 1 : (3.1, 42) @@ -1086,7 +968,7 @@ CXSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2022 3 : (1, 7) 1 : (0.9, 99) AT: -CXSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2022 +CXSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2023 4-by-4, nzmax: 10 nnz: 10, 1-norm: 144.296 col 0 : locations 0 to 1 0 : (4.5, -6) @@ -1103,7 +985,7 @@ CXSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2022 1 : (0.4, -2.71828) 3 : (1, -7) D: -CXSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2022 +CXSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2023 4-by-4, nzmax: 16 nnz: 16, 1-norm: 25308.3 col 0 : locations 0 to 3 1 : (265.95, 170.4) @@ -1129,24 +1011,24 @@ CXSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2022 --- Matrix: 4-by-4, nnz: 10 (sym: 0: nnz 0), norm: 1.06e+02 blocks: 1 singletons: 0 structural rank: 4 -QR natural time: 0.00 resid: 2.06e-17 -QR amd(A'*A) time: 0.00 resid: 6.36e-18 -LU natural time: 0.00 resid: 4.88e-18 -LU amd(A+A') time: 0.00 resid: 2.11e-18 -LU amd(S'*S) time: 0.00 resid: 6.36e-18 -LU amd(A'*A) time: 0.00 resid: 2.11e-18 +QR natural time: 0.00 resid: 2.02e-17 +QR amd(A'*A) time: 0.00 resid: 7.71e-18 +LU natural time: 0.00 resid: 4.43e-18 +LU amd(A+A') time: 0.00 resid: 6.17e-18 +LU amd(S'*S) time: 0.00 resid: 8.98e-18 +LU amd(A'*A) time: 0.00 resid: 6.17e-18 ./build/cs_ci_demo2 < Matrix/t3 --- Matrix: 3-by-4, nnz: 12 (sym: 0: nnz 0), norm: 3.06e+00 blocks: 1 singletons: 0 structural rank: 3 -QR natural time: 0.00 resid: 1.05e-16 -QR amd(A'*A) time: 0.00 resid: 1.05e-16 +QR natural time: 0.00 resid: 6.29e-17 +QR amd(A'*A) time: 0.00 resid: 6.29e-17 ./build/cs_ci_demo2 < Matrix/t4 --- Matrix: 2-by-2, nnz: 3 (sym: 1: nnz 4), norm: 2.83e+00 blocks: 1 singletons: 0 structural rank: 2 -QR natural time: 0.00 resid: 5.65e-17 -QR amd(A'*A) time: 0.00 resid: 5.65e-17 +QR natural time: 0.00 resid: 1.11e-16 +QR amd(A'*A) time: 0.00 resid: 1.11e-16 LU natural time: 0.00 resid: 0.00e+00 LU amd(A+A') time: 0.00 resid: 0.00e+00 LU amd(S'*S) time: 0.00 resid: 0.00e+00 @@ -1157,58 +1039,58 @@ Chol amd(A+A') time: 0.00 (failed) --- Matrix: 67-by-67, nnz: 294 (sym: 0: nnz 0), norm: 6.17e+00 blocks: 2 singletons: 1 structural rank: 67 -QR natural time: 0.00 resid: 8.16e-17 -QR amd(A'*A) time: 0.00 resid: 5.34e-17 -LU natural time: 0.00 resid: 4.54e-17 -LU amd(A+A') time: 0.00 resid: 5.90e-17 -LU amd(S'*S) time: 0.00 resid: 5.28e-17 -LU amd(A'*A) time: 0.00 resid: 4.76e-17 +QR natural time: 0.00 resid: 5.78e-17 +QR amd(A'*A) time: 0.00 resid: 4.76e-17 +LU natural time: 0.00 resid: 1.07e-16 +LU amd(A+A') time: 0.00 resid: 9.01e-17 +LU amd(S'*S) time: 0.00 resid: 4.37e-17 +LU amd(A'*A) time: 0.00 resid: 5.81e-17 ./build/cs_ci_demo2 < Matrix/c_mbeacxc --- Matrix: 492-by-490, nnz: 49920 (sym: 0: nnz 0), norm: 9.29e-01 blocks: 10 singletons: 8 structural rank: 448 -QR natural time: 0.43 resid: nan -QR amd(A'*A) time: 0.53 resid: nan +QR natural time: 0.04 resid: nan +QR amd(A'*A) time: 0.05 resid: nan ./build/cs_ci_demo2 < Matrix/young1c --- Matrix: 841-by-841, nnz: 4089 (sym: 0: nnz 0), norm: 7.30e+02 blocks: 1 singletons: 0 structural rank: 841 -QR natural time: 0.03 resid: 1.81e-16 -QR amd(A'*A) time: 0.02 resid: 1.57e-16 -LU natural time: 0.01 resid: 1.39e-16 -LU amd(A+A') time: 0.01 resid: 2.95e-16 -LU amd(S'*S) time: 0.01 resid: 3.37e-16 -LU amd(A'*A) time: 0.01 resid: 3.37e-16 +QR natural time: 0.00 resid: 1.53e-16 +QR amd(A'*A) time: 0.00 resid: 1.39e-16 +LU natural time: 0.00 resid: 1.16e-16 +LU amd(A+A') time: 0.00 resid: 3.20e-16 +LU amd(S'*S) time: 0.00 resid: 2.34e-16 +LU amd(A'*A) time: 0.00 resid: 2.34e-16 ./build/cs_ci_demo2 < Matrix/qc324 --- Matrix: 324-by-324, nnz: 26730 (sym: 0: nnz 0), norm: 1.71e+00 blocks: 1 singletons: 0 structural rank: 324 -QR natural time: 0.07 resid: 9.42e-17 -QR amd(A'*A) time: 0.09 resid: 8.94e-17 -LU natural time: 0.03 resid: 6.01e-17 -LU amd(A+A') time: 0.03 resid: 4.05e-17 -LU amd(S'*S) time: 0.04 resid: 4.71e-17 -LU amd(A'*A) time: 0.04 resid: 4.71e-17 +QR natural time: 0.01 resid: 8.03e-17 +QR amd(A'*A) time: 0.01 resid: 8.22e-17 +LU natural time: 0.00 resid: 4.86e-17 +LU amd(A+A') time: 0.00 resid: 3.83e-17 +LU amd(S'*S) time: 0.01 resid: 4.86e-17 +LU amd(A'*A) time: 0.01 resid: 4.86e-17 ./build/cs_ci_demo2 < Matrix/neumann --- Matrix: 1600-by-1600, nnz: 7840 (sym: 0: nnz 0), norm: 1.41e+01 blocks: 1 singletons: 0 structural rank: 1600 -QR amd(A'*A) time: 0.05 resid: 1.04e-15 -LU amd(A+A') time: 0.01 resid: 3.55e-16 -LU amd(S'*S) time: 0.02 resid: 4.03e-16 -LU amd(A'*A) time: 0.02 resid: 4.03e-16 +QR amd(A'*A) time: 0.01 resid: 1.07e-15 +LU amd(A+A') time: 0.00 resid: 4.59e-16 +LU amd(S'*S) time: 0.00 resid: 4.56e-16 +LU amd(A'*A) time: 0.00 resid: 4.56e-16 ./build/cs_ci_demo2 < Matrix/c4 --- Matrix: 4-by-4, nnz: 10 (sym: -1: nnz 16), norm: 7.37e+01 blocks: 1 singletons: 0 structural rank: 4 QR natural time: 0.00 resid: 5.85e-17 QR amd(A'*A) time: 0.00 resid: 5.85e-17 -LU natural time: 0.00 resid: 2.29e-17 -LU amd(A+A') time: 0.00 resid: 2.29e-17 -LU amd(S'*S) time: 0.00 resid: 2.29e-17 -LU amd(A'*A) time: 0.00 resid: 2.29e-17 -Chol natural time: 0.00 resid: 6.88e-17 -Chol amd(A+A') time: 0.00 resid: 6.88e-17 +LU natural time: 0.00 resid: 6.88e-17 +LU amd(A+A') time: 0.00 resid: 6.88e-17 +LU amd(S'*S) time: 0.00 resid: 6.88e-17 +LU amd(A'*A) time: 0.00 resid: 6.88e-17 +Chol natural time: 0.00 resid: 9.17e-17 +Chol amd(A+A') time: 0.00 resid: 9.17e-17 ./build/cs_ci_demo3 < Matrix/c4 --- Matrix: 4-by-4, nnz: 10 (sym: -1: nnz 16), norm: 7.37e+01 @@ -1217,21 +1099,21 @@ chol then update/downdate amd(A+A') symbolic chol time 0.00 numeric chol time 0.00 solve chol time 0.00 -original: resid: 6.88e-17 +original: resid: 9.17e-17 update: time: 0.00 -update: time: 0.00 (incl solve) resid: 6.49e-17 -rechol: time: 0.00 (incl solve) resid: 6.49e-17 +update: time: 0.00 (incl solve) resid: 7.03e-17 +rechol: time: 0.00 (incl solve) resid: 4.83e-17 downdate: time: 0.00 -downdate: time: 0.00 (incl solve) resid: 5.85e-17 +downdate: time: 0.00 (incl solve) resid: 9.17e-17 ./build/cs_ci_demo2 < Matrix/mhd1280b --- Matrix: 1280-by-1280, nnz: 11963 (sym: -1: nnz 22646), norm: 8.00e+01 tiny entries dropped: 66 blocks: 20 singletons: 14 structural rank: 1280 -QR amd(A'*A) time: 0.01 resid: 6.15e-25 -LU amd(A+A') time: 0.01 resid: 2.33e-25 -LU amd(S'*S) time: 0.01 resid: 3.96e-25 -LU amd(A'*A) time: 0.01 resid: 3.96e-25 +QR amd(A'*A) time: 0.00 resid: 5.96e-25 +LU amd(A+A') time: 0.00 resid: 2.33e-25 +LU amd(S'*S) time: 0.00 resid: 2.45e-25 +LU amd(A'*A) time: 0.00 resid: 2.45e-25 Chol amd(A+A') time: 0.00 resid: 1.58e-25 ./build/cs_ci_demo3 < Matrix/mhd1280b @@ -1241,15 +1123,16 @@ chol then update/downdate amd(A+A') symbolic chol time 0.00 numeric chol time 0.00 solve chol time 0.00 -original: resid: 1.51e-25 +original: resid: 2.14e-25 update: time: 0.00 -update: time: 0.00 (incl solve) resid: 1.75e-25 -rechol: time: 0.00 (incl solve) resid: 1.71e-25 +update: time: 0.00 (incl solve) resid: 2.14e-25 +rechol: time: 0.00 (incl solve) resid: 2.14e-25 downdate: time: 0.00 -downdate: time: 0.00 (incl solve) resid: 5.85e-25 +downdate: time: 0.00 (incl solve) resid: 6.66e-25 ./build/cs_cl_demo1 < Matrix/t2 +CXSparse v4.3.0 T: -CXSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2022 +CXSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2023 triplet: 4-by-4, nzmax: 16 nnz: 10 2 2 : (3, 3.14159) 1 0 : (3.1, 42) @@ -1262,7 +1145,7 @@ triplet: 4-by-4, nzmax: 16 nnz: 10 0 0 : (4.5, 6) 2 1 : (1.7, 1) A: -CXSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2022 +CXSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2023 4-by-4, nzmax: 10 nnz: 10, 1-norm: 106.075 col 0 : locations 0 to 2 1 : (3.1, 42) @@ -1279,7 +1162,7 @@ CXSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2022 3 : (1, 7) 1 : (0.9, 99) AT: -CXSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2022 +CXSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2023 4-by-4, nzmax: 10 nnz: 10, 1-norm: 144.296 col 0 : locations 0 to 1 0 : (4.5, -6) @@ -1296,7 +1179,7 @@ CXSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2022 1 : (0.4, -2.71828) 3 : (1, -7) D: -CXSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2022 +CXSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2023 4-by-4, nzmax: 16 nnz: 16, 1-norm: 25308.3 col 0 : locations 0 to 3 1 : (265.95, 170.4) @@ -1322,24 +1205,24 @@ CXSparse Version 4.3.0, Dec 30, 2023. Copyright (c) Timothy A. Davis, 2006-2022 --- Matrix: 4-by-4, nnz: 10 (sym: 0: nnz 0), norm: 1.06e+02 blocks: 1 singletons: 0 structural rank: 4 -QR natural time: 0.00 resid: 2.06e-17 -QR amd(A'*A) time: 0.00 resid: 6.36e-18 -LU natural time: 0.00 resid: 4.88e-18 -LU amd(A+A') time: 0.00 resid: 2.11e-18 -LU amd(S'*S) time: 0.00 resid: 6.36e-18 -LU amd(A'*A) time: 0.00 resid: 2.11e-18 +QR natural time: 0.00 resid: 2.02e-17 +QR amd(A'*A) time: 0.00 resid: 7.71e-18 +LU natural time: 0.00 resid: 4.43e-18 +LU amd(A+A') time: 0.00 resid: 6.17e-18 +LU amd(S'*S) time: 0.00 resid: 8.98e-18 +LU amd(A'*A) time: 0.00 resid: 6.17e-18 ./build/cs_cl_demo2 < Matrix/t3 --- Matrix: 3-by-4, nnz: 12 (sym: 0: nnz 0), norm: 3.06e+00 blocks: 1 singletons: 0 structural rank: 3 -QR natural time: 0.00 resid: 1.05e-16 -QR amd(A'*A) time: 0.00 resid: 1.05e-16 +QR natural time: 0.00 resid: 6.29e-17 +QR amd(A'*A) time: 0.00 resid: 6.29e-17 ./build/cs_cl_demo2 < Matrix/t4 --- Matrix: 2-by-2, nnz: 3 (sym: 1: nnz 4), norm: 2.83e+00 blocks: 1 singletons: 0 structural rank: 2 -QR natural time: 0.00 resid: 5.65e-17 -QR amd(A'*A) time: 0.00 resid: 5.65e-17 +QR natural time: 0.00 resid: 1.11e-16 +QR amd(A'*A) time: 0.00 resid: 1.11e-16 LU natural time: 0.00 resid: 0.00e+00 LU amd(A+A') time: 0.00 resid: 0.00e+00 LU amd(S'*S) time: 0.00 resid: 0.00e+00 @@ -1350,58 +1233,58 @@ Chol amd(A+A') time: 0.00 (failed) --- Matrix: 67-by-67, nnz: 294 (sym: 0: nnz 0), norm: 6.17e+00 blocks: 2 singletons: 1 structural rank: 67 -QR natural time: 0.00 resid: 8.16e-17 -QR amd(A'*A) time: 0.00 resid: 5.34e-17 -LU natural time: 0.00 resid: 4.54e-17 -LU amd(A+A') time: 0.00 resid: 5.90e-17 -LU amd(S'*S) time: 0.00 resid: 5.28e-17 -LU amd(A'*A) time: 0.00 resid: 4.76e-17 +QR natural time: 0.00 resid: 5.78e-17 +QR amd(A'*A) time: 0.00 resid: 4.76e-17 +LU natural time: 0.00 resid: 1.07e-16 +LU amd(A+A') time: 0.00 resid: 9.01e-17 +LU amd(S'*S) time: 0.00 resid: 4.37e-17 +LU amd(A'*A) time: 0.00 resid: 5.81e-17 ./build/cs_cl_demo2 < Matrix/c_mbeacxc --- Matrix: 492-by-490, nnz: 49920 (sym: 0: nnz 0), norm: 9.29e-01 blocks: 10 singletons: 8 structural rank: 448 -QR natural time: 0.42 resid: nan -QR amd(A'*A) time: 0.46 resid: nan +QR natural time: 0.04 resid: nan +QR amd(A'*A) time: 0.05 resid: nan ./build/cs_cl_demo2 < Matrix/young1c --- Matrix: 841-by-841, nnz: 4089 (sym: 0: nnz 0), norm: 7.30e+02 blocks: 1 singletons: 0 structural rank: 841 -QR natural time: 0.03 resid: 1.81e-16 -QR amd(A'*A) time: 0.02 resid: 1.57e-16 -LU natural time: 0.01 resid: 1.39e-16 -LU amd(A+A') time: 0.01 resid: 2.95e-16 -LU amd(S'*S) time: 0.01 resid: 3.37e-16 -LU amd(A'*A) time: 0.01 resid: 3.37e-16 +QR natural time: 0.00 resid: 1.53e-16 +QR amd(A'*A) time: 0.00 resid: 1.39e-16 +LU natural time: 0.00 resid: 1.16e-16 +LU amd(A+A') time: 0.00 resid: 3.20e-16 +LU amd(S'*S) time: 0.00 resid: 2.34e-16 +LU amd(A'*A) time: 0.00 resid: 2.34e-16 ./build/cs_cl_demo2 < Matrix/qc324 --- Matrix: 324-by-324, nnz: 26730 (sym: 0: nnz 0), norm: 1.71e+00 blocks: 1 singletons: 0 structural rank: 324 -QR natural time: 0.07 resid: 9.42e-17 -QR amd(A'*A) time: 0.08 resid: 8.94e-17 -LU natural time: 0.03 resid: 6.01e-17 -LU amd(A+A') time: 0.03 resid: 4.05e-17 -LU amd(S'*S) time: 0.03 resid: 4.71e-17 -LU amd(A'*A) time: 0.03 resid: 4.71e-17 +QR natural time: 0.01 resid: 8.03e-17 +QR amd(A'*A) time: 0.01 resid: 8.22e-17 +LU natural time: 0.00 resid: 4.86e-17 +LU amd(A+A') time: 0.00 resid: 3.83e-17 +LU amd(S'*S) time: 0.01 resid: 4.86e-17 +LU amd(A'*A) time: 0.01 resid: 4.86e-17 ./build/cs_cl_demo2 < Matrix/neumann --- Matrix: 1600-by-1600, nnz: 7840 (sym: 0: nnz 0), norm: 1.41e+01 blocks: 1 singletons: 0 structural rank: 1600 -QR amd(A'*A) time: 0.04 resid: 1.04e-15 -LU amd(A+A') time: 0.01 resid: 3.55e-16 -LU amd(S'*S) time: 0.02 resid: 4.03e-16 -LU amd(A'*A) time: 0.02 resid: 4.03e-16 +QR amd(A'*A) time: 0.01 resid: 1.07e-15 +LU amd(A+A') time: 0.00 resid: 4.59e-16 +LU amd(S'*S) time: 0.00 resid: 4.56e-16 +LU amd(A'*A) time: 0.00 resid: 4.56e-16 ./build/cs_cl_demo2 < Matrix/c4 --- Matrix: 4-by-4, nnz: 10 (sym: -1: nnz 16), norm: 7.37e+01 blocks: 1 singletons: 0 structural rank: 4 QR natural time: 0.00 resid: 5.85e-17 QR amd(A'*A) time: 0.00 resid: 5.85e-17 -LU natural time: 0.00 resid: 2.29e-17 -LU amd(A+A') time: 0.00 resid: 2.29e-17 -LU amd(S'*S) time: 0.00 resid: 2.29e-17 -LU amd(A'*A) time: 0.00 resid: 2.29e-17 -Chol natural time: 0.00 resid: 6.88e-17 -Chol amd(A+A') time: 0.00 resid: 6.88e-17 +LU natural time: 0.00 resid: 6.88e-17 +LU amd(A+A') time: 0.00 resid: 6.88e-17 +LU amd(S'*S) time: 0.00 resid: 6.88e-17 +LU amd(A'*A) time: 0.00 resid: 6.88e-17 +Chol natural time: 0.00 resid: 9.17e-17 +Chol amd(A+A') time: 0.00 resid: 9.17e-17 ./build/cs_cl_demo3 < Matrix/c4 --- Matrix: 4-by-4, nnz: 10 (sym: -1: nnz 16), norm: 7.37e+01 @@ -1410,21 +1293,21 @@ chol then update/downdate amd(A+A') symbolic chol time 0.00 numeric chol time 0.00 solve chol time 0.00 -original: resid: 6.88e-17 +original: resid: 9.17e-17 update: time: 0.00 -update: time: 0.00 (incl solve) resid: 6.49e-17 -rechol: time: 0.00 (incl solve) resid: 6.49e-17 +update: time: 0.00 (incl solve) resid: 7.03e-17 +rechol: time: 0.00 (incl solve) resid: 4.83e-17 downdate: time: 0.00 -downdate: time: 0.00 (incl solve) resid: 5.85e-17 +downdate: time: 0.00 (incl solve) resid: 9.17e-17 ./build/cs_cl_demo2 < Matrix/mhd1280b --- Matrix: 1280-by-1280, nnz: 11963 (sym: -1: nnz 22646), norm: 8.00e+01 tiny entries dropped: 66 blocks: 20 singletons: 14 structural rank: 1280 -QR amd(A'*A) time: 0.01 resid: 6.15e-25 -LU amd(A+A') time: 0.01 resid: 2.33e-25 -LU amd(S'*S) time: 0.01 resid: 3.96e-25 -LU amd(A'*A) time: 0.01 resid: 3.96e-25 +QR amd(A'*A) time: 0.00 resid: 5.96e-25 +LU amd(A+A') time: 0.00 resid: 2.33e-25 +LU amd(S'*S) time: 0.00 resid: 2.45e-25 +LU amd(A'*A) time: 0.00 resid: 2.45e-25 Chol amd(A+A') time: 0.00 resid: 1.58e-25 ./build/cs_cl_demo3 < Matrix/mhd1280b @@ -1434,9 +1317,9 @@ chol then update/downdate amd(A+A') symbolic chol time 0.00 numeric chol time 0.00 solve chol time 0.00 -original: resid: 1.51e-25 +original: resid: 2.14e-25 update: time: 0.00 -update: time: 0.00 (incl solve) resid: 1.75e-25 -rechol: time: 0.00 (incl solve) resid: 1.71e-25 +update: time: 0.00 (incl solve) resid: 2.14e-25 +rechol: time: 0.00 (incl solve) resid: 2.14e-25 downdate: time: 0.00 -downdate: time: 0.00 (incl solve) resid: 5.85e-25 +downdate: time: 0.00 (incl solve) resid: 6.66e-25 diff --git a/CXSparse/Demo/cs_demo1.c b/CXSparse/Demo/cs_demo1.c index 2e7a7754b..9f7754a11 100644 --- a/CXSparse/Demo/cs_demo1.c +++ b/CXSparse/Demo/cs_demo1.c @@ -1,4 +1,4 @@ -// CSparse/Demo/cs_demo1: demo program for CXSparse (complex int32_t) +// CXSparse/Demo/cs_demo1: demo program for CXSparse (double int32_t) // CXSparse, Copyright (c) 2006-2022, Timothy A. Davis. All Rights Reserved. // SPDX-License-Identifier: LGPL-2.1+ #include "cs.h" @@ -6,6 +6,16 @@ int main (void) { cs *T, *A, *Eye, *AT, *C, *D ; int i, m ; + int version [3] ; + cxsparse_version (version) ; + printf ("CXSparse v%d.%d.%d\n", version [0], version [1], version [2]) ; + if ((version [0] != CS_VER) || (version [1] != CS_SUBVER) || + (version [2] != CS_SUBSUB)) + { + fprintf (stderr, "version in header does not match library\n") ; + abort ( ) ; + } + T = cs_load (stdin) ; /* load triplet matrix T from stdin */ printf ("T:\n") ; cs_print (T, 0) ; /* print T */ A = cs_compress (T) ; /* A = compressed-column form of T */ diff --git a/CXSparse/Demo/cs_demo2.c b/CXSparse/Demo/cs_demo2.c index 4c3f24bd5..4c0aac7b4 100644 --- a/CXSparse/Demo/cs_demo2.c +++ b/CXSparse/Demo/cs_demo2.c @@ -1,4 +1,4 @@ -// CSparse/Demo/cs_demo2: demo program for CXSparse (complex int32_t) +// CSparse/Demo/cs_demo2: demo program for CXSparse (double int32_t) // CXSparse, Copyright (c) 2006-2022, Timothy A. Davis. All Rights Reserved. // SPDX-License-Identifier: LGPL-2.1+ #include "cs_demo.h" diff --git a/CXSparse/Demo/cs_demo3.c b/CXSparse/Demo/cs_demo3.c index 73b287047..2908e46bb 100644 --- a/CXSparse/Demo/cs_demo3.c +++ b/CXSparse/Demo/cs_demo3.c @@ -1,4 +1,4 @@ -// CSparse/Demo/cs_demo3: demo program for CXSparse (complex int32_t) +// CSparse/Demo/cs_demo3: demo program for CXSparse (double int32_t) // CXSparse, Copyright (c) 2006-2022, Timothy A. Davis. All Rights Reserved. // SPDX-License-Identifier: LGPL-2.1+ #include "cs_demo.h" diff --git a/CXSparse/Demo/cs_di_demo1.c b/CXSparse/Demo/cs_di_demo1.c index 36545be48..111bce157 100644 --- a/CXSparse/Demo/cs_di_demo1.c +++ b/CXSparse/Demo/cs_di_demo1.c @@ -1,4 +1,4 @@ -// CSparse/Demo/cs_di_demo1: demo program for CXSparse (double int32_t) +// CXSparse/Demo/cs_di_demo1: demo program for CXSparse (double int32_t) // CXSparse, Copyright (c) 2006-2022, Timothy A. Davis. All Rights Reserved. // SPDX-License-Identifier: LGPL-2.1+ #include "cs.h" @@ -6,6 +6,16 @@ int main (void) { cs_di *T, *A, *Eye, *AT, *C, *D ; int i, m ; + int version [3] ; + cxsparse_version (version) ; + printf ("CXSparse v%d.%d.%d\n", version [0], version [1], version [2]) ; + if ((version [0] != CS_VER) || (version [1] != CS_SUBVER) || + (version [2] != CS_SUBSUB)) + { + fprintf (stderr, "version in header does not match library\n") ; + abort ( ) ; + } + T = cs_di_load (stdin) ; /* load triplet matrix T from stdin */ printf ("T:\n") ; cs_di_print (T, 0) ; /* print T */ A = cs_di_compress (T) ; /* A = compressed-column form of T */ diff --git a/CXSparse/Demo/cs_dl_demo1.c b/CXSparse/Demo/cs_dl_demo1.c index 6bba4c5e0..15ce85fed 100644 --- a/CXSparse/Demo/cs_dl_demo1.c +++ b/CXSparse/Demo/cs_dl_demo1.c @@ -1,4 +1,4 @@ -// CSparse/Demo/cs_dl_demo1: demo program for CXSparse (double int64_t) +// CXSparse/Demo/cs_dl_demo1: demo program for CXSparse (double int64_t) // CXSparse, Copyright (c) 2006-2022, Timothy A. Davis. All Rights Reserved. // SPDX-License-Identifier: LGPL-2.1+ #include "cs.h" @@ -6,6 +6,16 @@ int main (void) { cs_dl *T, *A, *Eye, *AT, *C, *D ; int64_t i, m ; + int version [3] ; + cxsparse_version (version) ; + printf ("CXSparse v%d.%d.%d\n", version [0], version [1], version [2]) ; + if ((version [0] != CS_VER) || (version [1] != CS_SUBVER) || + (version [2] != CS_SUBSUB)) + { + fprintf (stderr, "version in header does not match library\n") ; + abort ( ) ; + } + T = cs_dl_load (stdin) ; /* load triplet matrix T from stdin */ printf ("T:\n") ; cs_dl_print (T, 0) ; /* print T */ A = cs_dl_compress (T) ; /* A = compressed-column form of T */ diff --git a/CXSparse/Doc/ChangeLog b/CXSparse/Doc/ChangeLog index c3071038a..66cca6534 100644 --- a/CXSparse/Doc/ChangeLog +++ b/CXSparse/Doc/ChangeLog @@ -1,6 +1,7 @@ Dec 30, 2023: version 4.3.0 * major change to build system: by Markus Mützel + * cxsparse_version: added to return CXSparse version Sept 18, 2023: version 4.2.1 diff --git a/CXSparse/Include/cs.h b/CXSparse/Include/cs.h index e9ec43c04..b27b34aaf 100644 --- a/CXSparse/Include/cs.h +++ b/CXSparse/Include/cs.h @@ -57,6 +57,8 @@ extern "C" { #endif +void cxsparse_version (int version [3]) ; // return version + /* -------------------------------------------------------------------------- */ /* double/int32_t version of CXSparse */ /* -------------------------------------------------------------------------- */ diff --git a/CXSparse/Source/cs_version.c b/CXSparse/Source/cs_version.c new file mode 100644 index 000000000..7919ac9c3 --- /dev/null +++ b/CXSparse/Source/cs_version.c @@ -0,0 +1,10 @@ +// CXSparse/Source/cxsparse_version: return CXSparse version +// CXSparse, Copyright (c) 2006-2023, Timothy A. Davis. All Rights Reserved. +// SPDX-License-Identifier: LGPL-2.1+ +#include "cs.h" +void cxsparse_version (int version [3]) +{ + version [0] = CS_VER ; + version [1] = CS_SUBVER ; + version [2] = CS_SUBSUB ; +} diff --git a/ChangeLog b/ChangeLog index b9b2561ea..c3a9d88df 100644 --- a/ChangeLog +++ b/ChangeLog @@ -11,6 +11,9 @@ Dec 30, 2023: version 7.4.0 * AMD 3.3.0: minor change for CHOLMOD 5.1.0 tests * CAMD 3.3.0: minor change for CHOLMOD 5.1.0 tests * SuiteSparse_config 7.4.0: added wrappers for single-precision BLAS/LAPACK + * *_version: added methods to all package that didn't have them: + AMD, CAMD, COLAMD, CCOLAMD, BTF, CSparse, CXSparse, KLU, BTF, RBio, + SPEX, SPQR, and UMFPACK. Oct 31, 2023: version 7.3.1 diff --git a/Example/Config/my.h.in b/Example/Config/my.h.in index 2aa853943..5e43c5dfc 100644 --- a/Example/Config/my.h.in +++ b/Example/Config/my.h.in @@ -20,9 +20,12 @@ extern "C" { #endif -void my_library (int version [3], char date [128]) ; -void my_function (void) ; +void my_version (int version [3], char date [128]) ; +int my_function (void) ; +int my_check_version (const char *package, int major, int minor, int patch, + const char *date, int version [3]) ; #ifdef __cplusplus } #endif + diff --git a/Example/Demo/my_demo.c b/Example/Demo/my_demo.c index 018ec6db2..90b433ec0 100644 --- a/Example/Demo/my_demo.c +++ b/Example/Demo/my_demo.c @@ -1,3 +1,12 @@ +//------------------------------------------------------------------------------ +// SuiteSparse/Example/Demo/my_demo.c +//------------------------------------------------------------------------------ + +// Copyright (c) 2022-2023, Timothy A. Davis, All Rights Reserved. +// SPDX-License-Identifier: BSD-3-clause + +//------------------------------------------------------------------------------ + // Example user program #include @@ -10,7 +19,7 @@ int main (void) printf ("My demo\n") ; int version [3] ; char date [128] ; - my_library (version, date) ; + my_version (version, date) ; printf ("Date from #include 'my.h': %s\n", MY_DATE) ; printf ("Date from compiled library: %s\n", date) ; printf ("version from #include 'my.h.': %d.%d.%d\n", @@ -18,7 +27,7 @@ int main (void) printf ("version from compiled library: %d.%d.%d\n", version [0], version [1], version [2]) ; - my_function ( ) ; - return (0) ; + int result = my_function ( ) ; + return (result) ; } diff --git a/Example/Include/my.h b/Example/Include/my.h index 3366eb880..393e2b0b5 100644 --- a/Example/Include/my.h +++ b/Example/Include/my.h @@ -20,9 +20,12 @@ extern "C" { #endif -void my_library (int version [3], char date [128]) ; -void my_function (void) ; +void my_version (int version [3], char date [128]) ; +int my_function (void) ; +int my_check_version (const char *package, int major, int minor, int patch, + const char *date, int version [3]) ; #ifdef __cplusplus } #endif + diff --git a/Example/Include/my_internal.h b/Example/Include/my_internal.h index 54acc778b..46af56c36 100644 --- a/Example/Include/my_internal.h +++ b/Example/Include/my_internal.h @@ -10,34 +10,108 @@ // Example include file for a user library. // SuiteSparse include files for C/C++: +#include "SuiteSparse_config.h" +#if !defined (SUITESPARSE_VERSION) || \ + (SUITESPARSE_VERSION < SUITESPARSE_VER_CODE(7,4)) +#error "This library requires SuiteSparse_config 7.4.0 or later" +#endif + #include "amd.h" +#if AMD_VERSION < SUITESPARSE_VER_CODE(3,3) +#error "This library requires AMD 3.3.0 or later" +#endif + #include "btf.h" +#if AMD_VERSION < SUITESPARSE_VER_CODE(3,3) +#error "This library requires BTF 3.3.0 or later" +#endif + #include "camd.h" +#if CAMD_VERSION < SUITESPARSE_VER_CODE(3,3) +#error "This library requires CAMD 3.3.0 or later" +#endif + #include "ccolamd.h" +#if CCOLAMD_VERSION < SUITESPARSE_VER_CODE(3,3) +#error "This library requires CCOLAMD 3.3.0 or later" +#endif + #include "cholmod.h" +#if CHOLMOD_VERSION < SUITESPARSE_VER_CODE(3,3) +#error "This library requires CHOLMOD 5.1.0 or later" +#endif + #include "colamd.h" +#if COLAMD_VERSION < SUITESPARSE_VER_CODE(3,3) +#error "This library requires COLAMD 3.3.0 or later" +#endif + #include "cs.h" +// #if ! defined (CXSPARSE) || (CS_VERSION < SUITESPARSE_VER_CODE(3,3)) +// #error "This library requires CXSparse 3.3.0 or later" +// #endif + #if ! defined (NO_GRAPHBLAS) -# include "GraphBLAS.h" + #include "GraphBLAS.h" + #if !defined ( GxB_SUITESPARSE_GRAPHBLAS ) || \ + GxB_IMPLEMENTATION < GxB_VERSION(8,3,0) + #error "This library requires SuiteSparse:GraphBLAS 8.3.0 or later" + #endif #endif + #if ! defined (NO_LAGRAPH) -# include "LAGraph.h" + #include "LAGraph.h" + #if GxB_VERSION (LAGRAPH_VERSION_MAJOR,LAGRAPH_VERSION_MINOR, \ + LAGRAPH_VERSION_UPDATE) < GxB_VERSION(1,1,0) + #error "This library requires LAGraph 1.1.0 or later" + #endif #endif + #include "klu.h" -#include "klu.h" +#if KLU_VERSION < SUITESPARSE_VER_CODE(2,3) +#error "This library requires KLU 2.3.0 or later" +#endif + #include "ldl.h" +#if LDL_VERSION < SUITESPARSE_VER_CODE(3,3) +#error "This library requires LDL 3.3.0 or later" +#endif + #include "RBio.h" +#if RBIO_VERSION < SUITESPARSE_VER_CODE(4,3) +#error "This library requires RBio 4.3.0 or later" +#endif + #include "SPEX.h" +#if GxB_VERSION (SPEX_VERSION_MAJOR,SPEX_VERSION_MINOR, \ + SPEX_VERSION_SUB) < GxB_VERSION(2,3,0) +#error "This library requires SPEX 2.3.0 or later" +#endif + #include "SuiteSparseQR_C.h" +#if SPQR_VERSION < SUITESPARSE_VER_CODE(4,3) +#error "This library requires SPQR 4.3.0 or later" +#endif + #include "umfpack.h" +#if UMFPACK_VER < SUITESPARSE_VER_CODE(4,3) +#error "This library requires UMFPACK 6.3.0 or later" +#endif -#ifdef __cplusplus // SuiteSparse include files for C++: -# include "SuiteSparseQR.hpp" -# include "Mongoose.hpp" +#ifdef __cplusplus + #include "SuiteSparseQR.hpp" + + #include "Mongoose.hpp" + #if GxB_VERSION (Mongoose_VERSION_MAJOR,Mongoose_VERSION_MINOR, \ + Mongoose_VERSION_PATCH) < GxB_VERSION(3,3,0) + #error "This library requires Mongoose 3.3.0 or later" + #endif + #endif // OpenMP include file: #include #include "my.h" + diff --git a/Example/Source/my.c b/Example/Source/my.c index 73a9a9595..6da684e0e 100644 --- a/Example/Source/my.c +++ b/Example/Source/my.c @@ -1,3 +1,12 @@ +//------------------------------------------------------------------------------ +// SuiteSparse/Example/Source/my.c +//------------------------------------------------------------------------------ + +// Copyright (c) 2022-2023, Timothy A. Davis, All Rights Reserved. +// SPDX-License-Identifier: BSD-3-clause + +//------------------------------------------------------------------------------ + // Example library that relies on SuiteSparse packages // ANSI C include files: @@ -7,14 +16,23 @@ #include "my_internal.h" -#define OK(result) \ - if (!(result)) \ - { \ - printf ("abort line %d\n", __LINE__) ; \ - abort ( ) ; \ +//------------------------------------------------------------------------------ +// OK: check a result and return an error if it fails +//------------------------------------------------------------------------------ + +#define OK(result) \ + if (!(result)) \ + { \ + printf ("FAILURE file: %s line %d\n", \ + __FILE__, __LINE__) ; \ + return (-1) ; \ } -void my_library (int version [3], char date [128]) +//------------------------------------------------------------------------------ +// my_version: version of MY library +//------------------------------------------------------------------------------ + +void my_version (int version [3], char date [128]) { // get the version of this library strncpy (date, MY_DATE, 127) ; @@ -23,27 +41,68 @@ void my_library (int version [3], char date [128]) version [2] = MY_PATCH_VERSION ; } -void my_function (void) +//------------------------------------------------------------------------------ +// my_check_version: check library version +//------------------------------------------------------------------------------ + +int my_check_version (const char *package, int major, int minor, int patch, + const char *date, int version [3]) { + // version and date in package header file: + printf ("\n------------------------------------------------------------" + "\n%s: v%d.%d.%d (%s)\n", package, major, minor, patch, date) ; + + // version in library itself: + printf ("%s: v%d.%d.%d (in library)\n", package, + version [0], version [1], version [2]) ; + + // make sure the versions match + int ok = (major == version [0]) && + (minor == version [1]) && + (patch == version [2]) ; + if (!ok) printf ("%s: version in header (%d.%d.%d) " + "does not match library (%d.%d.%d)\n", package, + major, minor, patch, version [0], version [1], version [2]) ; + return (ok) ; +} + +//------------------------------------------------------------------------------ +// my_function: try each library in SuiteSparse +//------------------------------------------------------------------------------ + +int my_function (void) // returns 0 on success, -1 on failure +{ + + int version [3] ; + + //-------------------------------------------------------------------------- + // My package + //-------------------------------------------------------------------------- + + char my_date [128] ; + my_version (version, my_date) ; + OK (my_check_version ("MY", MY_MAJOR_VERSION, MY_MINOR_VERSION, + MY_PATCH_VERSION, MY_DATE, version)) ; + printf ("MY date: %s\n", my_date) ; + OK (strcmp (my_date, MY_DATE) == 0) ; //-------------------------------------------------------------------------- // SuiteSparse_config //-------------------------------------------------------------------------- - printf ("SuiteSparse: v%d.%d.%d (%s)\n", - SUITESPARSE_MAIN_VERSION, SUITESPARSE_SUB_VERSION, - SUITESPARSE_SUBSUB_VERSION, SUITESPARSE_DATE) ; - int version [3] ; int v = SuiteSparse_version (version) ; - printf ("SuiteSparse: v%d.%d.%d (in library)\n", - version [0], version [1], version [2]) ; + OK (my_check_version ("SuiteSparse_config", + SUITESPARSE_MAIN_VERSION, SUITESPARSE_SUB_VERSION, + SUITESPARSE_SUBSUB_VERSION, SUITESPARSE_DATE, version)) ; //-------------------------------------------------------------------------- // CXSparse //-------------------------------------------------------------------------- - printf ("CXSparse: v%d.%d.%d (%s)\n", - CS_VER, CS_SUBVER, CS_SUBSUB, CS_DATE) ; + cxsparse_version (version) ; + OK (my_check_version ("CXSparse", CS_VER, CS_SUBVER, CS_SUBSUB, CS_DATE, + version)) ; + cs_dl *A = NULL ; // create a dense 2-by-2 matrix @@ -68,8 +127,11 @@ void my_function (void) // AMD //-------------------------------------------------------------------------- - printf ("AMD: v%d.%d.%d (%s)\n", - AMD_MAIN_VERSION, AMD_SUB_VERSION, AMD_SUBSUB_VERSION, AMD_DATE) ; + amd_version (version) ; + OK (my_check_version ("AMD", + AMD_MAIN_VERSION, AMD_SUB_VERSION, AMD_SUBSUB_VERSION, AMD_DATE, + version)) ; + int64_t P [N] ; OK (amd_l_order (n, Ap, Ai, P, NULL, NULL) == AMD_OK) ; for (int k = 0 ; k < n ; k++) printf ("P [%d] = %d\n", k, (int) P [k]) ; @@ -78,8 +140,11 @@ void my_function (void) // BTF //-------------------------------------------------------------------------- - printf ("BTF: v%d.%d.%d (%s)\n", - BTF_MAIN_VERSION, BTF_SUB_VERSION, BTF_SUBSUB_VERSION, BTF_DATE) ; + btf_version (version) ; + OK (my_check_version ("BTF", + BTF_MAIN_VERSION, BTF_SUB_VERSION, BTF_SUBSUB_VERSION, BTF_DATE, + version)) ; + double work ; int64_t nmatch ; int64_t Q [N], R [N+1], Work [5*N] ; @@ -94,8 +159,11 @@ void my_function (void) // CAMD //-------------------------------------------------------------------------- - printf ("CAMD: v%d.%d.%d (%s)\n", - CAMD_MAIN_VERSION, CAMD_SUB_VERSION, CAMD_SUBSUB_VERSION, CAMD_DATE) ; + camd_version (version) ; + OK (my_check_version ("CAMD", + CAMD_MAIN_VERSION, CAMD_SUB_VERSION, CAMD_SUBSUB_VERSION, CAMD_DATE, + version)) ; + int64_t Cmem [N] ; for (int k = 0 ; k < n ; k++) Cmem [k] = 0 ; OK (camd_l_order (n, Ap, Ai, P, NULL, NULL, Cmem) == CAMD_OK) ; @@ -105,9 +173,11 @@ void my_function (void) // CCOLAMD //-------------------------------------------------------------------------- - printf ("CCOLAMD: v%d.%d.%d (%s)\n", + ccolamd_version (version) ; + OK (my_check_version ("CCOLAMD", CCOLAMD_MAIN_VERSION, CCOLAMD_SUB_VERSION, CCOLAMD_SUBSUB_VERSION, - CCOLAMD_DATE) ; + CCOLAMD_DATE, version)) ; + int64_t Alen = ccolamd_l_recommended (NNZ, n, n) ; int64_t *Awork = malloc (Alen * sizeof (int64_t)) ; OK (Awork != NULL) ; @@ -120,9 +190,11 @@ void my_function (void) // COLAMD //-------------------------------------------------------------------------- - printf ("COLAMD: v%d.%d.%d (%s)\n", + colamd_version (version) ; + OK (my_check_version ("COLAMD", COLAMD_MAIN_VERSION, COLAMD_SUB_VERSION, COLAMD_SUBSUB_VERSION, - COLAMD_DATE) ; + COLAMD_DATE, version)) ; + Alen = ccolamd_l_recommended (NNZ, n, n) ; Awork = malloc (Alen * sizeof (int64_t)) ; OK (Awork != NULL) ; @@ -135,12 +207,11 @@ void my_function (void) // CHOLMOD //-------------------------------------------------------------------------- - printf ("CHOLMOD: v%d.%d.%d (%s)\n", - CHOLMOD_MAIN_VERSION, CHOLMOD_SUB_VERSION, CHOLMOD_SUBSUB_VERSION, - CHOLMOD_DATE) ; v = cholmod_l_version (version) ; - printf ("CHOLMOD: v%d.%d.%d (in library)\n", - version [0], version [1], version [2]) ; + OK (my_check_version ("CHOLMOD", + CHOLMOD_MAIN_VERSION, CHOLMOD_SUB_VERSION, CHOLMOD_SUBSUB_VERSION, + CHOLMOD_DATE, version)) ; + cholmod_common cc ; OK (cholmod_l_start (&cc)) ; @@ -150,12 +221,10 @@ void my_function (void) #if ! defined (NO_GRAPHBLAS) OK (GrB_init (GrB_NONBLOCKING) == GrB_SUCCESS) ; - printf ("GraphBLAS: v%d.%d.%d (%s)\n", - GxB_IMPLEMENTATION_MAJOR, GxB_IMPLEMENTATION_MINOR, - GxB_IMPLEMENTATION_SUB, GxB_IMPLEMENTATION_DATE) ; OK (GxB_Global_Option_get (GxB_LIBRARY_VERSION, version) == GrB_SUCCESS) ; - printf ("GraphBLAS: v%d.%d.%d (in library)\n", - version [0], version [1], version [2]) ; + OK (my_check_version ("GraphBLAS", + GxB_IMPLEMENTATION_MAJOR, GxB_IMPLEMENTATION_MINOR, + GxB_IMPLEMENTATION_SUB, GxB_IMPLEMENTATION_DATE, version)) ; OK (GrB_finalize ( ) == GrB_SUCCESS) ; #endif @@ -165,13 +234,11 @@ void my_function (void) #if ! defined (NO_LAGRAPH) char msg [LAGRAPH_MSG_LEN], verstring [LAGRAPH_MSG_LEN] ; - printf ("LAGraph: v%d.%d.%d (%s)\n", - LAGRAPH_VERSION_MAJOR, LAGRAPH_VERSION_MINOR, LAGRAPH_VERSION_UPDATE, - LAGRAPH_DATE) ; OK (LAGraph_Init (msg) == GrB_SUCCESS) ; OK (LAGraph_Version (version, verstring, msg) == GrB_SUCCESS) ; - printf ("LAGraph: v%d.%d.%d (%s) (in library)\n", - version [0], version [1], version [2], verstring) ; + OK (my_check_version ("LAGraph", + LAGRAPH_VERSION_MAJOR, LAGRAPH_VERSION_MINOR, LAGRAPH_VERSION_UPDATE, + LAGRAPH_DATE, version)) ; OK (LAGraph_Finalize (msg) == GrB_SUCCESS) ; #endif @@ -179,8 +246,11 @@ void my_function (void) // KLU //-------------------------------------------------------------------------- - printf ("KLU: v%d.%d.%d (%s)\n", - KLU_MAIN_VERSION, KLU_SUB_VERSION, KLU_SUBSUB_VERSION, KLU_DATE) ; + klu_version (version) ; + OK (my_check_version ("KLU", + KLU_MAIN_VERSION, KLU_SUB_VERSION, KLU_SUBSUB_VERSION, + KLU_DATE, version)) ; + double b [N] = {8., 45.} ; double xgood [N] = {36.4, -32.7} ; double x [N] ; @@ -210,8 +280,11 @@ void my_function (void) // LDL //-------------------------------------------------------------------------- - printf ("LDL: v%d.%d.%d (%s)\n", - LDL_MAIN_VERSION, LDL_SUB_VERSION, LDL_SUBSUB_VERSION, LDL_DATE) ; + ldl_version (version) ; + OK (my_check_version ("LDL", + LDL_MAIN_VERSION, LDL_SUB_VERSION, LDL_SUBSUB_VERSION, + LDL_DATE, version)) ; + double x2 [N] ; P [0] = 0 ; P [1] = 1 ; @@ -229,8 +302,11 @@ void my_function (void) // RBio //-------------------------------------------------------------------------- - printf ("RBio: v%d.%d.%d (%s)\n", - RBIO_MAIN_VERSION, RBIO_SUB_VERSION, RBIO_SUBSUB_VERSION, RBIO_DATE) ; + RBio_version (version) ; + OK (my_check_version ("RBio", + RBIO_MAIN_VERSION, RBIO_SUB_VERSION, RBIO_SUBSUB_VERSION, + RBIO_DATE, version)) ; + char mtype [4], key [8], title [80] ; strncpy (key, "simple", 8) ; strncpy (title, "2-by-2 matrix", 80) ; @@ -261,17 +337,22 @@ void my_function (void) // SPEX //-------------------------------------------------------------------------- - printf ("SPEX: v%d.%d.%d (%s)\n", - SPEX_VERSION_MAJOR, SPEX_VERSION_MINOR, SPEX_VERSION_SUB, SPEX_DATE) ; OK (SPEX_initialize ( ) == SPEX_OK) ; + SPEX_version (version) ; + OK (my_check_version ("SPEX", + SPEX_VERSION_MAJOR, SPEX_VERSION_MINOR, SPEX_VERSION_SUB, SPEX_DATE, + version)) ; OK (SPEX_finalize ( ) == SPEX_OK) ; //-------------------------------------------------------------------------- // SPQR //-------------------------------------------------------------------------- - printf ("SPQR: v%d.%d.%d (%s)\n", - SPQR_MAIN_VERSION, SPQR_SUB_VERSION, SPQR_SUBSUB_VERSION, SPQR_DATE) ; + SuiteSparseQR_C_version (version) ; + OK (my_check_version ("SuiteSparseQR", + SPQR_MAIN_VERSION, SPQR_SUB_VERSION, SPQR_SUBSUB_VERSION, SPQR_DATE, + version)) ; + cholmod_sparse *A2, A2_struct ; cholmod_dense *B2, B2_struct ; cholmod_dense *X2 ; @@ -314,9 +395,10 @@ void my_function (void) // UMFPACK //-------------------------------------------------------------------------- - printf ("UMFPACK: v%d.%d.%d (%s)\n", + umfpack_version (version) ; + OK (my_check_version ("UMFPACK", UMFPACK_MAIN_VERSION, UMFPACK_SUB_VERSION, UMFPACK_SUBSUB_VERSION, - UMFPACK_DATE) ; + UMFPACK_DATE, version)) ; printf ("%s\n", UMFPACK_VERSION) ; printf ("%s", UMFPACK_COPYRIGHT) ; @@ -334,7 +416,7 @@ void my_function (void) (void) umfpack_dl_symbolic (n, n, Ap, Ai, Ax, &Sym, Control, Info) ; (void) umfpack_dl_numeric (Ap, Ai, Ax, Sym, &Num, Control, Info) ; umfpack_dl_free_symbolic (&Sym) ; - result = umfpack_dl_solve (UMFPACK_A, Ap, Ai, Ax, x, b, Num, Control, Info) ; + result = umfpack_dl_solve (UMFPACK_A, Ap, Ai, Ax, x, b, Num, Control, Info); umfpack_dl_free_numeric (&Num) ; for (int i = 0 ; i < n ; i++) printf ("x [%d] = %g\n", i, x [i]) ; err = 0 ; @@ -348,11 +430,12 @@ void my_function (void) umfpack_dl_report_info (Control, Info) ; //-------------------------------------------------------------------------- - // free workspace + // free workspace and return result //-------------------------------------------------------------------------- cs_dl_spfree (A) ; A = NULL ; OK (cholmod_l_finish (&cc)) ; + return (0) ; } diff --git a/Example/Source/my_cxx.cc b/Example/Source/my_cxx.cc index f2935b6ec..9e9840599 100644 --- a/Example/Source/my_cxx.cc +++ b/Example/Source/my_cxx.cc @@ -1,11 +1,22 @@ -// Example library that relies on SuiteSparse packages +//------------------------------------------------------------------------------ +// SuiteSparse/Example/Source/my_cxx.cc +//------------------------------------------------------------------------------ + +// Copyright (c) 2022-2023, Timothy A. Davis, All Rights Reserved. +// SPDX-License-Identifier: BSD-3-clause + +//------------------------------------------------------------------------------ + +// Example C++ library that relies on SuiteSparse packages #include #include #include +// FIXME: use another filename #include "my_internal.h" +// FIXME: return -1 #define OK(result) \ if (!(result)) \ { \ @@ -13,7 +24,8 @@ abort ( ) ; \ } -void my_library (int version [3], char date [128]) +// FIXME: use the C code? or rename? +void my_version (int version [3], char date [128]) { // get the version of this library strncpy (date, MY_DATE, 127) ; @@ -22,7 +34,8 @@ void my_library (int version [3], char date [128]) version [2] = MY_PATCH_VERSION ; } -void my_function (void) +// FIXME: rename? +int my_function (void) { //-------------------------------------------------------------------------- @@ -135,7 +148,7 @@ void my_function (void) int64_t *Awork = (int64_t *) malloc (Alen * sizeof (int64_t)) ; OK (Awork != nullptr) ; memcpy (Awork, Ai, NNZ * sizeof (int64_t)) ; - OK (ccolamd_l (n, n, Alen, Awork, P, nullptr, nullptr, Cmem) == CCOLAMD_OK) ; + OK (ccolamd_l (n, n, Alen, Awork, P, nullptr, nullptr, Cmem) == CCOLAMD_OK); for (int k = 0 ; k < n ; k++) std::cout << "P [" << k << "] = " << P [k] << std::endl; free (Awork) ; @@ -394,7 +407,7 @@ void my_function (void) (void) umfpack_dl_symbolic (n, n, Ap, Ai, Ax, &Sym, Control, Info) ; (void) umfpack_dl_numeric (Ap, Ai, Ax, Sym, &Num, Control, Info) ; umfpack_dl_free_symbolic (&Sym) ; - result = umfpack_dl_solve (UMFPACK_A, Ap, Ai, Ax, x, b, Num, Control, Info) ; + result = umfpack_dl_solve (UMFPACK_A, Ap, Ai, Ax, x, b, Num, Control, Info); umfpack_dl_free_numeric (&Num) ; for (int i = 0 ; i < n ; i++) std::cout << "x [" << i << "] = " << x [i] << std::endl; @@ -415,4 +428,6 @@ void my_function (void) cs_dl_spfree (A) ; A = nullptr ; OK (cholmod_l_finish (&cc)) ; + return (0) ; } + diff --git a/KLU/Config/klu.h.in b/KLU/Config/klu.h.in index 284d72dc6..fc7e88711 100644 --- a/KLU/Config/klu.h.in +++ b/KLU/Config/klu.h.in @@ -795,6 +795,12 @@ void *klu_l_free (void *, size_t, size_t, klu_l_common *) ; void *klu_l_realloc (size_t, size_t, size_t, void *, klu_l_common *) ; +//------------------------------------------------------------------------------ +// klu_version: return KLU version +//------------------------------------------------------------------------------ + +void klu_version (int version [3]) ; + #ifdef __cplusplus } #endif diff --git a/KLU/Demo/kludemo.c b/KLU/Demo/kludemo.c index 348b0d474..e51f477e4 100644 --- a/KLU/Demo/kludemo.c +++ b/KLU/Demo/kludemo.c @@ -319,6 +319,26 @@ static void klu_demo (int n, int *Ap, int *Ai, double *Ax, int isreal, int main (void) { + + //-------------------------------------------------------------------------- + // klu version + //-------------------------------------------------------------------------- + + int version [3] ; + klu_version (version) ; + printf ("KLU v%d.%d.%d\n", version [0], version [1], version [2]) ; + if ((version [0] != KLU_MAIN_VERSION) || + (version [1] != KLU_SUB_VERSION) || + (version [2] != KLU_SUBSUB_VERSION)) + { + fprintf (stderr, "version in header does not match library\n") ; + abort ( ) ; + } + + //-------------------------------------------------------------------------- + // read in a matrix and solve Ax=b + //-------------------------------------------------------------------------- + cholmod_sparse *A ; cholmod_common ch ; cholmod_start (&ch) ; diff --git a/KLU/Demo/kluldemo.c b/KLU/Demo/kluldemo.c index 2b799cadf..91833fe29 100644 --- a/KLU/Demo/kluldemo.c +++ b/KLU/Demo/kluldemo.c @@ -320,6 +320,26 @@ static void klu_l_demo (int64_t n, int64_t *Ap, int64_t *Ai, double *Ax, int main (void) { + + //-------------------------------------------------------------------------- + // klu version + //-------------------------------------------------------------------------- + + int version [3] ; + klu_version (version) ; + printf ("KLU v%d.%d.%d\n", version [0], version [1], version [2]) ; + if ((version [0] != KLU_MAIN_VERSION) || + (version [1] != KLU_SUB_VERSION) || + (version [2] != KLU_SUBSUB_VERSION)) + { + fprintf (stderr, "version in header does not match library\n") ; + abort ( ) ; + } + + //-------------------------------------------------------------------------- + // read in a matrix and solve Ax=b + //-------------------------------------------------------------------------- + cholmod_sparse *A ; cholmod_common ch ; cholmod_l_start (&ch) ; diff --git a/KLU/Doc/ChangeLog b/KLU/Doc/ChangeLog index cb7d2ef3c..d2d242795 100644 --- a/KLU/Doc/ChangeLog +++ b/KLU/Doc/ChangeLog @@ -1,6 +1,7 @@ Dec 30, 2023: version 2.3.0 * major change to build system: by Markus Mützel + * klu_version: added to return version of KLU Oct 23, 2023: version 2.2.2 diff --git a/KLU/Include/klu.h b/KLU/Include/klu.h index 4fb413b27..902613839 100644 --- a/KLU/Include/klu.h +++ b/KLU/Include/klu.h @@ -795,6 +795,12 @@ void *klu_l_free (void *, size_t, size_t, klu_l_common *) ; void *klu_l_realloc (size_t, size_t, size_t, void *, klu_l_common *) ; +//------------------------------------------------------------------------------ +// klu_version: return KLU version +//------------------------------------------------------------------------------ + +void klu_version (int version [3]) ; + #ifdef __cplusplus } #endif diff --git a/KLU/Source/klu_version.c b/KLU/Source/klu_version.c new file mode 100644 index 000000000..e96215f58 --- /dev/null +++ b/KLU/Source/klu_version.c @@ -0,0 +1,19 @@ +//------------------------------------------------------------------------------ +// KLU/Source/klu_version: return KLU version +//------------------------------------------------------------------------------ + +// KLU, Copyright (c) 2004-2023, University of Florida. All Rights Reserved. +// Authors: Timothy A. Davis and Ekanathan Palamadai. +// SPDX-License-Identifier: LGPL-2.1+ + +//------------------------------------------------------------------------------ + +#include "klu_internal.h" + +void klu_version (int version [3]) +{ + version [0] = KLU_MAIN_VERSION ; + version [1] = KLU_SUB_VERSION ; + version [2] = KLU_SUBSUB_VERSION ; +} + diff --git a/LDL/Config/ldl.h.in b/LDL/Config/ldl.h.in index 7fce97a02..574e4cd02 100644 --- a/LDL/Config/ldl.h.in +++ b/LDL/Config/ldl.h.in @@ -47,6 +47,8 @@ extern "C" { #endif +void ldl_version (int version [3]) ; + /* ========================================================================== */ /* === int32_t version ====================================================== */ /* ========================================================================== */ diff --git a/LDL/Demo/ldlamd.out b/LDL/Demo/ldlamd.out index f9b1fe4bf..57defd464 100644 --- a/LDL/Demo/ldlamd.out +++ b/LDL/Demo/ldlamd.out @@ -1,3 +1,4 @@ +LDL version 3.3.0, date: Dec 30, 2023 -------------------------------------------------------- @@ -107,10 +108,10 @@ AMD version 3.3.0, Dec 30, 2023, results: Factorize PAP'=LDL' and solve Ax=b Nz in L: 0 Flop count: 0 -relative maxnorm of residual: 0 +relative maxnorm of residual: 1.97627e-17 Factorize A=LDL' and solve Ax=b Nz in L: 0 Flop count: 0 -relative maxnorm of residual: 0 +relative maxnorm of residual: 1.97627e-17 -------------------------------------------------------- @@ -158,10 +159,10 @@ AMD version 3.3.0, Dec 30, 2023, results: Factorize PAP'=LDL' and solve Ax=b Nz in L: 0 Flop count: 0 -relative maxnorm of residual: 8.32667e-17 +relative maxnorm of residual: 5.51017e-17 Factorize A=LDL' and solve Ax=b Nz in L: 0 Flop count: 0 -relative maxnorm of residual: 8.32667e-17 +relative maxnorm of residual: 5.51017e-17 -------------------------------------------------------- @@ -209,10 +210,10 @@ AMD version 3.3.0, Dec 30, 2023, results: Factorize PAP'=LDL' and solve Ax=b Nz in L: 1 Flop count: 3 -relative maxnorm of residual: 5.55112e-17 +relative maxnorm of residual: 2.53452e-17 Factorize A=LDL' and solve Ax=b Nz in L: 1 Flop count: 3 -relative maxnorm of residual: 5.55112e-17 +relative maxnorm of residual: 2.53452e-17 -------------------------------------------------------- @@ -260,10 +261,10 @@ AMD version 3.3.0, Dec 30, 2023, results: Factorize PAP'=LDL' and solve Ax=b Nz in L: 1 Flop count: 3 -relative maxnorm of residual: 1.11022e-16 +relative maxnorm of residual: 1.08019e-16 Factorize A=LDL' and solve Ax=b Nz in L: 1 Flop count: 3 -relative maxnorm of residual: 1.11022e-16 +relative maxnorm of residual: 1.08019e-16 -------------------------------------------------------- @@ -311,10 +312,10 @@ AMD version 3.3.0, Dec 30, 2023, results: Factorize PAP'=LDL' and solve Ax=b Nz in L: 3 Flop count: 11 -relative maxnorm of residual: 1.11022e-16 +relative maxnorm of residual: 1.5077e-16 Factorize A=LDL' and solve Ax=b Nz in L: 3 Flop count: 11 -relative maxnorm of residual: 1.11022e-16 +relative maxnorm of residual: 1.5077e-16 -------------------------------------------------------- @@ -362,10 +363,10 @@ AMD version 3.3.0, Dec 30, 2023, results: Factorize PAP'=LDL' and solve Ax=b Nz in L: 3 Flop count: 11 -relative maxnorm of residual: 1.38778e-16 +relative maxnorm of residual: 1.27147e-16 Factorize A=LDL' and solve Ax=b Nz in L: 3 Flop count: 11 -relative maxnorm of residual: 1.38778e-16 +relative maxnorm of residual: 1.27147e-16 -------------------------------------------------------- @@ -515,10 +516,10 @@ AMD version 3.3.0, Dec 30, 2023, results: Factorize PAP'=LDL' and solve Ax=b Nz in L: 126 Flop count: 954 -relative maxnorm of residual: 2.59625e-10 +relative maxnorm of residual: 1.95957e-10 Factorize A=LDL' and solve Ax=b Nz in L: 276 Flop count: 4206 -relative maxnorm of residual: 2.72848e-10 +relative maxnorm of residual: 2.29324e-10 -------------------------------------------------------- @@ -566,10 +567,10 @@ AMD version 3.3.0, Dec 30, 2023, results: Factorize PAP'=LDL' and solve Ax=b Nz in L: 126 Flop count: 954 -relative maxnorm of residual: 3.27418e-10 +relative maxnorm of residual: 2.56588e-10 Factorize A=LDL' and solve Ax=b Nz in L: 276 Flop count: 4206 -relative maxnorm of residual: 2.32376e-10 +relative maxnorm of residual: 2.49687e-10 -------------------------------------------------------- @@ -617,10 +618,10 @@ AMD version 3.3.0, Dec 30, 2023, results: Factorize PAP'=LDL' and solve Ax=b Nz in L: 441 Flop count: 5961 -relative maxnorm of residual: 2.38712e-13 +relative maxnorm of residual: 1.85693e-13 Factorize A=LDL' and solve Ax=b Nz in L: 829 Flop count: 20103 -relative maxnorm of residual: 2.27374e-13 +relative maxnorm of residual: 3.17781e-13 -------------------------------------------------------- @@ -668,10 +669,10 @@ AMD version 3.3.0, Dec 30, 2023, results: Factorize PAP'=LDL' and solve Ax=b Nz in L: 441 Flop count: 5961 -relative maxnorm of residual: 2.27374e-13 +relative maxnorm of residual: 2.75176e-13 Factorize A=LDL' and solve Ax=b Nz in L: 829 Flop count: 20103 -relative maxnorm of residual: 3.83693e-13 +relative maxnorm of residual: 3.12705e-13 -------------------------------------------------------- @@ -821,10 +822,10 @@ AMD version 3.3.0, Dec 30, 2023, results: Factorize PAP'=LDL' and solve Ax=b Nz in L: 288 Flop count: 2630 -relative maxnorm of residual: 5.96745e-16 +relative maxnorm of residual: 5.6363e-16 Factorize A=LDL' and solve Ax=b Nz in L: 511 Flop count: 7383 -relative maxnorm of residual: 6.93889e-16 +relative maxnorm of residual: 7.07792e-16 -------------------------------------------------------- @@ -872,10 +873,10 @@ AMD version 3.3.0, Dec 30, 2023, results: Factorize PAP'=LDL' and solve Ax=b Nz in L: 288 Flop count: 2630 -relative maxnorm of residual: 5.55112e-16 +relative maxnorm of residual: 5.57005e-16 Factorize A=LDL' and solve Ax=b Nz in L: 511 Flop count: 7383 -relative maxnorm of residual: 5.55112e-16 +relative maxnorm of residual: 8.6996e-16 -------------------------------------------------------- @@ -923,10 +924,10 @@ AMD version 3.3.0, Dec 30, 2023, results: Factorize PAP'=LDL' and solve Ax=b Nz in L: 226 Flop count: 1472 -relative maxnorm of residual: 5.55112e-16 +relative maxnorm of residual: 5.39685e-16 Factorize A=LDL' and solve Ax=b Nz in L: 662 Flop count: 11350 -relative maxnorm of residual: 1.11022e-15 +relative maxnorm of residual: 8.70386e-16 -------------------------------------------------------- @@ -974,10 +975,10 @@ AMD version 3.3.0, Dec 30, 2023, results: Factorize PAP'=LDL' and solve Ax=b Nz in L: 226 Flop count: 1472 -relative maxnorm of residual: 5.68434e-14 +relative maxnorm of residual: 3.00082e-14 Factorize A=LDL' and solve Ax=b Nz in L: 662 Flop count: 11350 -relative maxnorm of residual: 2.15827e-12 +relative maxnorm of residual: 1.64732e-12 -------------------------------------------------------- @@ -1025,10 +1026,10 @@ AMD version 3.3.0, Dec 30, 2023, results: Factorize PAP'=LDL' and solve Ax=b Nz in L: 2145 Flop count: 97955 -relative maxnorm of residual: 7.50219e-13 +relative maxnorm of residual: 6.01798e-13 Factorize A=LDL' and solve Ax=b Nz in L: 2145 Flop count: 97955 -relative maxnorm of residual: 7.50219e-13 +relative maxnorm of residual: 6.01798e-13 -------------------------------------------------------- @@ -1076,10 +1077,10 @@ AMD version 3.3.0, Dec 30, 2023, results: Factorize PAP'=LDL' and solve Ax=b Nz in L: 2145 Flop count: 97955 -relative maxnorm of residual: 8.59759e-13 +relative maxnorm of residual: 5.76924e-13 Factorize A=LDL' and solve Ax=b Nz in L: 2145 Flop count: 97955 -relative maxnorm of residual: 8.59759e-13 +relative maxnorm of residual: 5.76924e-13 -------------------------------------------------------- @@ -1127,10 +1128,10 @@ AMD version 3.3.0, Dec 30, 2023, results: Factorize PAP'=LDL' and solve Ax=b Nz in L: 0 Flop count: 0 -relative maxnorm of residual: 2.22045e-16 +relative maxnorm of residual: 1.3857e-16 Factorize A=LDL' and solve Ax=b Nz in L: 0 Flop count: 0 -relative maxnorm of residual: 2.22045e-16 +relative maxnorm of residual: 1.3857e-16 -------------------------------------------------------- @@ -1178,10 +1179,10 @@ AMD version 3.3.0, Dec 30, 2023, results: Factorize PAP'=LDL' and solve Ax=b Nz in L: 0 Flop count: 0 -relative maxnorm of residual: 2.22045e-16 +relative maxnorm of residual: 1.3857e-16 Factorize A=LDL' and solve Ax=b Nz in L: 0 Flop count: 0 -relative maxnorm of residual: 2.22045e-16 +relative maxnorm of residual: 1.3857e-16 -------------------------------------------------------- @@ -1231,6 +1232,6 @@ name: Dense/3 n: 3 entries: 9 (invalid Ai) ldlamd: invalid matrix and/or permutation -Largest residual during all tests: 3.27418e-10 +Largest residual during all tests: 2.56588e-10 ldlamd: all tests passed diff --git a/LDL/Demo/ldllamd.out b/LDL/Demo/ldllamd.out index d29221108..704115a34 100644 --- a/LDL/Demo/ldllamd.out +++ b/LDL/Demo/ldllamd.out @@ -1,3 +1,4 @@ +LDL version 3.3.0, date: Dec 30, 2023 -------------------------------------------------------- @@ -107,10 +108,10 @@ AMD version 3.3.0, Dec 30, 2023, results: Factorize PAP'=LDL' and solve Ax=b Nz in L: 0 Flop count: 0 -relative maxnorm of residual: 0 +relative maxnorm of residual: 1.97627e-17 Factorize A=LDL' and solve Ax=b Nz in L: 0 Flop count: 0 -relative maxnorm of residual: 0 +relative maxnorm of residual: 1.97627e-17 -------------------------------------------------------- @@ -158,10 +159,10 @@ AMD version 3.3.0, Dec 30, 2023, results: Factorize PAP'=LDL' and solve Ax=b Nz in L: 0 Flop count: 0 -relative maxnorm of residual: 8.32667e-17 +relative maxnorm of residual: 5.51017e-17 Factorize A=LDL' and solve Ax=b Nz in L: 0 Flop count: 0 -relative maxnorm of residual: 8.32667e-17 +relative maxnorm of residual: 5.51017e-17 -------------------------------------------------------- @@ -209,10 +210,10 @@ AMD version 3.3.0, Dec 30, 2023, results: Factorize PAP'=LDL' and solve Ax=b Nz in L: 1 Flop count: 3 -relative maxnorm of residual: 5.55112e-17 +relative maxnorm of residual: 2.53452e-17 Factorize A=LDL' and solve Ax=b Nz in L: 1 Flop count: 3 -relative maxnorm of residual: 5.55112e-17 +relative maxnorm of residual: 2.53452e-17 -------------------------------------------------------- @@ -260,10 +261,10 @@ AMD version 3.3.0, Dec 30, 2023, results: Factorize PAP'=LDL' and solve Ax=b Nz in L: 1 Flop count: 3 -relative maxnorm of residual: 1.11022e-16 +relative maxnorm of residual: 1.08019e-16 Factorize A=LDL' and solve Ax=b Nz in L: 1 Flop count: 3 -relative maxnorm of residual: 1.11022e-16 +relative maxnorm of residual: 1.08019e-16 -------------------------------------------------------- @@ -311,10 +312,10 @@ AMD version 3.3.0, Dec 30, 2023, results: Factorize PAP'=LDL' and solve Ax=b Nz in L: 3 Flop count: 11 -relative maxnorm of residual: 1.11022e-16 +relative maxnorm of residual: 1.5077e-16 Factorize A=LDL' and solve Ax=b Nz in L: 3 Flop count: 11 -relative maxnorm of residual: 1.11022e-16 +relative maxnorm of residual: 1.5077e-16 -------------------------------------------------------- @@ -362,10 +363,10 @@ AMD version 3.3.0, Dec 30, 2023, results: Factorize PAP'=LDL' and solve Ax=b Nz in L: 3 Flop count: 11 -relative maxnorm of residual: 1.38778e-16 +relative maxnorm of residual: 1.27147e-16 Factorize A=LDL' and solve Ax=b Nz in L: 3 Flop count: 11 -relative maxnorm of residual: 1.38778e-16 +relative maxnorm of residual: 1.27147e-16 -------------------------------------------------------- @@ -515,10 +516,10 @@ AMD version 3.3.0, Dec 30, 2023, results: Factorize PAP'=LDL' and solve Ax=b Nz in L: 126 Flop count: 954 -relative maxnorm of residual: 2.59625e-10 +relative maxnorm of residual: 1.95957e-10 Factorize A=LDL' and solve Ax=b Nz in L: 276 Flop count: 4206 -relative maxnorm of residual: 2.72848e-10 +relative maxnorm of residual: 2.29324e-10 -------------------------------------------------------- @@ -566,10 +567,10 @@ AMD version 3.3.0, Dec 30, 2023, results: Factorize PAP'=LDL' and solve Ax=b Nz in L: 126 Flop count: 954 -relative maxnorm of residual: 3.27418e-10 +relative maxnorm of residual: 2.56588e-10 Factorize A=LDL' and solve Ax=b Nz in L: 276 Flop count: 4206 -relative maxnorm of residual: 2.32376e-10 +relative maxnorm of residual: 2.49687e-10 -------------------------------------------------------- @@ -617,10 +618,10 @@ AMD version 3.3.0, Dec 30, 2023, results: Factorize PAP'=LDL' and solve Ax=b Nz in L: 441 Flop count: 5961 -relative maxnorm of residual: 2.38712e-13 +relative maxnorm of residual: 1.85693e-13 Factorize A=LDL' and solve Ax=b Nz in L: 829 Flop count: 20103 -relative maxnorm of residual: 2.27374e-13 +relative maxnorm of residual: 3.17781e-13 -------------------------------------------------------- @@ -668,10 +669,10 @@ AMD version 3.3.0, Dec 30, 2023, results: Factorize PAP'=LDL' and solve Ax=b Nz in L: 441 Flop count: 5961 -relative maxnorm of residual: 2.27374e-13 +relative maxnorm of residual: 2.75176e-13 Factorize A=LDL' and solve Ax=b Nz in L: 829 Flop count: 20103 -relative maxnorm of residual: 3.83693e-13 +relative maxnorm of residual: 3.12705e-13 -------------------------------------------------------- @@ -821,10 +822,10 @@ AMD version 3.3.0, Dec 30, 2023, results: Factorize PAP'=LDL' and solve Ax=b Nz in L: 288 Flop count: 2630 -relative maxnorm of residual: 5.96745e-16 +relative maxnorm of residual: 5.6363e-16 Factorize A=LDL' and solve Ax=b Nz in L: 511 Flop count: 7383 -relative maxnorm of residual: 6.93889e-16 +relative maxnorm of residual: 7.07792e-16 -------------------------------------------------------- @@ -872,10 +873,10 @@ AMD version 3.3.0, Dec 30, 2023, results: Factorize PAP'=LDL' and solve Ax=b Nz in L: 288 Flop count: 2630 -relative maxnorm of residual: 5.55112e-16 +relative maxnorm of residual: 5.57005e-16 Factorize A=LDL' and solve Ax=b Nz in L: 511 Flop count: 7383 -relative maxnorm of residual: 5.55112e-16 +relative maxnorm of residual: 8.6996e-16 -------------------------------------------------------- @@ -923,10 +924,10 @@ AMD version 3.3.0, Dec 30, 2023, results: Factorize PAP'=LDL' and solve Ax=b Nz in L: 226 Flop count: 1472 -relative maxnorm of residual: 5.55112e-16 +relative maxnorm of residual: 5.39685e-16 Factorize A=LDL' and solve Ax=b Nz in L: 662 Flop count: 11350 -relative maxnorm of residual: 1.11022e-15 +relative maxnorm of residual: 8.70386e-16 -------------------------------------------------------- @@ -974,10 +975,10 @@ AMD version 3.3.0, Dec 30, 2023, results: Factorize PAP'=LDL' and solve Ax=b Nz in L: 226 Flop count: 1472 -relative maxnorm of residual: 5.68434e-14 +relative maxnorm of residual: 3.00082e-14 Factorize A=LDL' and solve Ax=b Nz in L: 662 Flop count: 11350 -relative maxnorm of residual: 2.15827e-12 +relative maxnorm of residual: 1.64732e-12 -------------------------------------------------------- @@ -1025,10 +1026,10 @@ AMD version 3.3.0, Dec 30, 2023, results: Factorize PAP'=LDL' and solve Ax=b Nz in L: 2145 Flop count: 97955 -relative maxnorm of residual: 7.50219e-13 +relative maxnorm of residual: 6.01798e-13 Factorize A=LDL' and solve Ax=b Nz in L: 2145 Flop count: 97955 -relative maxnorm of residual: 7.50219e-13 +relative maxnorm of residual: 6.01798e-13 -------------------------------------------------------- @@ -1076,10 +1077,10 @@ AMD version 3.3.0, Dec 30, 2023, results: Factorize PAP'=LDL' and solve Ax=b Nz in L: 2145 Flop count: 97955 -relative maxnorm of residual: 8.59759e-13 +relative maxnorm of residual: 5.76924e-13 Factorize A=LDL' and solve Ax=b Nz in L: 2145 Flop count: 97955 -relative maxnorm of residual: 8.59759e-13 +relative maxnorm of residual: 5.76924e-13 -------------------------------------------------------- @@ -1127,10 +1128,10 @@ AMD version 3.3.0, Dec 30, 2023, results: Factorize PAP'=LDL' and solve Ax=b Nz in L: 0 Flop count: 0 -relative maxnorm of residual: 2.22045e-16 +relative maxnorm of residual: 1.3857e-16 Factorize A=LDL' and solve Ax=b Nz in L: 0 Flop count: 0 -relative maxnorm of residual: 2.22045e-16 +relative maxnorm of residual: 1.3857e-16 -------------------------------------------------------- @@ -1178,10 +1179,10 @@ AMD version 3.3.0, Dec 30, 2023, results: Factorize PAP'=LDL' and solve Ax=b Nz in L: 0 Flop count: 0 -relative maxnorm of residual: 2.22045e-16 +relative maxnorm of residual: 1.3857e-16 Factorize A=LDL' and solve Ax=b Nz in L: 0 Flop count: 0 -relative maxnorm of residual: 2.22045e-16 +relative maxnorm of residual: 1.3857e-16 -------------------------------------------------------- @@ -1231,6 +1232,6 @@ name: Dense/3 n: 3 entries: 9 (invalid Ai) ldlamd: invalid matrix and/or permutation -Largest residual during all tests: 3.27418e-10 +Largest residual during all tests: 2.56588e-10 ldlamd: all tests passed diff --git a/LDL/Demo/ldllmain.out b/LDL/Demo/ldllmain.out index 7080fca09..5e8f82491 100644 --- a/LDL/Demo/ldllmain.out +++ b/LDL/Demo/ldllmain.out @@ -1,3 +1,4 @@ +LDL version 3.3.0, date: Dec 30, 2023 -------------------------------------------------------- @@ -33,10 +34,10 @@ name: Dense/1 n: 1 entries: 1 Factorize PAP'=LDL' and solve Ax=b Nz in L: 0 Flop count: 0 -relative maxnorm of residual: 0 +relative maxnorm of residual: 1.97627e-17 Factorize A=LDL' and solve Ax=b Nz in L: 0 Flop count: 0 -relative maxnorm of residual: 0 +relative maxnorm of residual: 1.97627e-17 -------------------------------------------------------- @@ -46,10 +47,10 @@ name: Dense/1 n: 1 entries: 2 (jumbled version) Factorize PAP'=LDL' and solve Ax=b Nz in L: 0 Flop count: 0 -relative maxnorm of residual: 8.32667e-17 +relative maxnorm of residual: 5.51017e-17 Factorize A=LDL' and solve Ax=b Nz in L: 0 Flop count: 0 -relative maxnorm of residual: 8.32667e-17 +relative maxnorm of residual: 5.51017e-17 -------------------------------------------------------- @@ -59,10 +60,10 @@ name: Dense/2 n: 2 entries: 4 Factorize PAP'=LDL' and solve Ax=b Nz in L: 1 Flop count: 3 -relative maxnorm of residual: 5.55112e-17 +relative maxnorm of residual: 2.53452e-17 Factorize A=LDL' and solve Ax=b Nz in L: 1 Flop count: 3 -relative maxnorm of residual: 5.55112e-17 +relative maxnorm of residual: 2.53452e-17 -------------------------------------------------------- @@ -72,10 +73,10 @@ name: Dense/2 n: 2 entries: 5 (jumbled version) Factorize PAP'=LDL' and solve Ax=b Nz in L: 1 Flop count: 3 -relative maxnorm of residual: 1.11022e-16 +relative maxnorm of residual: 1.08019e-16 Factorize A=LDL' and solve Ax=b Nz in L: 1 Flop count: 3 -relative maxnorm of residual: 1.11022e-16 +relative maxnorm of residual: 1.08019e-16 -------------------------------------------------------- @@ -85,10 +86,10 @@ name: Dense/3 n: 3 entries: 9 Factorize PAP'=LDL' and solve Ax=b Nz in L: 3 Flop count: 11 -relative maxnorm of residual: 1.11022e-16 +relative maxnorm of residual: 1.5077e-16 Factorize A=LDL' and solve Ax=b Nz in L: 3 Flop count: 11 -relative maxnorm of residual: 1.11022e-16 +relative maxnorm of residual: 1.5077e-16 -------------------------------------------------------- @@ -98,10 +99,10 @@ name: Dense/3 n: 3 entries: 11 (jumbled version) Factorize PAP'=LDL' and solve Ax=b Nz in L: 3 Flop count: 11 -relative maxnorm of residual: 1.38778e-16 +relative maxnorm of residual: 1.27147e-16 Factorize A=LDL' and solve Ax=b Nz in L: 3 Flop count: 11 -relative maxnorm of residual: 1.38778e-16 +relative maxnorm of residual: 1.27147e-16 -------------------------------------------------------- @@ -137,10 +138,10 @@ name: FIDAP/ex5 n: 27 entries: 279 Factorize PAP'=LDL' and solve Ax=b Nz in L: 126 Flop count: 954 -relative maxnorm of residual: 2.59625e-10 +relative maxnorm of residual: 1.95957e-10 Factorize A=LDL' and solve Ax=b Nz in L: 276 Flop count: 4206 -relative maxnorm of residual: 2.72848e-10 +relative maxnorm of residual: 2.29324e-10 -------------------------------------------------------- @@ -150,10 +151,10 @@ name: FIDAP/ex5 n: 27 entries: 325 (jumbled version) Factorize PAP'=LDL' and solve Ax=b Nz in L: 126 Flop count: 954 -relative maxnorm of residual: 3.27418e-10 +relative maxnorm of residual: 2.56588e-10 Factorize A=LDL' and solve Ax=b Nz in L: 276 Flop count: 4206 -relative maxnorm of residual: 2.32376e-10 +relative maxnorm of residual: 2.49687e-10 -------------------------------------------------------- @@ -163,10 +164,10 @@ name: HB/bcsstk01 n: 48 entries: 400 Factorize PAP'=LDL' and solve Ax=b Nz in L: 441 Flop count: 5961 -relative maxnorm of residual: 2.38712e-13 +relative maxnorm of residual: 1.85693e-13 Factorize A=LDL' and solve Ax=b Nz in L: 829 Flop count: 20103 -relative maxnorm of residual: 2.27374e-13 +relative maxnorm of residual: 3.17781e-13 -------------------------------------------------------- @@ -176,10 +177,10 @@ name: HB/bcsstk01 n: 48 entries: 472 (jumbled version) Factorize PAP'=LDL' and solve Ax=b Nz in L: 441 Flop count: 5961 -relative maxnorm of residual: 2.27374e-13 +relative maxnorm of residual: 2.75176e-13 Factorize A=LDL' and solve Ax=b Nz in L: 829 Flop count: 20103 -relative maxnorm of residual: 3.83693e-13 +relative maxnorm of residual: 3.12705e-13 -------------------------------------------------------- @@ -215,10 +216,10 @@ name: Pothen/mesh1e1 n: 48 entries: 306 Factorize PAP'=LDL' and solve Ax=b Nz in L: 288 Flop count: 2630 -relative maxnorm of residual: 5.96745e-16 +relative maxnorm of residual: 5.6363e-16 Factorize A=LDL' and solve Ax=b Nz in L: 511 Flop count: 7383 -relative maxnorm of residual: 6.93889e-16 +relative maxnorm of residual: 7.07792e-16 -------------------------------------------------------- @@ -228,10 +229,10 @@ name: Pothen/mesh1e1 n: 48 entries: 359 (jumbled version) Factorize PAP'=LDL' and solve Ax=b Nz in L: 288 Flop count: 2630 -relative maxnorm of residual: 5.55112e-16 +relative maxnorm of residual: 5.57005e-16 Factorize A=LDL' and solve Ax=b Nz in L: 511 Flop count: 7383 -relative maxnorm of residual: 5.55112e-16 +relative maxnorm of residual: 8.6996e-16 -------------------------------------------------------- @@ -241,10 +242,10 @@ name: Bai/bfwb62 n: 62 entries: 342 Factorize PAP'=LDL' and solve Ax=b Nz in L: 226 Flop count: 1472 -relative maxnorm of residual: 5.55112e-16 +relative maxnorm of residual: 5.39685e-16 Factorize A=LDL' and solve Ax=b Nz in L: 662 Flop count: 11350 -relative maxnorm of residual: 1.11022e-15 +relative maxnorm of residual: 8.70386e-16 -------------------------------------------------------- @@ -254,10 +255,10 @@ name: Bai/bfwb62 n: 62 entries: 407 (jumbled version) Factorize PAP'=LDL' and solve Ax=b Nz in L: 226 Flop count: 1472 -relative maxnorm of residual: 5.68434e-14 +relative maxnorm of residual: 3.00082e-14 Factorize A=LDL' and solve Ax=b Nz in L: 662 Flop count: 11350 -relative maxnorm of residual: 2.15827e-12 +relative maxnorm of residual: 1.64732e-12 -------------------------------------------------------- @@ -267,10 +268,10 @@ name: HB/bcsstk02 n: 66 entries: 4356 Factorize PAP'=LDL' and solve Ax=b Nz in L: 2145 Flop count: 97955 -relative maxnorm of residual: 7.50219e-13 +relative maxnorm of residual: 6.01798e-13 Factorize A=LDL' and solve Ax=b Nz in L: 2145 Flop count: 97955 -relative maxnorm of residual: 7.50219e-13 +relative maxnorm of residual: 6.01798e-13 -------------------------------------------------------- @@ -280,10 +281,10 @@ name: HB/bcsstk02 n: 66 entries: 5175 (jumbled version) Factorize PAP'=LDL' and solve Ax=b Nz in L: 2145 Flop count: 97955 -relative maxnorm of residual: 8.59759e-13 +relative maxnorm of residual: 5.76924e-13 Factorize A=LDL' and solve Ax=b Nz in L: 2145 Flop count: 97955 -relative maxnorm of residual: 8.59759e-13 +relative maxnorm of residual: 5.76924e-13 -------------------------------------------------------- @@ -293,10 +294,10 @@ name: HB/bcsstm02 n: 66 entries: 66 Factorize PAP'=LDL' and solve Ax=b Nz in L: 0 Flop count: 0 -relative maxnorm of residual: 2.22045e-16 +relative maxnorm of residual: 1.3857e-16 Factorize A=LDL' and solve Ax=b Nz in L: 0 Flop count: 0 -relative maxnorm of residual: 2.22045e-16 +relative maxnorm of residual: 1.3857e-16 -------------------------------------------------------- @@ -306,10 +307,10 @@ name: HB/bcsstm02 n: 66 entries: 72 (jumbled version) Factorize PAP'=LDL' and solve Ax=b Nz in L: 0 Flop count: 0 -relative maxnorm of residual: 2.22045e-16 +relative maxnorm of residual: 1.3857e-16 Factorize A=LDL' and solve Ax=b Nz in L: 0 Flop count: 0 -relative maxnorm of residual: 2.22045e-16 +relative maxnorm of residual: 1.3857e-16 -------------------------------------------------------- @@ -359,6 +360,6 @@ name: Dense/3 n: 3 entries: 9 (invalid Ai) ldlmain: invalid matrix and/or permutation -Largest residual during all tests: 3.27418e-10 +Largest residual during all tests: 2.56588e-10 ldlmain: all tests passed diff --git a/LDL/Demo/ldlmain.c b/LDL/Demo/ldlmain.c index e8c116142..29da7515b 100644 --- a/LDL/Demo/ldlmain.c +++ b/LDL/Demo/ldlmain.c @@ -101,6 +101,22 @@ int main (void) FILE *f ; char s [LEN], filename [LEN] ; + //-------------------------------------------------------------------------- + // check the LDL version + //-------------------------------------------------------------------------- + + printf ("LDL version %d.%d.%d, date: %s\n", + LDL_MAIN_VERSION, LDL_SUB_VERSION, LDL_SUBSUB_VERSION, LDL_DATE) ; + int version [3] ; + ldl_version (version) ; + if ((version [0] != LDL_MAIN_VERSION) || + (version [1] != LDL_SUB_VERSION) || + (version [2] != LDL_SUBSUB_VERSION)) + { + fprintf (stderr, "version in header does not match library\n") ; + abort ( ) ; + } + /* ---------------------------------------------------------------------- */ /* check the error-checking routines with null matrices */ /* ---------------------------------------------------------------------- */ diff --git a/LDL/Demo/ldlmain.out b/LDL/Demo/ldlmain.out index 7080fca09..5e8f82491 100644 --- a/LDL/Demo/ldlmain.out +++ b/LDL/Demo/ldlmain.out @@ -1,3 +1,4 @@ +LDL version 3.3.0, date: Dec 30, 2023 -------------------------------------------------------- @@ -33,10 +34,10 @@ name: Dense/1 n: 1 entries: 1 Factorize PAP'=LDL' and solve Ax=b Nz in L: 0 Flop count: 0 -relative maxnorm of residual: 0 +relative maxnorm of residual: 1.97627e-17 Factorize A=LDL' and solve Ax=b Nz in L: 0 Flop count: 0 -relative maxnorm of residual: 0 +relative maxnorm of residual: 1.97627e-17 -------------------------------------------------------- @@ -46,10 +47,10 @@ name: Dense/1 n: 1 entries: 2 (jumbled version) Factorize PAP'=LDL' and solve Ax=b Nz in L: 0 Flop count: 0 -relative maxnorm of residual: 8.32667e-17 +relative maxnorm of residual: 5.51017e-17 Factorize A=LDL' and solve Ax=b Nz in L: 0 Flop count: 0 -relative maxnorm of residual: 8.32667e-17 +relative maxnorm of residual: 5.51017e-17 -------------------------------------------------------- @@ -59,10 +60,10 @@ name: Dense/2 n: 2 entries: 4 Factorize PAP'=LDL' and solve Ax=b Nz in L: 1 Flop count: 3 -relative maxnorm of residual: 5.55112e-17 +relative maxnorm of residual: 2.53452e-17 Factorize A=LDL' and solve Ax=b Nz in L: 1 Flop count: 3 -relative maxnorm of residual: 5.55112e-17 +relative maxnorm of residual: 2.53452e-17 -------------------------------------------------------- @@ -72,10 +73,10 @@ name: Dense/2 n: 2 entries: 5 (jumbled version) Factorize PAP'=LDL' and solve Ax=b Nz in L: 1 Flop count: 3 -relative maxnorm of residual: 1.11022e-16 +relative maxnorm of residual: 1.08019e-16 Factorize A=LDL' and solve Ax=b Nz in L: 1 Flop count: 3 -relative maxnorm of residual: 1.11022e-16 +relative maxnorm of residual: 1.08019e-16 -------------------------------------------------------- @@ -85,10 +86,10 @@ name: Dense/3 n: 3 entries: 9 Factorize PAP'=LDL' and solve Ax=b Nz in L: 3 Flop count: 11 -relative maxnorm of residual: 1.11022e-16 +relative maxnorm of residual: 1.5077e-16 Factorize A=LDL' and solve Ax=b Nz in L: 3 Flop count: 11 -relative maxnorm of residual: 1.11022e-16 +relative maxnorm of residual: 1.5077e-16 -------------------------------------------------------- @@ -98,10 +99,10 @@ name: Dense/3 n: 3 entries: 11 (jumbled version) Factorize PAP'=LDL' and solve Ax=b Nz in L: 3 Flop count: 11 -relative maxnorm of residual: 1.38778e-16 +relative maxnorm of residual: 1.27147e-16 Factorize A=LDL' and solve Ax=b Nz in L: 3 Flop count: 11 -relative maxnorm of residual: 1.38778e-16 +relative maxnorm of residual: 1.27147e-16 -------------------------------------------------------- @@ -137,10 +138,10 @@ name: FIDAP/ex5 n: 27 entries: 279 Factorize PAP'=LDL' and solve Ax=b Nz in L: 126 Flop count: 954 -relative maxnorm of residual: 2.59625e-10 +relative maxnorm of residual: 1.95957e-10 Factorize A=LDL' and solve Ax=b Nz in L: 276 Flop count: 4206 -relative maxnorm of residual: 2.72848e-10 +relative maxnorm of residual: 2.29324e-10 -------------------------------------------------------- @@ -150,10 +151,10 @@ name: FIDAP/ex5 n: 27 entries: 325 (jumbled version) Factorize PAP'=LDL' and solve Ax=b Nz in L: 126 Flop count: 954 -relative maxnorm of residual: 3.27418e-10 +relative maxnorm of residual: 2.56588e-10 Factorize A=LDL' and solve Ax=b Nz in L: 276 Flop count: 4206 -relative maxnorm of residual: 2.32376e-10 +relative maxnorm of residual: 2.49687e-10 -------------------------------------------------------- @@ -163,10 +164,10 @@ name: HB/bcsstk01 n: 48 entries: 400 Factorize PAP'=LDL' and solve Ax=b Nz in L: 441 Flop count: 5961 -relative maxnorm of residual: 2.38712e-13 +relative maxnorm of residual: 1.85693e-13 Factorize A=LDL' and solve Ax=b Nz in L: 829 Flop count: 20103 -relative maxnorm of residual: 2.27374e-13 +relative maxnorm of residual: 3.17781e-13 -------------------------------------------------------- @@ -176,10 +177,10 @@ name: HB/bcsstk01 n: 48 entries: 472 (jumbled version) Factorize PAP'=LDL' and solve Ax=b Nz in L: 441 Flop count: 5961 -relative maxnorm of residual: 2.27374e-13 +relative maxnorm of residual: 2.75176e-13 Factorize A=LDL' and solve Ax=b Nz in L: 829 Flop count: 20103 -relative maxnorm of residual: 3.83693e-13 +relative maxnorm of residual: 3.12705e-13 -------------------------------------------------------- @@ -215,10 +216,10 @@ name: Pothen/mesh1e1 n: 48 entries: 306 Factorize PAP'=LDL' and solve Ax=b Nz in L: 288 Flop count: 2630 -relative maxnorm of residual: 5.96745e-16 +relative maxnorm of residual: 5.6363e-16 Factorize A=LDL' and solve Ax=b Nz in L: 511 Flop count: 7383 -relative maxnorm of residual: 6.93889e-16 +relative maxnorm of residual: 7.07792e-16 -------------------------------------------------------- @@ -228,10 +229,10 @@ name: Pothen/mesh1e1 n: 48 entries: 359 (jumbled version) Factorize PAP'=LDL' and solve Ax=b Nz in L: 288 Flop count: 2630 -relative maxnorm of residual: 5.55112e-16 +relative maxnorm of residual: 5.57005e-16 Factorize A=LDL' and solve Ax=b Nz in L: 511 Flop count: 7383 -relative maxnorm of residual: 5.55112e-16 +relative maxnorm of residual: 8.6996e-16 -------------------------------------------------------- @@ -241,10 +242,10 @@ name: Bai/bfwb62 n: 62 entries: 342 Factorize PAP'=LDL' and solve Ax=b Nz in L: 226 Flop count: 1472 -relative maxnorm of residual: 5.55112e-16 +relative maxnorm of residual: 5.39685e-16 Factorize A=LDL' and solve Ax=b Nz in L: 662 Flop count: 11350 -relative maxnorm of residual: 1.11022e-15 +relative maxnorm of residual: 8.70386e-16 -------------------------------------------------------- @@ -254,10 +255,10 @@ name: Bai/bfwb62 n: 62 entries: 407 (jumbled version) Factorize PAP'=LDL' and solve Ax=b Nz in L: 226 Flop count: 1472 -relative maxnorm of residual: 5.68434e-14 +relative maxnorm of residual: 3.00082e-14 Factorize A=LDL' and solve Ax=b Nz in L: 662 Flop count: 11350 -relative maxnorm of residual: 2.15827e-12 +relative maxnorm of residual: 1.64732e-12 -------------------------------------------------------- @@ -267,10 +268,10 @@ name: HB/bcsstk02 n: 66 entries: 4356 Factorize PAP'=LDL' and solve Ax=b Nz in L: 2145 Flop count: 97955 -relative maxnorm of residual: 7.50219e-13 +relative maxnorm of residual: 6.01798e-13 Factorize A=LDL' and solve Ax=b Nz in L: 2145 Flop count: 97955 -relative maxnorm of residual: 7.50219e-13 +relative maxnorm of residual: 6.01798e-13 -------------------------------------------------------- @@ -280,10 +281,10 @@ name: HB/bcsstk02 n: 66 entries: 5175 (jumbled version) Factorize PAP'=LDL' and solve Ax=b Nz in L: 2145 Flop count: 97955 -relative maxnorm of residual: 8.59759e-13 +relative maxnorm of residual: 5.76924e-13 Factorize A=LDL' and solve Ax=b Nz in L: 2145 Flop count: 97955 -relative maxnorm of residual: 8.59759e-13 +relative maxnorm of residual: 5.76924e-13 -------------------------------------------------------- @@ -293,10 +294,10 @@ name: HB/bcsstm02 n: 66 entries: 66 Factorize PAP'=LDL' and solve Ax=b Nz in L: 0 Flop count: 0 -relative maxnorm of residual: 2.22045e-16 +relative maxnorm of residual: 1.3857e-16 Factorize A=LDL' and solve Ax=b Nz in L: 0 Flop count: 0 -relative maxnorm of residual: 2.22045e-16 +relative maxnorm of residual: 1.3857e-16 -------------------------------------------------------- @@ -306,10 +307,10 @@ name: HB/bcsstm02 n: 66 entries: 72 (jumbled version) Factorize PAP'=LDL' and solve Ax=b Nz in L: 0 Flop count: 0 -relative maxnorm of residual: 2.22045e-16 +relative maxnorm of residual: 1.3857e-16 Factorize A=LDL' and solve Ax=b Nz in L: 0 Flop count: 0 -relative maxnorm of residual: 2.22045e-16 +relative maxnorm of residual: 1.3857e-16 -------------------------------------------------------- @@ -359,6 +360,6 @@ name: Dense/3 n: 3 entries: 9 (invalid Ai) ldlmain: invalid matrix and/or permutation -Largest residual during all tests: 3.27418e-10 +Largest residual during all tests: 2.56588e-10 ldlmain: all tests passed diff --git a/LDL/Doc/ChangeLog b/LDL/Doc/ChangeLog index 4dbeee00e..4193d13d0 100644 --- a/LDL/Doc/ChangeLog +++ b/LDL/Doc/ChangeLog @@ -1,6 +1,7 @@ Dec 30, 2023: version 3.3.0 * major change to build system: by Markus Mützel + * ldl_version: added to return version of LDL Sept 18, 2023: version 3.2.1 diff --git a/LDL/Include/ldl.h b/LDL/Include/ldl.h index 0a11f4d42..05bbbf89c 100644 --- a/LDL/Include/ldl.h +++ b/LDL/Include/ldl.h @@ -47,6 +47,8 @@ extern "C" { #endif +void ldl_version (int version [3]) ; + /* ========================================================================== */ /* === int32_t version ====================================================== */ /* ========================================================================== */ diff --git a/LDL/Source/ldl.c b/LDL/Source/ldl.c index d431bdc0c..8654f3805 100644 --- a/LDL/Source/ldl.c +++ b/LDL/Source/ldl.c @@ -507,3 +507,17 @@ LDL_int LDL_valid_matrix } return (1) ; /* matrix is valid */ } + +//------------------------------------------------------------------------------ +// ldl_version: return the LDL version +//------------------------------------------------------------------------------ + +#ifndef LDL_LONG +void ldl_version (int version [3]) +{ + version [0] = LDL_MAIN_VERSION ; + version [1] = LDL_SUB_VERSION ; + version [2] = LDL_SUBSUB_VERSION ; +} +#endif + diff --git a/Mongoose/Tests/Mongoose_Test_Memory_exe.cpp b/Mongoose/Tests/Mongoose_Test_Memory_exe.cpp index 4670f9026..61d0f88dd 100644 --- a/Mongoose/Tests/Mongoose_Test_Memory_exe.cpp +++ b/Mongoose/Tests/Mongoose_Test_Memory_exe.cpp @@ -10,6 +10,7 @@ //------------------------------------------------------------------------------ +#include "Mongoose.hpp" #include "Mongoose_Test.hpp" using namespace Mongoose; @@ -25,6 +26,14 @@ using namespace Mongoose; int main(int argn, const char **argv) { + + if ((major_version ( ) != Mongoose_VERSION_MAJOR) || + (minor_version ( ) != Mongoose_VERSION_MINOR) || + (patch_version ( ) != Mongoose_VERSION_PATCH)) + { + return EXIT_FAILURE; + } + SuiteSparse_start(); if (argn != 2) diff --git a/RBio/Config/RBio.h.in b/RBio/Config/RBio.h.in index 8f6356ce6..15a86be5a 100644 --- a/RBio/Config/RBio.h.in +++ b/RBio/Config/RBio.h.in @@ -292,6 +292,8 @@ int RBok (int64_t nrow, int64_t ncol, void RBerror (int status) ; /* only for MATLAB mexFunctions */ #endif +void RBio_version (int version [3]) ; + #ifdef __cplusplus } #endif diff --git a/RBio/Demo/RBdemo.c b/RBio/Demo/RBdemo.c index 524a52c01..389aa8924 100644 --- a/RBio/Demo/RBdemo.c +++ b/RBio/Demo/RBdemo.c @@ -24,6 +24,24 @@ int main (int argc, char **argv) fem, xsize, nelnz, nnz ; char title [73], key [9], mtype [4], mtype2 [4], *filename ; + //-------------------------------------------------------------------------- + // check the RBio version + //-------------------------------------------------------------------------- + + printf ("RBio version %d.%d.%d, date: %s\n", + RBIO_MAIN_VERSION, RBIO_SUB_VERSION, RBIO_SUBSUB_VERSION, RBIO_DATE) ; + int version [3] ; + RBio_version (version) ; + if ((version [0] != RBIO_MAIN_VERSION) || + (version [1] != RBIO_SUB_VERSION) || + (version [2] != RBIO_SUBSUB_VERSION)) + { + fprintf (stderr, "version in header does not match library\n") ; + abort ( ) ; + } + + //-------------------------------------------------------------------------- + /* initialize the memory allocation functions */ SuiteSparse_start ( ) ; diff --git a/RBio/Demo/RBdemo.out b/RBio/Demo/RBdemo.out index 2e966c46e..8e4242ec0 100644 --- a/RBio/Demo/RBdemo.out +++ b/RBio/Demo/RBdemo.out @@ -1,20 +1,20 @@ ( cd build && cmake .. && cmake --build . --config Release -j8 ) -- Building RBIO version: v4.3.0 (Dec 30, 2023) --- Source: /home/davis/dev2/SuiteSparse/RBio --- Build: /home/davis/dev2/SuiteSparse/RBio/build +-- Source: /Users/davis/dev2/SuiteSparse/RBio +-- Build: /Users/davis/dev2/SuiteSparse/RBio/build -- Install lib: lib -- Install include: include -- Install bin: bin -- Install pkg-file: lib -- Install rpath: --- Build rpath: /home/davis/dev2/SuiteSparse/RBio/build +-- Build rpath: /Users/davis/dev2/SuiteSparse/RBio/build -- Build type: Release --- Fortran: /usr/bin/f95 +-- Fortran: /opt/homebrew/bin/gfortran -- CUDA: not enabled -- SuiteSparse_config version: 7.4.0 --- SuiteSparse_config include: /home/davis/dev2/SuiteSparse/SuiteSparse_config --- SuiteSparse_config library: /home/davis/dev2/SuiteSparse/SuiteSparse_config/build/libsuitesparseconfig.so.7.4.0 --- SuiteSparse_config static: /home/davis/dev2/SuiteSparse/SuiteSparse_config/build/libsuitesparseconfig.a +-- SuiteSparse_config include: /Users/davis/dev2/SuiteSparse/SuiteSparse_config +-- SuiteSparse_config library: /Users/davis/dev2/SuiteSparse/SuiteSparse_config/build/libsuitesparseconfig.7.4.0.dylib +-- SuiteSparse_config static: /Users/davis/dev2/SuiteSparse/SuiteSparse_config/build/libsuitesparseconfig.a -- Also compiling the demos in RBio/Demo -- ------------------------------------------------------------------------ -- SuiteSparse CMAKE report for: rbio @@ -25,51 +25,38 @@ -- BUILD_SHARED_LIBS: ON -- BUILD_STATIC_LIBS: ON -- use OpenMP: no --- C compiler: /usr/bin/cc +-- C compiler: /Library/Developer/CommandLineTools/usr/bin/cc -- C flags: -- C++ compiler: -- C++ flags: -- C Flags release: -O3 -DNDEBUG -- C++ Flags release: --- Fortran compiler: /usr/bin/f95 +-- Fortran compiler: /opt/homebrew/bin/gfortran -- compile definitions: -- ------------------------------------------------------------------------ --- Configuring done --- Generating done --- Build files have been written to: /home/davis/dev2/SuiteSparse/RBio/build -make[1]: Entering directory '/home/davis/dev2/SuiteSparse/RBio/build' -make[2]: Entering directory '/home/davis/dev2/SuiteSparse/RBio/build' -make[3]: Entering directory '/home/davis/dev2/SuiteSparse/RBio/build' -make[3]: Entering directory '/home/davis/dev2/SuiteSparse/RBio/build' -Consolidate compiler generated dependencies of target RBio -make[3]: Leaving directory '/home/davis/dev2/SuiteSparse/RBio/build' -Consolidate compiler generated dependencies of target RBio_static -make[3]: Leaving directory '/home/davis/dev2/SuiteSparse/RBio/build' -[ 37%] Built target RBio_static +-- Configuring done (0.0s) +-- Generating done (0.0s) +-- Build files have been written to: /Users/davis/dev2/SuiteSparse/RBio/build [ 75%] Built target RBio -make[3]: Entering directory '/home/davis/dev2/SuiteSparse/RBio/build' -Consolidate compiler generated dependencies of target RBdemo -make[3]: Leaving directory '/home/davis/dev2/SuiteSparse/RBio/build' +[ 75%] Built target RBio_static [100%] Built target RBdemo -make[2]: Leaving directory '/home/davis/dev2/SuiteSparse/RBio/build' -make[1]: Leaving directory '/home/davis/dev2/SuiteSparse/RBio/build' ( cd build && cmake -DDEMO=1 .. && cmake --build . --config Release -j8 ) -- Building RBIO version: v4.3.0 (Dec 30, 2023) --- Source: /home/davis/dev2/SuiteSparse/RBio --- Build: /home/davis/dev2/SuiteSparse/RBio/build +-- Source: /Users/davis/dev2/SuiteSparse/RBio +-- Build: /Users/davis/dev2/SuiteSparse/RBio/build -- Install lib: lib -- Install include: include -- Install bin: bin -- Install pkg-file: lib -- Install rpath: --- Build rpath: /home/davis/dev2/SuiteSparse/RBio/build +-- Build rpath: /Users/davis/dev2/SuiteSparse/RBio/build -- Build type: Release --- Fortran: /usr/bin/f95 +-- Fortran: /opt/homebrew/bin/gfortran -- CUDA: not enabled -- SuiteSparse_config version: 7.4.0 --- SuiteSparse_config include: /home/davis/dev2/SuiteSparse/SuiteSparse_config --- SuiteSparse_config library: /home/davis/dev2/SuiteSparse/SuiteSparse_config/build/libsuitesparseconfig.so.7.4.0 --- SuiteSparse_config static: /home/davis/dev2/SuiteSparse/SuiteSparse_config/build/libsuitesparseconfig.a +-- SuiteSparse_config include: /Users/davis/dev2/SuiteSparse/SuiteSparse_config +-- SuiteSparse_config library: /Users/davis/dev2/SuiteSparse/SuiteSparse_config/build/libsuitesparseconfig.7.4.0.dylib +-- SuiteSparse_config static: /Users/davis/dev2/SuiteSparse/SuiteSparse_config/build/libsuitesparseconfig.a -- Also compiling the demos in RBio/Demo -- ------------------------------------------------------------------------ -- SuiteSparse CMAKE report for: rbio @@ -80,35 +67,23 @@ make[1]: Leaving directory '/home/davis/dev2/SuiteSparse/RBio/build' -- BUILD_SHARED_LIBS: ON -- BUILD_STATIC_LIBS: ON -- use OpenMP: no --- C compiler: /usr/bin/cc +-- C compiler: /Library/Developer/CommandLineTools/usr/bin/cc -- C flags: -- C++ compiler: -- C++ flags: -- C Flags release: -O3 -DNDEBUG -- C++ Flags release: --- Fortran compiler: /usr/bin/f95 +-- Fortran compiler: /opt/homebrew/bin/gfortran -- compile definitions: -- ------------------------------------------------------------------------ --- Configuring done --- Generating done --- Build files have been written to: /home/davis/dev2/SuiteSparse/RBio/build -make[1]: Entering directory '/home/davis/dev2/SuiteSparse/RBio/build' -make[2]: Entering directory '/home/davis/dev2/SuiteSparse/RBio/build' -make[3]: Entering directory '/home/davis/dev2/SuiteSparse/RBio/build' -make[3]: Entering directory '/home/davis/dev2/SuiteSparse/RBio/build' -Consolidate compiler generated dependencies of target RBio_static -make[3]: Leaving directory '/home/davis/dev2/SuiteSparse/RBio/build' -Consolidate compiler generated dependencies of target RBio -make[3]: Leaving directory '/home/davis/dev2/SuiteSparse/RBio/build' -[ 37%] Built target RBio_static +-- Configuring done (0.0s) +-- Generating done (0.0s) +-- Build files have been written to: /Users/davis/dev2/SuiteSparse/RBio/build [ 75%] Built target RBio -make[3]: Entering directory '/home/davis/dev2/SuiteSparse/RBio/build' -Consolidate compiler generated dependencies of target RBdemo -make[3]: Leaving directory '/home/davis/dev2/SuiteSparse/RBio/build' +[ 75%] Built target RBio_static [100%] Built target RBdemo -make[2]: Leaving directory '/home/davis/dev2/SuiteSparse/RBio/build' -make[1]: Leaving directory '/home/davis/dev2/SuiteSparse/RBio/build' ./build/RBdemo < ./RBio/private/west0479.rua +RBio version 4.3.0, date: Dec 30, 2023 =========================================================== title: [1U 8 STAGE COLUMN SECTION, ALL SECTIONS RIGOROUS ( CHEM. ENG. )] diff --git a/RBio/Doc/ChangeLog b/RBio/Doc/ChangeLog index b4808f148..3f9fdd717 100644 --- a/RBio/Doc/ChangeLog +++ b/RBio/Doc/ChangeLog @@ -1,6 +1,7 @@ Dec 30, 2023: version 4.3.0 * major change to build system: by Markus Mützel + * RBio_version: added to return version of RBio Sept 18, 2023: version 4.2.1 diff --git a/RBio/Include/RBio.h b/RBio/Include/RBio.h index d5f079bf1..e7f581593 100644 --- a/RBio/Include/RBio.h +++ b/RBio/Include/RBio.h @@ -292,6 +292,8 @@ int RBok (int64_t nrow, int64_t ncol, void RBerror (int status) ; /* only for MATLAB mexFunctions */ #endif +void RBio_version (int version [3]) ; + #ifdef __cplusplus } #endif diff --git a/RBio/Source/RBio.c b/RBio/Source/RBio.c index 0e1c2c415..86b8a1a70 100644 --- a/RBio/Source/RBio.c +++ b/RBio/Source/RBio.c @@ -345,6 +345,14 @@ PRIVATE void RB(skipheader) /* === functions ============================================================ */ /* ========================================================================== */ +#ifdef INT +void RBio_version (int version [3]) +{ + version [0] = RBIO_MAIN_VERSION ; + version [1] = RBIO_SUB_VERSION ; + version [2] = RBIO_SUBSUB_VERSION ; +} +#endif /* -------------------------------------------------------------------------- */ /* RBget_entry: get numerical entry in the matrix at position p */ diff --git a/SPEX/Config/SPEX.h.in b/SPEX/Config/SPEX.h.in index 583da5dc0..c15be1032 100644 --- a/SPEX/Config/SPEX.h.in +++ b/SPEX/Config/SPEX.h.in @@ -275,6 +275,12 @@ extern "C" { #endif +//------------------------------------------------------------------------------ +// version +//------------------------------------------------------------------------------ + +void SPEX_version (int version [3]) ; + //------------------------------------------------------------------------------ // Error codes //------------------------------------------------------------------------------ diff --git a/SPEX/Doc/ChangeLog b/SPEX/Doc/ChangeLog index b69fba018..97a7498e5 100644 --- a/SPEX/Doc/ChangeLog +++ b/SPEX/Doc/ChangeLog @@ -1,6 +1,7 @@ Dec 30, 2023: version 2.3.0 * major change to build system: by Markus Mützel + * SPEX_version: added to return version of SPEX Sept 18, 2023: version 2.2.1 diff --git a/SPEX/Include/SPEX.h b/SPEX/Include/SPEX.h index 7c3419bda..c84cbc01a 100644 --- a/SPEX/Include/SPEX.h +++ b/SPEX/Include/SPEX.h @@ -275,6 +275,12 @@ extern "C" { #endif +//------------------------------------------------------------------------------ +// version +//------------------------------------------------------------------------------ + +void SPEX_version (int version [3]) ; + //------------------------------------------------------------------------------ // Error codes //------------------------------------------------------------------------------ diff --git a/SPEX/SPEX_Util/Source/SPEX_version.c b/SPEX/SPEX_Util/Source/SPEX_version.c new file mode 100644 index 000000000..2687e3a98 --- /dev/null +++ b/SPEX/SPEX_Util/Source/SPEX_version.c @@ -0,0 +1,19 @@ +//------------------------------------------------------------------------------ +// SPEX/Source/amd_version: return SPEX version +//------------------------------------------------------------------------------ + +// SPEX_Util: (c) 2019-2023, Chris Lourenco (US Naval Academy), Jinhao Chen, +// Erick Moreno-Centeno, Timothy A. Davis, Texas A&M. All Rights Reserved. +// SPDX-License-Identifier: GPL-2.0-or-later or LGPL-3.0-or-later + +//------------------------------------------------------------------------------ + +#include "spex_util_internal.h" + +void SPEX_version (int version [3]) +{ + version [0] = SPEX_VERSION_MAJOR ; + version [1] = SPEX_VERSION_MINOR ; + version [2] = SPEX_VERSION_SUB ; +} + diff --git a/SPQR/Doc/ChangeLog b/SPQR/Doc/ChangeLog index ab1592730..e00b72cf7 100644 --- a/SPQR/Doc/ChangeLog +++ b/SPQR/Doc/ChangeLog @@ -3,6 +3,8 @@ Dec 30, 2023: version 4.3.0 * major change to build system: by Markus Mützel * dependent packages: GPUQREngine and SuiteSparse_GPURuntime moved into SPQR as dependent packages, only used in SPQR. + * SuiteSparseQR_C_version and SuiteSparseQR_version: added to return + version of SPQR Oct 23, 2023: version 4.2.2 diff --git a/SPQR/Include/SuiteSparseQR.hpp b/SPQR/Include/SuiteSparseQR.hpp index 32c9756f0..72417b15f 100644 --- a/SPQR/Include/SuiteSparseQR.hpp +++ b/SPQR/Include/SuiteSparseQR.hpp @@ -20,9 +20,9 @@ #define SUITESPARSE_GPU_EXTERN_ON extern "C" { -#include "SuiteSparse_config.h" -#include "cholmod.h" -#include "SuiteSparseQR_definitions.h" + #include "SuiteSparse_config.h" + #include "cholmod.h" + #include "SuiteSparseQR_definitions.h" } #undef SUITESPARSE_GPU_EXTERN_ON @@ -368,6 +368,8 @@ template struct SuiteSparseQR_factoriza // === Simple user-callable SuiteSparseQR functions ============================ // ============================================================================= +void SuiteSparseQR_version (int version [3]) ; + // SuiteSparseQR Sparse QR factorization and solve // SuiteSparseQR_qmult Q'*X, Q*X, X*Q', or X*Q for X full or sparse diff --git a/SPQR/Include/SuiteSparseQR_C.h b/SPQR/Include/SuiteSparseQR_C.h index 9d40a5e8c..7f47db401 100644 --- a/SPQR/Include/SuiteSparseQR_C.h +++ b/SPQR/Include/SuiteSparseQR_C.h @@ -242,6 +242,8 @@ cholmod_dense *SuiteSparseQR_C_qmult /* returns Y, or NULL on failure */ #endif +void SuiteSparseQR_C_version (int version [3]) ; + /* ========================================================================== */ #ifdef __cplusplus diff --git a/SPQR/Source/SuiteSparseQR.cpp b/SPQR/Source/SuiteSparseQR.cpp index 02e01d45a..ab4073504 100644 --- a/SPQR/Source/SuiteSparseQR.cpp +++ b/SPQR/Source/SuiteSparseQR.cpp @@ -1893,3 +1893,15 @@ template struct spqr_numeric ; template struct spqr_numeric ; template struct spqr_numeric ; + +// ----------------------------------------------------------------------------- +// SuiteSparseQR_version +// ----------------------------------------------------------------------------- + +void SuiteSparseQR_version (int version [3]) +{ + version [0] = SPQR_MAIN_VERSION ; + version [1] = SPQR_SUB_VERSION ; + version [2] = SPQR_SUBSUB_VERSION ; +} + diff --git a/SPQR/Source/SuiteSparseQR_C.cpp b/SPQR/Source/SuiteSparseQR_C.cpp index c373e0e71..d44b7dac4 100644 --- a/SPQR/Source/SuiteSparseQR_C.cpp +++ b/SPQR/Source/SuiteSparseQR_C.cpp @@ -547,6 +547,17 @@ cholmod_dense *SuiteSparseQR_C_qmult } } +// ============================================================================= +// === SuiteSparseQR_C_version ================================================= +// ============================================================================= + +void SuiteSparseQR_C_version (int version [3]) +{ + version [0] = SPQR_MAIN_VERSION ; + version [1] = SPQR_SUB_VERSION ; + version [2] = SPQR_SUBSUB_VERSION ; +} + #endif // ============================================================================= diff --git a/UMFPACK/Config/umfpack.h.in b/UMFPACK/Config/umfpack.h.in index 60562915d..336aad217 100644 --- a/UMFPACK/Config/umfpack.h.in +++ b/UMFPACK/Config/umfpack.h.in @@ -391,6 +391,12 @@ extern "C" { #endif +//------------------------------------------------------------------------------ +// umfpack_version +//------------------------------------------------------------------------------ + +void umfpack_version (int version [3]) ; + //------------------------------------------------------------------------------ // umfpack_symbolic //------------------------------------------------------------------------------ diff --git a/UMFPACK/Doc/ChangeLog b/UMFPACK/Doc/ChangeLog index b91aaca09..605165d78 100644 --- a/UMFPACK/Doc/ChangeLog +++ b/UMFPACK/Doc/ChangeLog @@ -2,6 +2,7 @@ Dec 30, 2023: version 6.3.0 * major change to build system: by Markus Mützel * AMD: amd_internal.h removed from UMFPACK/Source. + * umfpack_version: added to return version of UMFPACK Oct 23, 2023: version 6.2.2 diff --git a/UMFPACK/Include/umfpack.h b/UMFPACK/Include/umfpack.h index f6625214f..67cded215 100644 --- a/UMFPACK/Include/umfpack.h +++ b/UMFPACK/Include/umfpack.h @@ -391,6 +391,12 @@ extern "C" { #endif +//------------------------------------------------------------------------------ +// umfpack_version +//------------------------------------------------------------------------------ + +void umfpack_version (int version [3]) ; + //------------------------------------------------------------------------------ // umfpack_symbolic //------------------------------------------------------------------------------ diff --git a/UMFPACK/Source2/umfpack_version.c b/UMFPACK/Source2/umfpack_version.c new file mode 100644 index 000000000..c410f7ce0 --- /dev/null +++ b/UMFPACK/Source2/umfpack_version.c @@ -0,0 +1,18 @@ +//------------------------------------------------------------------------------ +// UMFPACK/Source/umfpack_version: return UMFPACK version +//------------------------------------------------------------------------------ + +// UMFPACK, Copyright (c) 2005-2023, Timothy A. Davis, All Rights Reserved. +// SPDX-License-Identifier: GPL-2.0+ + +//------------------------------------------------------------------------------ + +#include "umf_internal.h" + +void umfpack_version (int version [3]) +{ + version [0] = UMFPACK_MAIN_VERSION ; + version [1] = UMFPACK_SUB_VERSION ; + version [2] = UMFPACK_SUBSUB_VERSION ; +} +