Skip to content

Commit

Permalink
Update SuiteSparse to 7.8.2 (AMICI-dev#2500)
Browse files Browse the repository at this point in the history
Just small changes to CMake files.
  • Loading branch information
dweindl authored Sep 25, 2024
1 parent dbc4d5d commit 7c836ae
Show file tree
Hide file tree
Showing 32 changed files with 1,870 additions and 1,707 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ ThirdParty/sundials/build/*
ThirdParty/SuiteSparse/lib/*
ThirdParty/SuiteSparse/include/
ThirdParty/SuiteSparse/share/*
ThirdParty/SuiteSparse/install/*
ThirdParty/SuperLU_MT_3.1/
ThirdParty/superlu_mt_3.1.tar.gz
ThirdParty/swig-*
Expand Down
16 changes: 9 additions & 7 deletions ThirdParty/SuiteSparse/AMD/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@

cmake_minimum_required ( VERSION 3.22 )

set ( AMD_DATE "Jan 10, 2024" )
set ( AMD_DATE "June 20, 2024" )
set ( AMD_VERSION_MAJOR 3 CACHE STRING "" FORCE )
set ( AMD_VERSION_MINOR 3 CACHE STRING "" FORCE )
set ( AMD_VERSION_SUB 1 CACHE STRING "" FORCE )
set ( AMD_VERSION_SUB 3 CACHE STRING "" FORCE )

message ( STATUS "Building AMD version: v"
${AMD_VERSION_MAJOR}.
Expand Down Expand Up @@ -49,10 +49,10 @@ endif ( )
#-------------------------------------------------------------------------------

if ( NOT SUITESPARSE_ROOT_CMAKELISTS )
find_package ( SuiteSparse_config 7.5.0
find_package ( SuiteSparse_config 7.8.0
PATHS ${CMAKE_SOURCE_DIR}/../SuiteSparse_config/build NO_DEFAULT_PATH )
if ( NOT TARGET SuiteSparse::SuiteSparseConfig )
find_package ( SuiteSparse_config 7.5.0 REQUIRED )
find_package ( SuiteSparse_config 7.8.0 REQUIRED )
endif ( )
endif ( )

Expand Down Expand Up @@ -90,7 +90,8 @@ if ( BUILD_SHARED_LIBS )
OUTPUT_NAME amd
SOVERSION ${AMD_VERSION_MAJOR}
PUBLIC_HEADER "Include/amd.h"
WINDOWS_EXPORT_ALL_SYMBOLS ON )
WINDOWS_EXPORT_ALL_SYMBOLS ON
LINKER_LANGUAGE C )

if ( ${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.25" )
set_target_properties ( AMD PROPERTIES EXPORT_NO_SYSTEM ON )
Expand All @@ -111,9 +112,10 @@ if ( BUILD_STATIC_LIBS )
C_STANDARD 11
C_STANDARD_REQUIRED ON
OUTPUT_NAME amd
PUBLIC_HEADER "Include/amd.h" )
PUBLIC_HEADER "Include/amd.h"
LINKER_LANGUAGE C )

if ( MSVC )
if ( MSVC OR ("${CMAKE_C_SIMULATE_ID}" STREQUAL "MSVC") )
set_target_properties ( AMD_static PROPERTIES
OUTPUT_NAME amd_static )
endif ( )
Expand Down
4 changes: 2 additions & 2 deletions ThirdParty/SuiteSparse/AMD/Config/amd.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -392,8 +392,8 @@ void amd_version (int version [3]) ;

#define AMD__VERSION SUITESPARSE__VERCODE(@AMD_VERSION_MAJOR@,@AMD_VERSION_MINOR@,@AMD_VERSION_SUB@)
#if !defined (SUITESPARSE__VERSION) || \
(SUITESPARSE__VERSION < SUITESPARSE__VERCODE(7,5,0))
#error "AMD @AMD_VERSION_MAJOR@.@AMD_VERSION_MINOR@.@AMD_VERSION_SUB@ requires SuiteSparse_config 7.5.0 or later"
(SUITESPARSE__VERSION < SUITESPARSE__VERCODE(7,8,0))
#error "AMD @AMD_VERSION_MAJOR@.@AMD_VERSION_MINOR@.@AMD_VERSION_SUB@ requires SuiteSparse_config 7.8.0 or later"
#endif

#endif
8 changes: 8 additions & 0 deletions ThirdParty/SuiteSparse/AMD/Doc/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
June 20, 2024: version 3.3.3

* minor update for MATLAB on Windows

Mar 22, 2024: version 3.3.2

* minor updates to build system

Jan 10, 2024: version 3.3.1

* minor updates to build system
Expand Down
2 changes: 1 addition & 1 deletion ThirdParty/SuiteSparse/AMD/Doc/amd_version.tex
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
% version of SuiteSparse/AMD
\date{VERSION 3.3.1, Jan 10, 2024}
\date{VERSION 3.3.3, June 20, 2024}
10 changes: 5 additions & 5 deletions ThirdParty/SuiteSparse/AMD/Include/amd.h
Original file line number Diff line number Diff line change
Expand Up @@ -382,18 +382,18 @@ void amd_version (int version [3]) ;
* Versions 1.1 and earlier of AMD do not include a #define'd version number.
*/

#define AMD_DATE "Jan 10, 2024"
#define AMD_DATE "June 20, 2024"
#define AMD_MAIN_VERSION 3
#define AMD_SUB_VERSION 3
#define AMD_SUBSUB_VERSION 1
#define AMD_SUBSUB_VERSION 3

#define AMD_VERSION_CODE(main,sub) SUITESPARSE_VER_CODE(main,sub)
#define AMD_VERSION AMD_VERSION_CODE(3,3)

#define AMD__VERSION SUITESPARSE__VERCODE(3,3,1)
#define AMD__VERSION SUITESPARSE__VERCODE(3,3,3)
#if !defined (SUITESPARSE__VERSION) || \
(SUITESPARSE__VERSION < SUITESPARSE__VERCODE(7,5,0))
#error "AMD 3.3.1 requires SuiteSparse_config 7.5.0 or later"
(SUITESPARSE__VERSION < SUITESPARSE__VERCODE(7,8,0))
#error "AMD 3.3.3 requires SuiteSparse_config 7.8.0 or later"
#endif

#endif
10 changes: 5 additions & 5 deletions ThirdParty/SuiteSparse/BTF/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@

cmake_minimum_required ( VERSION 3.22 )

set ( BTF_DATE "Jan 10, 2024" )
set ( BTF_DATE "Mar 22, 2024" )
set ( BTF_VERSION_MAJOR 2 CACHE STRING "" FORCE )
set ( BTF_VERSION_MINOR 3 CACHE STRING "" FORCE )
set ( BTF_VERSION_SUB 1 CACHE STRING "" FORCE )
set ( BTF_VERSION_SUB 2 CACHE STRING "" FORCE )

message ( STATUS "Building BTF version: v"
${BTF_VERSION_MAJOR}.
Expand Down Expand Up @@ -44,10 +44,10 @@ include ( SuiteSparsePolicy )
#-------------------------------------------------------------------------------

if ( NOT SUITESPARSE_ROOT_CMAKELISTS )
find_package ( SuiteSparse_config 7.5.0
find_package ( SuiteSparse_config 7.7.0
PATHS ${CMAKE_SOURCE_DIR}/../SuiteSparse_config/build NO_DEFAULT_PATH )
if ( NOT TARGET SuiteSparse::SuiteSparseConfig )
find_package ( SuiteSparse_config 7.5.0 REQUIRED )
find_package ( SuiteSparse_config 7.7.0 REQUIRED )
endif ( )
endif ( )

Expand Down Expand Up @@ -104,7 +104,7 @@ if ( BUILD_STATIC_LIBS )
OUTPUT_NAME btf
PUBLIC_HEADER "Include/btf.h" )

if ( MSVC )
if ( MSVC OR ("${CMAKE_C_SIMULATE_ID}" STREQUAL "MSVC") )
set_target_properties ( BTF_static PROPERTIES
OUTPUT_NAME btf_static )
endif ( )
Expand Down
4 changes: 2 additions & 2 deletions ThirdParty/SuiteSparse/BTF/Config/btf.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -274,8 +274,8 @@ void btf_version (int version [3]) ;

#define BTF__VERSION SUITESPARSE__VERCODE(@BTF_VERSION_MAJOR@,@BTF_VERSION_MINOR@,@BTF_VERSION_SUB@)
#if !defined (SUITESPARSE__VERSION) || \
(SUITESPARSE__VERSION < SUITESPARSE__VERCODE(7,5,0))
#error "BTF @BTF_VERSION_MAJOR@.@BTF_VERSION_MINOR@.@BTF_VERSION_SUB@ requires SuiteSparse_config 7.5.0 or later"
(SUITESPARSE__VERSION < SUITESPARSE__VERCODE(7,7,0))
#error "BTF @BTF_VERSION_MAJOR@.@BTF_VERSION_MINOR@.@BTF_VERSION_SUB@ requires SuiteSparse_config 7.7.0 or later"
#endif

#endif
4 changes: 4 additions & 0 deletions ThirdParty/SuiteSparse/BTF/Doc/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
Mar 22, 2024: version 2.3.2

* minor updates to build system

Jan 10, 2024: version 2.3.1

* minor updates to build system
Expand Down
10 changes: 5 additions & 5 deletions ThirdParty/SuiteSparse/BTF/Include/btf.h
Original file line number Diff line number Diff line change
Expand Up @@ -264,18 +264,18 @@ void btf_version (int version [3]) ;
* #endif
*/

#define BTF_DATE "Jan 10, 2024"
#define BTF_DATE "Mar 22, 2024"
#define BTF_MAIN_VERSION 2
#define BTF_SUB_VERSION 3
#define BTF_SUBSUB_VERSION 1
#define BTF_SUBSUB_VERSION 2

#define BTF_VERSION_CODE(main,sub) SUITESPARSE_VER_CODE(main,sub)
#define BTF_VERSION BTF_VERSION_CODE(2,3)

#define BTF__VERSION SUITESPARSE__VERCODE(2,3,1)
#define BTF__VERSION SUITESPARSE__VERCODE(2,3,2)
#if !defined (SUITESPARSE__VERSION) || \
(SUITESPARSE__VERSION < SUITESPARSE__VERCODE(7,5,0))
#error "BTF 2.3.1 requires SuiteSparse_config 7.5.0 or later"
(SUITESPARSE__VERSION < SUITESPARSE__VERCODE(7,7,0))
#error "BTF 2.3.2 requires SuiteSparse_config 7.7.0 or later"
#endif

#endif
5 changes: 2 additions & 3 deletions ThirdParty/SuiteSparse/CITATION.bib
Original file line number Diff line number Diff line change
Expand Up @@ -474,17 +474,16 @@ @article{10.1145/3337792

@article{10.1145/3519024,
author = {Lourenco, Christopher and Chen, Jinhao and Moreno-Centeno, Erick and Davis, Timothy A.},
title = {Algorithm&nbsp;1XXX: SPEX Left LU, Exactly Solving Sparse Linear Systems via a Sparse Left-Looking Integer-Preserving LU Factorization},
title = {Algorithm 1021: SPEX Left LU, Exactly Solving Sparse Linear Systems via a Sparse Left-Looking Integer-Preserving LU Factorization},
year = {2022},
publisher = {Association for Computing Machinery},
address = {New York, NY, USA},
issn = {0098-3500},
url = {https://doi.org/10.1145/3519024},
doi = {10.1145/3519024},
abstract = {SPEX Left LU is a software package for exactly solving unsymmetric sparse linear systems. As a component of the sparse exact (SPEX) software package, SPEX Left LU can be applied to any input matrix, A, whose entries are integral, rational, or decimal, and provides a solution to the system Ax = b which is either exact or accurate to user-specified precision. SPEX Left LU preorders the matrix A with a user-specified fill-reducing ordering and computes a left-looking LU factorization with the special property that each operation used to compute the L and U matrices is integral. Notable additional applications of this package include benchmarking the stability and accuracy of state-of-the-art linear solvers, and determining whether singular-to-double-precision matrices are indeed singular. Computationally, this paper evaluates the impact of several novel pivoting schemes in exact arithmetic, benchmarks the exact iterative solvers within Linbox, and benchmarks the accuracy of MATLAB sparse backslash. Most importantly, it is shown that SPEX Left LU outperforms the exact iterative solvers in run time on easy instances and in stability as the iterative solver fails on a sizeable subset of the tested (both easy and hard) instances. The SPEX Left LU package is written in ANSI C, comes with a MATLAB interface, and is distributed via GitHub, as a component of the SPEX software package, and as a component of SuiteSparse.},
note = {Just Accepted},
journal = {ACM Trans. Math. Softw.},
month = {feb},
month = {jun},
keywords = {exact matrix factorization, sparse linear systems, sparse matrix algorithms, exactly solving linear systems, roundoff errors}
}

30 changes: 22 additions & 8 deletions ThirdParty/SuiteSparse/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ option ( SUITESPARSE_USE_SYSTEM_CAMD "ON: use CAMD libraries installed on the bu
option ( SUITESPARSE_USE_SYSTEM_CCOLAMD "ON: use CCOLAMD libraries installed on the build system. OFF (default): Automatically build CCOLAMD as dependency if needed." OFF )
option ( SUITESPARSE_USE_SYSTEM_GRAPHBLAS "ON: use GraphBLAS libraries installed on the build system. OFF (default): Automatically build GraphBLAS as dependency if needed." OFF )
option ( SUITESPARSE_USE_SYSTEM_SUITESPARSE_CONFIG "ON: use SuiteSparse_config libraries installed on the build system. OFF (default): Automatically build SuiteSparse_config as dependency if needed." OFF )
option ( SUITESPARSE_USE_SYSTEM_UMFPACK "ON: use UMFPACK libraries installed on the build system. OFF (default): Automatically build UMFPACK as dependency if needed." OFF )

#-------------------------------------------------------------------------------
# global variables
Expand All @@ -110,7 +111,7 @@ include ( SuiteSparsePolicy )

if ( SUITESPARSE_USE_SYSTEM_GRAPHBLAS )
list ( REMOVE_ITEM SUITESPARSE_ENABLE_PROJECTS "graphblas" )
find_package ( GraphBLAS 9.0.1 REQUIRED )
find_package ( GraphBLAS 9.3.1 REQUIRED )
else ( )
if ( "lagraph" IN_LIST SUITESPARSE_ENABLE_PROJECTS )
# LAGraph requires GraphBLAS.
Expand All @@ -123,7 +124,7 @@ endif ( )

if ( SUITESPARSE_USE_SYSTEM_BTF )
list ( REMOVE_ITEM SUITESPARSE_ENABLE_PROJECTS "btf" )
find_package ( BTF 2.3.1 REQUIRED )
find_package ( BTF 2.3.2 REQUIRED )
else ( )
if ( "klu" IN_LIST SUITESPARSE_ENABLE_PROJECTS )
# KLU requires BTF.
Expand All @@ -134,9 +135,22 @@ else ( )
endif ( )
endif ( )

if ( SUITESPARSE_USE_SYSTEM_UMFPACK )
list ( REMOVE_ITEM SUITESPARSE_ENABLE_PROJECTS "umfpack" )
find_package ( UMFPACK 6.3.4 REQUIRED )
else ( )
if ( "paru" IN_LIST SUITESPARSE_ENABLE_PROJECTS )
# ParU requires UMFPACK.
if ( NOT "umfpack" IN_LIST SUITESPARSE_ENABLE_PROJECTS )
message ( STATUS "Adding \"umfpack\" to the list of built targets." )
list ( APPEND SUITESPARSE_ENABLE_PROJECTS "umfpack" )
endif ( )
endif ( )
endif ( )

if ( SUITESPARSE_USE_SYSTEM_CHOLMOD )
list ( REMOVE_ITEM SUITESPARSE_ENABLE_PROJECTS "cholmod" )
find_package ( CHOLMOD 5.2.0 REQUIRED )
find_package ( CHOLMOD 5.3.0 REQUIRED )
else ( )
if ( ( KLU_USE_CHOLMOD AND "klu" IN_LIST SUITESPARSE_ENABLE_PROJECTS )
OR ( UMFPACK_USE_CHOLMOD AND "umfpack" IN_LIST SUITESPARSE_ENABLE_PROJECTS )
Expand All @@ -154,7 +168,7 @@ endif ( )

if ( SUITESPARSE_USE_SYSTEM_AMD )
list ( REMOVE_ITEM SUITESPARSE_ENABLE_PROJECTS "amd" )
find_package ( AMD 3.3.1 REQUIRED )
find_package ( AMD 3.3.3 REQUIRED )
else ( )
if ( "cholmod" IN_LIST SUITESPARSE_ENABLE_PROJECTS
OR "ldl" IN_LIST SUITESPARSE_ENABLE_PROJECTS
Expand All @@ -170,7 +184,7 @@ endif ( )

if ( SUITESPARSE_USE_SYSTEM_COLAMD )
list ( REMOVE_ITEM SUITESPARSE_ENABLE_PROJECTS "colamd" )
find_package ( COLAMD 3.3.2 REQUIRED )
find_package ( COLAMD 3.3.4 REQUIRED )
else ( )
if ( "cholmod" IN_LIST SUITESPARSE_ENABLE_PROJECTS
OR "spex" IN_LIST SUITESPARSE_ENABLE_PROJECTS )
Expand All @@ -184,7 +198,7 @@ endif ( )

if ( SUITESPARSE_USE_SYSTEM_CAMD )
list ( REMOVE_ITEM SUITESPARSE_ENABLE_PROJECTS "camd" )
find_package ( CAMD 3.3.1 REQUIRED )
find_package ( CAMD 3.3.3 REQUIRED )
else ( )
if ( CHOLMOD_CAMD AND "cholmod" IN_LIST SUITESPARSE_ENABLE_PROJECTS )
# CHOLMOD can optionally use CAMD.
Expand All @@ -197,7 +211,7 @@ endif ( )

if ( SUITESPARSE_USE_SYSTEM_CCOLAMD )
list ( REMOVE_ITEM SUITESPARSE_ENABLE_PROJECTS "ccolamd" )
find_package ( CCOLAMD 3.3.2 REQUIRED )
find_package ( CCOLAMD 3.3.4 REQUIRED )
else ( )
if ( CHOLMOD_CAMD AND "cholmod" IN_LIST SUITESPARSE_ENABLE_PROJECTS )
# CHOLMOD can optionally use CCOLAMD.
Expand All @@ -210,7 +224,7 @@ endif ( )

if ( SUITESPARSE_USE_SYSTEM_SUITESPARSE_CONFIG )
list ( REMOVE_ITEM SUITESPARSE_ENABLE_PROJECTS "suitesparse_config" )
find_package ( SuiteSparse_config 7.6.0 REQUIRED )
find_package ( SuiteSparse_config 7.8.2 REQUIRED )
else ( )
if ( "mongoose" IN_LIST SUITESPARSE_ENABLE_PROJECTS
OR "amd" IN_LIST SUITESPARSE_ENABLE_PROJECTS
Expand Down
10 changes: 5 additions & 5 deletions ThirdParty/SuiteSparse/COLAMD/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@

cmake_minimum_required ( VERSION 3.22 )

set ( COLAMD_DATE "Jan 20, 2024" )
set ( COLAMD_DATE "June 20, 2024" )
set ( COLAMD_VERSION_MAJOR 3 CACHE STRING "" FORCE )
set ( COLAMD_VERSION_MINOR 3 CACHE STRING "" FORCE )
set ( COLAMD_VERSION_SUB 2 CACHE STRING "" FORCE )
set ( COLAMD_VERSION_SUB 4 CACHE STRING "" FORCE )

message ( STATUS "Building COLAMD version: v"
${COLAMD_VERSION_MAJOR}.
Expand Down Expand Up @@ -43,10 +43,10 @@ include ( SuiteSparsePolicy )
#-------------------------------------------------------------------------------

if ( NOT SUITESPARSE_ROOT_CMAKELISTS )
find_package ( SuiteSparse_config 7.6.0
find_package ( SuiteSparse_config 7.8.0
PATHS ${CMAKE_SOURCE_DIR}/../SuiteSparse_config/build NO_DEFAULT_PATH )
if ( NOT TARGET SuiteSparse::SuiteSparseConfig )
find_package ( SuiteSparse_config 7.6.0 REQUIRED )
find_package ( SuiteSparse_config 7.8.0 REQUIRED )
endif ( )
endif ( )

Expand Down Expand Up @@ -104,7 +104,7 @@ if ( BUILD_STATIC_LIBS )
C_STANDARD_REQUIRED ON
PUBLIC_HEADER "Include/colamd.h" )

if ( MSVC )
if ( MSVC OR ("${CMAKE_C_SIMULATE_ID}" STREQUAL "MSVC") )
set_target_properties ( COLAMD_static PROPERTIES
OUTPUT_NAME colamd_static )
endif ( )
Expand Down
4 changes: 2 additions & 2 deletions ThirdParty/SuiteSparse/COLAMD/Config/colamd.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@

#define COLAMD__VERSION SUITESPARSE__VERCODE(@COLAMD_VERSION_MAJOR@,@COLAMD_VERSION_MINOR@,@COLAMD_VERSION_SUB@)
#if !defined (SUITESPARSE__VERSION) || \
(SUITESPARSE__VERSION < SUITESPARSE__VERCODE(7,6,0))
#error "COLAMD @COLAMD_VERSION_MAJOR@.@COLAMD_VERSION_MINOR@.@COLAMD_VERSION_SUB@ requires SuiteSparse_config 7.6.0 or later"
(SUITESPARSE__VERSION < SUITESPARSE__VERCODE(7,8,0))
#error "COLAMD @COLAMD_VERSION_MAJOR@.@COLAMD_VERSION_MINOR@.@COLAMD_VERSION_SUB@ requires SuiteSparse_config 7.8.0 or later"
#endif

/* ========================================================================== */
Expand Down
8 changes: 8 additions & 0 deletions ThirdParty/SuiteSparse/COLAMD/Doc/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
June 20, 2024: version 3.3.4

* minor update for MATLAB on Windows

Mar 22, 2024: version 3.3.3

* minor updates to build system

Jan 20, 2024: version 3.3.2

* minor updates to build system
Expand Down
10 changes: 5 additions & 5 deletions ThirdParty/SuiteSparse/COLAMD/Include/colamd.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,18 +65,18 @@
* Versions 2.3 and earlier of COLAMD do not include a #define'd version number.
*/

#define COLAMD_DATE "Jan 20, 2024"
#define COLAMD_DATE "June 20, 2024"
#define COLAMD_MAIN_VERSION 3
#define COLAMD_SUB_VERSION 3
#define COLAMD_SUBSUB_VERSION 2
#define COLAMD_SUBSUB_VERSION 4

#define COLAMD_VERSION_CODE(main,sub) SUITESPARSE_VER_CODE(main,sub)
#define COLAMD_VERSION COLAMD_VERSION_CODE(3,3)

#define COLAMD__VERSION SUITESPARSE__VERCODE(3,3,2)
#define COLAMD__VERSION SUITESPARSE__VERCODE(3,3,4)
#if !defined (SUITESPARSE__VERSION) || \
(SUITESPARSE__VERSION < SUITESPARSE__VERCODE(7,6,0))
#error "COLAMD 3.3.2 requires SuiteSparse_config 7.6.0 or later"
(SUITESPARSE__VERSION < SUITESPARSE__VERCODE(7,8,0))
#error "COLAMD 3.3.4 requires SuiteSparse_config 7.8.0 or later"
#endif

/* ========================================================================== */
Expand Down
Loading

0 comments on commit 7c836ae

Please sign in to comment.