Skip to content

Commit

Permalink
Merge pull request #490 from DrTimothyAldenDavis/single
Browse files Browse the repository at this point in the history
CHOLMOD 5.0.1 and SuiteSparse 7.3.0
  • Loading branch information
DrTimothyAldenDavis authored Nov 1, 2023
2 parents 2ad670a + db38068 commit 2875d28
Show file tree
Hide file tree
Showing 14 changed files with 45 additions and 32 deletions.
8 changes: 4 additions & 4 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 23, 2023" )
set ( CHOLMOD_DATE "Oct 31, 2023" )
set ( CHOLMOD_VERSION_MAJOR 5 )
set ( CHOLMOD_VERSION_MINOR 0 )
set ( CHOLMOD_VERSION_SUB 0 )
set ( CHOLMOD_VERSION_SUB 1 )

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

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

find_package ( COLAMD 3.2.1
Expand Down
8 changes: 5 additions & 3 deletions CHOLMOD/Cholesky/cholmod_solve.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,8 @@ static void perm
)
{
double *Yx, *Yz, *Bx, *Bz ;
Int k2, nk, p, k, j, nrow, ncol, d, dual, dj, j2 ;
Int k2, nk, p, k, j, nrow, ncol, d, dj, j2 ;
size_t dual ;

/* ---------------------------------------------------------------------- */
/* get inputs */
Expand Down Expand Up @@ -532,7 +533,8 @@ static void ptrans
)
{
double *Yx, *Yz, *Bx, *Bz ;
Int k2, nk, p, k, j, nrow, ncol, d, dual, dj, j2 ;
Int k2, nk, p, k, j, nrow, ncol, d, dj, j2 ;
size_t dual ;

/* ---------------------------------------------------------------------- */
/* get inputs */
Expand Down Expand Up @@ -1543,7 +1545,7 @@ int CHOLMOD(solve2) /* returns TRUE on success, FALSE on failure */
#ifndef NSUPERNODAL
/* allocate workspace */
cholmod_dense *E ;
Int dual ;
size_t dual ;
Common->blas_ok = TRUE ;
dual = (L->xtype == CHOLMOD_REAL && B->xtype != CHOLMOD_REAL) ? 2 : 1 ;
Y = CHOLMOD(ensure_dense) (Y_Handle, n, dual*nrhs, n, L->xtype, Common);
Expand Down
2 changes: 1 addition & 1 deletion CHOLMOD/Cholesky/cholmod_spsolve.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ cholmod_sparse *CHOLMOD(spsolve) /* returns the sparse solution X */
block = MIN (nrhs, 4) ;

/* initial size of X is at most 4*n */
nzmax = n*block ;
nzmax = ((size_t) n) * ((size_t) block) ;

X = CHOLMOD(spzeros) (n, nrhs, nzmax, xtype, Common) ;
B4 = CHOLMOD(zeros) (n, block, B->xtype, Common) ;
Expand Down
2 changes: 1 addition & 1 deletion CHOLMOD/Cholesky/t_cholmod_rowfac.c
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ static int TEMPLATE (cholmod_rowfac)
* zomplex. Xwork [i] == 0 must hold. */
Wz = Wx + n ; /* size n for zomplex case only */
mark = Common->mark ;
size_t wsize = (L->xtype == CHOLMOD_REAL ? 1:2) * n ;
size_t wsize = (L->xtype == CHOLMOD_REAL ? 1:2) * ((size_t) n) ;
ASSERT (Common->xworkbytes >= wsize * sizeof (Real)) ;

/* ---------------------------------------------------------------------- */
Expand Down
15 changes: 8 additions & 7 deletions CHOLMOD/Config/cholmod.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -1894,17 +1894,18 @@ void *cholmod_l_realloc (size_t, size_t, void *, size_t *, cholmod_common *) ;
int cholmod_realloc_multiple // returns true if successful, false otherwise
(
size_t nnew, // # of items in newly reallocate memory
int nint, // 0: do not allocate I or J, 1: just I, 2: both I and J
int nint, // 0: do not allocate I_block or J_block, 1: just I_block,
// 2: both I_block and J_block
int xdtype, // xtype + dtype of the matrix:
// (CHOLMOD_DOUBLE, _SINGLE) +
// (CHOLMOD_PATTERN, _REAL, _COMPLEX, or _ZOMPLEX)
// input/output:
void **I, // integer block of memory (int32_t or int64_t)
void **J, // integer block of memory (int32_t or int64_t)
void **X, // real or complex, double or single, block
void **Z, // zomplex only: double or single block
size_t *n, // current size of I, J, X, and/or Z blocks on input,
// changed to nnew on output, if successful
void **I_block, // integer block of memory (int32_t or int64_t)
void **J_block, // integer block of memory (int32_t or int64_t)
void **X_block, // real or complex, double or single, block
void **Z_block, // zomplex only: double or single block
size_t *n, // current size of I_block, J_block, X_block, and/or Z_block
// on input, changed to nnew on output, if successful
cholmod_common *Common
) ;
int cholmod_l_realloc_multiple (size_t, int, int, void **, void **, void **,
Expand Down
Binary file modified CHOLMOD/Doc/CHOLMOD_UserGuide.pdf
Binary file not shown.
5 changes: 5 additions & 0 deletions CHOLMOD/Doc/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
Oct 31, 2023, version 5.0.1

* cholmod.h: remove use of "I" which conflicts with
#include <complex.h>.

Oct 23, 2023, version 5.0.0

* CHOLMOD v5.0.0: introduces the first part of support for single
Expand Down
2 changes: 1 addition & 1 deletion CHOLMOD/Doc/cholmod_version.tex
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
% version of SuiteSparse/CHOLMOD
\date{VERSION 5.0.0, Oct 23, 2023}
\date{VERSION 5.0.1, Oct 31, 2023}
19 changes: 10 additions & 9 deletions CHOLMOD/Include/cholmod.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,10 @@
// version control
//==============================================================================

#define CHOLMOD_DATE "Oct 23, 2023"
#define CHOLMOD_DATE "Oct 31, 2023"
#define CHOLMOD_MAIN_VERSION 5
#define CHOLMOD_SUB_VERSION 0
#define CHOLMOD_SUBSUB_VERSION 0
#define CHOLMOD_SUBSUB_VERSION 1

#define CHOLMOD_VER_CODE(main,sub) ((main) * 1000 + (sub))
#define CHOLMOD_VERSION \
Expand Down Expand Up @@ -1894,17 +1894,18 @@ void *cholmod_l_realloc (size_t, size_t, void *, size_t *, cholmod_common *) ;
int cholmod_realloc_multiple // returns true if successful, false otherwise
(
size_t nnew, // # of items in newly reallocate memory
int nint, // 0: do not allocate I or J, 1: just I, 2: both I and J
int nint, // 0: do not allocate I_block or J_block, 1: just I_block,
// 2: both I_block and J_block
int xdtype, // xtype + dtype of the matrix:
// (CHOLMOD_DOUBLE, _SINGLE) +
// (CHOLMOD_PATTERN, _REAL, _COMPLEX, or _ZOMPLEX)
// input/output:
void **I, // integer block of memory (int32_t or int64_t)
void **J, // integer block of memory (int32_t or int64_t)
void **X, // real or complex, double or single, block
void **Z, // zomplex only: double or single block
size_t *n, // current size of I, J, X, and/or Z blocks on input,
// changed to nnew on output, if successful
void **I_block, // integer block of memory (int32_t or int64_t)
void **J_block, // integer block of memory (int32_t or int64_t)
void **X_block, // real or complex, double or single, block
void **Z_block, // zomplex only: double or single block
size_t *n, // current size of I_block, J_block, X_block, and/or Z_block
// on input, changed to nnew on output, if successful
cholmod_common *Common
) ;
int cholmod_l_realloc_multiple (size_t, int, int, void **, void **, void **,
Expand Down
2 changes: 1 addition & 1 deletion CHOLMOD/Utility/t_cholmod_transpose_sym.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ int CHOLMOD(transpose_sym)
// allocate workspace
//--------------------------------------------------------------------------

CHOLMOD(allocate_work) (0, ((Perm == NULL) ? 1: 2) * n, 0, Common) ;
CHOLMOD(allocate_work) (0, ((Perm == NULL) ? 1: 2) * A->ncol, 0, Common) ;
RETURN_IF_ERROR ;

Int *Wi = (Int *) Common->Iwork ; // size n integers
Expand Down
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
Oct 31, 2023: version 7.3.1

* CHOLMOD 5.0.1: remove "I" from cholmod.h.

Oct 23, 2023: version 7.3.0

* CHOLMOD 5.0.0: initial support for sparse single precision matries.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
SuiteSparse: A Suite of Sparse matrix packages at http://suitesparse.com
-----------------------------------------------------------------------------

Oct 23, 2023, SuiteSparse VERSION 7.3.0
Oct 31, 2023, SuiteSparse VERSION 7.3.1

SuiteSparse is a set of sparse-matrix-related packages written or co-authored
by Tim Davis, available at https://github.com/DrTimothyAldenDavis/SuiteSparse .
Expand Down
4 changes: 2 additions & 2 deletions SuiteSparse_config/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
cmake_minimum_required ( VERSION 3.22 )

# version of both SuiteSparse and SuiteSparse_config
set ( SUITESPARSE_DATE "Oct 23, 2023" )
set ( SUITESPARSE_DATE "Oct 31, 2023" )
set ( SUITESPARSE_VERSION_MAJOR 7 )
set ( SUITESPARSE_VERSION_MINOR 3 )
set ( SUITESPARSE_VERSION_SUB 0 )
set ( SUITESPARSE_VERSION_SUB 1 )

message ( STATUS "Building SuiteSparse_config version: v"
${SUITESPARSE_VERSION_MAJOR}.
Expand Down
4 changes: 2 additions & 2 deletions SuiteSparse_config/SuiteSparse_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -409,10 +409,10 @@ int SuiteSparse_version // returns SUITESPARSE_VERSION

#define SUITESPARSE_HAS_VERSION_FUNCTION

#define SUITESPARSE_DATE "Oct 23, 2023"
#define SUITESPARSE_DATE "Oct 31, 2023"
#define SUITESPARSE_MAIN_VERSION 7
#define SUITESPARSE_SUB_VERSION 3
#define SUITESPARSE_SUBSUB_VERSION 0
#define SUITESPARSE_SUBSUB_VERSION 1

#define SUITESPARSE_VER_CODE(main,sub) ((main) * 1000 + (sub))
#define SUITESPARSE_VERSION \
Expand Down

0 comments on commit 2875d28

Please sign in to comment.