Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SuiteSparse 7.3.0 #472

Merged
merged 17 commits into from
Oct 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .github/workflows/build-arch-emu.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
name: arch-emu
on:
workflow_dispatch:
push:
branches-ignore:
- '**/dev2'
Expand Down
1 change: 1 addition & 0 deletions CHOLMOD/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
timelog.m
_*.tex
32 changes: 16 additions & 16 deletions CHOLMOD/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
# cmake 3.22 is required to find the BLAS/LAPACK
cmake_minimum_required ( VERSION 3.22 )

set ( CHOLMOD_DATE "Oct 15, 2023" )
set ( CHOLMOD_VERSION_MAJOR 4 )
set ( CHOLMOD_VERSION_MINOR 2 )
set ( CHOLMOD_VERSION_SUB 2 )
set ( CHOLMOD_DATE "Oct 23, 2023" )
set ( CHOLMOD_VERSION_MAJOR 5 )
set ( CHOLMOD_VERSION_MINOR 0 )
set ( CHOLMOD_VERSION_SUB 0 )

message ( STATUS "Building CHOLMOD version: v"
${CHOLMOD_VERSION_MAJOR}.
Expand Down Expand Up @@ -78,22 +78,22 @@ else ( )
find_package ( OpenMP )
endif ( )

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

find_package ( COLAMD 3.2.0
find_package ( COLAMD 3.2.1
PATHS ${CMAKE_SOURCE_DIR}/../COLAMD/build NO_DEFAULT_PATH )
if ( NOT TARGET SuiteSparse::COLAMD )
find_package ( COLAMD 3.2.0 REQUIRED )
find_package ( COLAMD 3.2.1 REQUIRED )
endif ( )

find_package ( AMD 3.2.0
find_package ( AMD 3.2.1
PATHS ${CMAKE_SOURCE_DIR}/../AMD/build NO_DEFAULT_PATH )
if ( NOT TARGET SuiteSparse::AMD )
find_package ( AMD 3.2.0 REQUIRED )
find_package ( AMD 3.2.1 REQUIRED )
endif ( )

#-------------------------------------------------------------------------------
Expand Down Expand Up @@ -196,16 +196,16 @@ endif ( )

if ( NOT NCAMD )
# find CAMD and CCOLAMD
find_package ( CAMD 3.2.0
find_package ( CAMD 3.2.1
PATHS ${CMAKE_SOURCE_DIR}/../CAMD/build NO_DEFAULT_PATH )
if ( NOT TARGET SuiteSparse::CAMD )
find_package ( CAMD 3.2.0 )
find_package ( CAMD 3.2.1 )
endif ( )

find_package ( CCOLAMD 3.2.0
find_package ( CCOLAMD 3.2.1
PATHS ${CMAKE_SOURCE_DIR}/../CCOLAMD/build NO_DEFAULT_PATH )
if ( NOT TARGET SuiteSparse::CCOLAMD )
find_package ( CCOLAMD 3.2.0 )
find_package ( CCOLAMD 3.2.1 )
endif ( )

if ( NOT CAMD_FOUND OR NOT CCOLAMD_FOUND )
Expand Down Expand Up @@ -290,15 +290,15 @@ configure_file ( "Config/cholmod_version.tex.in"
# include directories
#-------------------------------------------------------------------------------

include_directories ( Check Cholesky Core MatrixOps Modify Partition
include_directories ( Check Cholesky Utility MatrixOps Modify Partition
Supernodal Include ${CMAKE_SOURCE_DIR} )

#-------------------------------------------------------------------------------
# dynamic cholmod library properties
#-------------------------------------------------------------------------------

file ( GLOB CHOLMOD_SOURCES "Check/cholmod_*.c" "Cholesky/cholmod_*.c"
"Core/cholmod_*.c" "MatrixOps/cholmod_*.c" "Modify/cholmod_*.c"
"Utility/cholmod_*.c" "MatrixOps/cholmod_*.c" "Modify/cholmod_*.c"
"Partition/cholmod_*.c" "Supernodal/cholmod_*.c" )

add_library ( CHOLMOD SHARED ${CHOLMOD_SOURCES} )
Expand Down
56 changes: 32 additions & 24 deletions CHOLMOD/Check/cholmod_check.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
/* === printing definitions ================================================= */
/* ========================================================================== */

#if ( ITYPE == CHOLMOD_LONG )
#if defined ( CHOLMOD_INT64 )
#define I8 "%8ld"
#define I_8 "%-8ld"
#else
Expand Down Expand Up @@ -204,7 +204,7 @@ static int check_common
)
{
double fl, lnz ;
double *Xwork ;
uint8_t *Xwork ;
Int *Flag, *Head ;
int64_t mark ;
Int i, nrow, nmethods, ordering, xworksize, amd_backup, init_print ;
Expand Down Expand Up @@ -502,9 +502,15 @@ static int check_common
}

P4 (" dbound: LDL' diagonal threshold: % .5g\n Entries with abs. value"
" less than dbound are replaced with +/- dbound.\n",
" less than dbound are replaced with +/- dbound.\n"
" (for double precision case)\n",
Common->dbound) ;

P4 (" sbound: LDL' diagonal threshold: % .5g\n Entries with abs. value"
" less than sbound are replaced with +/- sbound.\n"
" (for single precision case)\n",
Common->sbound) ;

P4 (" grow0: memory reallocation: % .5g\n", Common->grow0) ;
P4 (" grow1: memory reallocation: % .5g\n", Common->grow1) ;
P4 (" grow2: memory reallocation: %g\n", (double) (Common->grow2)) ;
Expand Down Expand Up @@ -552,7 +558,8 @@ static int check_common
}
}
}
xworksize = Common->xworksize ;

xworksize = Common->xworkbytes ;
Xwork = Common->Xwork ;
if (xworksize > 0)
{
Expand All @@ -564,7 +571,7 @@ static int check_common
{
if (Xwork [i] != 0.)
{
PRINT0 (("Xwork ["ID"] = %g\n", i, Xwork [i])) ;
PRINT0 (("Xwork ["ID"] = %d\n", i, Xwork [i])) ;
ERR ("workspace corrupted (Xwork)") ;
}
}
Expand Down Expand Up @@ -742,7 +749,6 @@ static int64_t check_sparse
switch (A->itype)
{
case CHOLMOD_INT: P4 ("%s", "\n scalar types: int, ") ; break ;
case CHOLMOD_INTLONG: ERR ("mixed int/long type unsupported") ;
case CHOLMOD_LONG: P4 ("%s", "\n scalar types: int64_t, ");
break ;
default: ERR ("unknown itype") ;
Expand All @@ -760,13 +766,13 @@ static int64_t check_sparse
switch (A->dtype)
{
case CHOLMOD_DOUBLE: P4 ("%s", ", double\n") ; break ;
case CHOLMOD_SINGLE: ERR ("float unsupported") ;
case CHOLMOD_SINGLE: P4 ("%s", ", single\n") ; break ;
default: ERR ("unknown dtype") ;
}

if (A->itype != ITYPE || A->dtype != DTYPE)
if (A->itype != ITYPE)
{
ERR ("integer and real type must match routine") ;
ERR ("integer type must match routine") ;
}

if (A->stype && nrow != ncol)
Expand Down Expand Up @@ -1009,7 +1015,7 @@ static int check_dense
switch (X->dtype)
{
case CHOLMOD_DOUBLE: P4 ("%s", ", double\n") ; break ;
case CHOLMOD_SINGLE: ERR ("single unsupported") ;
case CHOLMOD_SINGLE: P4 ("%s", ", single\n") ; break ;
default: ERR ("unknown dtype") ;
}

Expand Down Expand Up @@ -1542,7 +1548,6 @@ static int check_factor
switch (L->itype)
{
case CHOLMOD_INT: P4 ("%s", "\n scalar types: int, ") ; break ;
case CHOLMOD_INTLONG: ERR ("mixed int/long type unsupported") ;
case CHOLMOD_LONG: P4 ("%s", "\n scalar types: int64_t, ");
break ;
default: ERR ("unknown itype") ;
Expand All @@ -1560,13 +1565,13 @@ static int check_factor
switch (L->dtype)
{
case CHOLMOD_DOUBLE: P4 ("%s", ", double\n") ; break ;
case CHOLMOD_SINGLE: ERR ("single unsupported") ;
case CHOLMOD_SINGLE: P4 ("%s", ", single\n") ; break ;
default: ERR ("unknown dtype") ;
}

if (L->itype != ITYPE || L->dtype != DTYPE)
if (L->itype != ITYPE)
{
ERR ("integer and real type must match routine") ;
ERR ("integer type must match routine") ;
}

if (L->is_super)
Expand Down Expand Up @@ -2118,7 +2123,6 @@ static int check_triplet
switch (T->itype)
{
case CHOLMOD_INT: P4 ("%s", "\n scalar types: int, ") ; break ;
case CHOLMOD_INTLONG: ERR ("mixed int/long type unsupported") ;
case CHOLMOD_LONG: P4 ("%s", "\n scalar types: int64_t, ");
break ;
default: ERR ("unknown itype") ;
Expand All @@ -2136,13 +2140,13 @@ static int check_triplet
switch (T->dtype)
{
case CHOLMOD_DOUBLE: P4 ("%s", ", double\n") ; break ;
case CHOLMOD_SINGLE: ERR ("single unsupported") ;
case CHOLMOD_SINGLE: P4 ("%s", ", single\n") ; break ;
default: ERR ("unknown dtype") ;
}

if (T->itype != ITYPE || T->dtype != DTYPE)
if (T->itype != ITYPE)
{
ERR ("integer and real type must match routine") ;
ERR ("integer type must match routine") ;
}

if (T->stype && nrow != ncol)
Expand Down Expand Up @@ -2450,7 +2454,7 @@ int CHOLMOD(dump_parent)
void CHOLMOD(dump_real)
(
const char *name,
Real *X, int64_t nrow, int64_t ncol, int lower,
double *X, int64_t nrow, int64_t ncol, int lower,
int xentry, cholmod_common *Common
)
{
Expand Down Expand Up @@ -2654,16 +2658,19 @@ int CHOLMOD(dump_work) (int flag, int head, int64_t wsize,
W = Common->Xwork ;
mark = Common->mark ;

#if 0
// FIXME: need float and double
if (wsize < 0)
{
/* check all of Xwork */
wsize = Common->xworksize ;
wsize = Common->xworkbytes ;
}
else
{
/* check on the first wsize doubles in Xwork */
wsize = MIN (wsize, (Int) (Common->xworksize)) ;
wsize = MIN (wsize, (Int) (Common->xworkbytes)) ;
}
#endif

if (flag)
{
Expand All @@ -2673,7 +2680,6 @@ int CHOLMOD(dump_work) (int flag, int head, int64_t wsize,
{
PRINT0 (("Flag invalid, Flag ["ID"] = "ID", mark = "ID"\n",
k, Flag [k], mark)) ;
ASSERT (0) ;
return (FALSE) ;
}
}
Expand All @@ -2686,23 +2692,25 @@ int CHOLMOD(dump_work) (int flag, int head, int64_t wsize,
if (Head [k] != EMPTY)
{
PRINT0 (("Head invalid, Head ["ID"] = "ID"\n", k, Head [k])) ;
ASSERT (0) ;
return (FALSE) ;
}
}
}

#if 0
// FIXME: need float and double
for (k = 0 ; k < wsize ; k++)
{
if (W [k] != 0.)
{
PRINT0 (("W invalid, W ["ID"] = %g\n", k, W [k])) ;
ASSERT (0) ;
return (FALSE) ;
}
}
#endif

return (TRUE) ;
}
#endif
#endif

2 changes: 1 addition & 1 deletion CHOLMOD/Check/cholmod_l_check.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@

//------------------------------------------------------------------------------

#define DLONG
#define CHOLMOD_INT64
#include "cholmod_check.c"

2 changes: 1 addition & 1 deletion CHOLMOD/Check/cholmod_l_read.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@

//------------------------------------------------------------------------------

#define DLONG
#define CHOLMOD_INT64
#include "cholmod_read.c"

2 changes: 1 addition & 1 deletion CHOLMOD/Check/cholmod_l_write.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@

//------------------------------------------------------------------------------

#define DLONG
#define CHOLMOD_INT64
#include "cholmod_write.c"

2 changes: 1 addition & 1 deletion CHOLMOD/Check/cholmod_read.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
* complex symmetric matrices are always returned with both upper and lower
* triangular parts present, with an stype of zero, since CHOLMOD does not
* have a method for representing skew-symmetric and complex symmetric
* matrices. Real symmetric and complex Hermitian matrices may optionally
* matrices. real symmetric and complex Hermitian matrices may optionally
* be returned with both parts present.
*
* Any other lines starting with "%" are treated as comments, and are ignored.
Expand Down
4 changes: 2 additions & 2 deletions CHOLMOD/Check/cholmod_write.c
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ static int print_value
/* ---------------------------------------------------------------------- */

/* change -inf to -HUGE_DOUBLE, and change +inf and nan to +HUGE_DOUBLE */
if (CHOLMOD_IS_NAN (x) || x >= HUGE_DOUBLE)
if (isnan (x) || x >= HUGE_DOUBLE)
{
x = HUGE_DOUBLE ;
}
Expand Down Expand Up @@ -341,7 +341,7 @@ static Int ntriplets
* as A.
*
* Returns the symmetry in which the matrix was printed (1 to 7, see the
* CHOLMOD_MM_* codes in CHOLMOD/Include/cholmod_core.h), or -1 on failure.
* CHOLMOD_MM_* codes in CHOLMOD/Include/cholmod.h), or -1 on failure.
*
* If A and Z are sorted on input, and either unsymmetric (stype = 0) or
* symmetric-lower (stype < 0), and if A and Z do not overlap, then the triplets
Expand Down
2 changes: 1 addition & 1 deletion CHOLMOD/Cholesky/cholmod_amd.c
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ int CHOLMOD(amd)
Control [AMD_AGGRESSIVE] = Common->method [Common->current].aggressive ;
}

#if ( ITYPE == CHOLMOD_LONG )
#if defined ( CHOLMOD_INT64 )
amd_l2 (n, C->p, C->i, Len, C->nzmax, cnz, Nv, Next, Perm, Head, Elen,
Degree, Wi, Control, Info) ;
#else
Expand Down
Loading