Skip to content

Commit

Permalink
Merge pull request #867 from DrTimothyAldenDavis/dev
Browse files Browse the repository at this point in the history
SuiteSparse 7.8.2
  • Loading branch information
DrTimothyAldenDavis authored Aug 24, 2024
2 parents 05710d0 + 09cfee7 commit c8c3a9d
Show file tree
Hide file tree
Showing 31 changed files with 615 additions and 99 deletions.
14 changes: 7 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ include ( SuiteSparsePolicy )

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

if ( SUITESPARSE_USE_SYSTEM_UMFPACK )
list ( REMOVE_ITEM SUITESPARSE_ENABLE_PROJECTS "umfpack" )
find_package ( UMFPACK 6.3.3 REQUIRED )
find_package ( UMFPACK 6.3.4 REQUIRED )
else ( )
if ( "paru" IN_LIST SUITESPARSE_ENABLE_PROJECTS )
# ParU requires UMFPACK.
Expand Down Expand Up @@ -168,7 +168,7 @@ endif ( )

if ( SUITESPARSE_USE_SYSTEM_AMD )
list ( REMOVE_ITEM SUITESPARSE_ENABLE_PROJECTS "amd" )
find_package ( AMD 3.3.2 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 @@ -184,7 +184,7 @@ endif ( )

if ( SUITESPARSE_USE_SYSTEM_COLAMD )
list ( REMOVE_ITEM SUITESPARSE_ENABLE_PROJECTS "colamd" )
find_package ( COLAMD 3.3.3 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 @@ -198,7 +198,7 @@ endif ( )

if ( SUITESPARSE_USE_SYSTEM_CAMD )
list ( REMOVE_ITEM SUITESPARSE_ENABLE_PROJECTS "camd" )
find_package ( CAMD 3.3.2 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 @@ -211,7 +211,7 @@ endif ( )

if ( SUITESPARSE_USE_SYSTEM_CCOLAMD )
list ( REMOVE_ITEM SUITESPARSE_ENABLE_PROJECTS "ccolamd" )
find_package ( CCOLAMD 3.3.3 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 @@ -224,7 +224,7 @@ endif ( )

if ( SUITESPARSE_USE_SYSTEM_SUITESPARSE_CONFIG )
list ( REMOVE_ITEM SUITESPARSE_ENABLE_PROJECTS "suitesparse_config" )
find_package ( SuiteSparse_config 7.8.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
29 changes: 29 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,32 @@
Aug 20, 2024: version 7.8.2

* LAGraph 1.1.4: bug fix for LAGraph_MMWrite when matrix is dense
* SPEX 3.2.1: release date revised, sync with primary SPEX repo
* SuiteSparse_config, Example: modified to reflect the release of
LAGraph 1.1.4 and SPEX 3.2.1
* ParU 0.3.0: added parameter to ParU_Get
* Package versions in this release: (* denotes a new version)
SuiteSparse_config 7.8.2 *
AMD 3.3.3
BTF 2.3.2
CAMD 3.3.3
CCOLAMD 3.3.4
CHOLMOD 5.3.0
COLAMD 3.3.4
CSparse 4.3.2
CXSparse 4.4.1
Example 1.8.2 *
GraphBLAS 9.3.1
KLU 2.3.4
LDL 3.3.2
LAGraph 1.1.4 *
SuiteSparse_Mongoose 3.3.4
ParU 0.3.0 *
RBio 4.3.3
SPEX 3.2.1 *
SPQR 4.3.4
UMFPACK 6.3.4

Aug 12, 2024: version 7.8.1

* GraphBLAS 9.3.1: bug fix in creation of JIT package
Expand Down
12 changes: 6 additions & 6 deletions Example/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ message ( STATUS "MY prefix path: ${CMAKE_PREFIX_PATH}" )
#-------------------------------------------------------------------------------

# cmake inserts the date and version number into Include/my.h:
set ( MY_DATE "Aug 12, 2024" )
set ( MY_DATE "Aug 20, 2024" )
set ( MY_VERSION_MAJOR 1 )
set ( MY_VERSION_MINOR 8 )
set ( MY_VERSION_PATCH 1 )
set ( MY_VERSION_PATCH 2 )

message ( STATUS "Building MY library version: v"
${MY_VERSION_MAJOR}.
Expand Down Expand Up @@ -87,7 +87,7 @@ project ( my
#-------------------------------------------------------------------------------

# look for all SuiteSparse packages:
find_package ( SuiteSparse_config 7.8.1 REQUIRED )
find_package ( SuiteSparse_config 7.8.2 REQUIRED )
find_package ( AMD 3.3.3 REQUIRED )
find_package ( BTF 2.3.2 REQUIRED )
find_package ( CAMD 3.3.3 REQUIRED )
Expand All @@ -99,11 +99,11 @@ find_package ( GraphBLAS 9.3.1 )
find_package ( KLU 2.3.4 REQUIRED )
find_package ( KLU_CHOLMOD 2.3.4 REQUIRED )
find_package ( LDL 3.3.2 REQUIRED )
find_package ( LAGraph 1.1.3 )
find_package ( LAGraph 1.1.4 )
find_package ( SuiteSparse_Mongoose 3.3.4 REQUIRED )
find_package ( ParU 0.2.0 REQUIRED )
find_package ( ParU 0.3.0 REQUIRED )
find_package ( RBio 4.3.3 REQUIRED )
find_package ( SPEX 3.2.0 REQUIRED ) # requires GMP and MPFR
find_package ( SPEX 3.2.1 REQUIRED ) # requires GMP and MPFR
find_package ( SPQR 4.3.4 REQUIRED )
find_package ( UMFPACK 6.3.4 REQUIRED )

Expand Down
4 changes: 2 additions & 2 deletions Example/Include/my.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
// file, since it is constructed from Config/my.h.in by cmake.

// version and date for example user library
#define MY_DATE "Aug 12, 2024"
#define MY_DATE "Aug 20, 2024"
#define MY_MAJOR_VERSION 1
#define MY_MINOR_VERSION 8
#define MY_PATCH_VERSION 1
#define MY_PATCH_VERSION 2

#ifdef __cplusplus
extern "C" {
Expand Down
12 changes: 6 additions & 6 deletions Example/Include/my_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@

// SuiteSparse include files for C/C++:
#include "SuiteSparse_config.h"
#if !defined (SUITESPARSE__VERSION) || SUITESPARSE__VERSION < SUITESPARSE__VERCODE(7,8,1)
#error "This library requires SuiteSparse_config 7.8.1 or later"
#if !defined (SUITESPARSE__VERSION) || SUITESPARSE__VERSION < SUITESPARSE__VERCODE(7,8,2)
#error "This library requires SuiteSparse_config 7.8.2 or later"
#endif

#include "amd.h"
Expand Down Expand Up @@ -63,8 +63,8 @@

#if ! defined (NO_LAGRAPH)
#include "LAGraph.h"
#if SUITESPARSE__VERCODE(LAGRAPH_VERSION_MAJOR,LAGRAPH_VERSION_MINOR,LAGRAPH_VERSION_UPDATE) < SUITESPARSE__VERCODE(1,1,3)
#error "This library requires LAGraph 1.1.3 or later"
#if SUITESPARSE__VERCODE(LAGRAPH_VERSION_MAJOR,LAGRAPH_VERSION_MINOR,LAGRAPH_VERSION_UPDATE) < SUITESPARSE__VERCODE(1,1,4)
#error "This library requires LAGraph 1.1.4 or later"
#endif
#endif

Expand All @@ -84,8 +84,8 @@
#endif

#include "SPEX.h"
#if !defined (SPEX__VERSION) || SPEX__VERSION < SUITESPARSE__VERCODE(3,2,0)
#error "This library requires SPEX 3.2.0 or later"
#if !defined (SPEX__VERSION) || SPEX__VERSION < SUITESPARSE__VERCODE(3,2,1)
#error "This library requires SPEX 3.2.1 or later"
#endif

#include "SuiteSparseQR_C.h"
Expand Down
4 changes: 2 additions & 2 deletions LAGraph/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@
cmake_minimum_required ( VERSION 3.20 ) # LAGraph can be built stand-alone

# version of LAGraph
set ( LAGraph_DATE "Mar 22, 2024" )
set ( LAGraph_DATE "Aug 20, 2024" )
set ( LAGraph_VERSION_MAJOR 1 CACHE STRING "" FORCE )
set ( LAGraph_VERSION_MINOR 1 CACHE STRING "" FORCE )
set ( LAGraph_VERSION_SUB 3 CACHE STRING "" FORCE )
set ( LAGraph_VERSION_SUB 4 CACHE STRING "" FORCE )

message ( STATUS "Building LAGraph version: v"
${LAGraph_VERSION_MAJOR}.
Expand Down
4 changes: 4 additions & 0 deletions LAGraph/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
Aug 20, 2024: version 1.1.4

* fix MMWrite when matrix is dense

Mar 22, 2024: version 1.1.3

* minor updates to build system
Expand Down
2 changes: 1 addition & 1 deletion LAGraph/data/comments_full.mtx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
%%GraphBLAS type double
% comments for full.mtx
% this file was created by test_MMRead.c
3 3 9
3 3
.646
.709
.754
Expand Down
2 changes: 0 additions & 2 deletions LAGraph/experimental/test/test_BF.c
Original file line number Diff line number Diff line change
Expand Up @@ -396,8 +396,6 @@ void test_BF (void)
// since d5 is a dense vector filled with infinity, we have
// to compare it against d seperaterly
OK (GrB_Vector_extractElement (&di, d5, i)) ;
printf ("di %g d[i] %g difference %g\n",
di, d [i], di - d [i]) ;
TEST_CHECK (di == d[i]) ;

// since d5a is a dense vector filled with infinity, we
Expand Down
54 changes: 22 additions & 32 deletions LAGraph/github_workflows/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: LAGraph CI
name: LAGraph CI with Builtin GraphBLAS

on:
workflow_dispatch:
Expand All @@ -13,38 +13,34 @@ jobs:
strategy:
matrix:
config:
- {grb_version: 7.1.0, conda_grb_package_hash: h27087fc, conda_extension: tar.bz2}
- {grb_version: 7.3.0, conda_grb_package_hash: h27087fc, conda_extension: tar.bz2}
- {grb_version: 7.4.1, conda_grb_package_hash: hcb278e6, conda_extension: conda}
# if there are multiple items in this list, only use should
# deployit=true for just one of them.
- {grb_version: 9.3.1, deployit: true}
steps:
- name: Checkout
uses: actions/[email protected]
- name: Install tools for build
run: |
sudo apt install -y lcov
- name: Get GraphBLAS binaries
- name: Build GraphBLAS
run: |
mkdir graphblas-binaries
cd graphblas-binaries
wget --quiet https://anaconda.org/conda-forge/graphblas/${{ matrix.config.grb_version }}/download/linux-64/graphblas-${{ matrix.config.grb_version }}-${{ matrix.config.conda_grb_package_hash }}_0.${{ matrix.config.conda_extension }}
if [ ${{ matrix.config.conda_extension }} == "tar.bz2" ]; then
tar xf graphblas-${{ matrix.config.grb_version }}-${{ matrix.config.conda_grb_package_hash }}_0.${{ matrix.config.conda_extension }}
else
unzip graphblas-${{ matrix.config.grb_version }}-${{ matrix.config.conda_grb_package_hash }}_0.${{ matrix.config.conda_extension }}
tar xf pkg-graphblas-${{ matrix.config.grb_version }}-${{ matrix.config.conda_grb_package_hash }}_0.tar.zst
fi
git clone https://github.com/DrTimothyAldenDavis/GraphBLAS.git
cd GraphBLAS
git checkout tags/v${{ matrix.config.grb_version }}
make compact
sudo make install
cd ..
- name: Build project
run: |
export GRAPHBLAS_INCLUDE_DIR=`pwd`/graphblas-binaries/include
export GRAPHBLAS_LIBRARY=`pwd`/graphblas-binaries/lib/libgraphblas.so
export GRAPHBLAS_INCLUDE_DIR=`pwd`/GraphBLAS/include/suitesparse
export GRAPHBLAS_LIBRARY=`pwd`/GraphBLAS/lib/libgraphblas.so
cd build
cmake .. -DCOVERAGE=1 -DGRAPHBLAS_INCLUDE_DIR=${GRAPHBLAS_INCLUDE_DIR} -DGRAPHBLAS_LIBRARY=${GRAPHBLAS_LIBRARY}
JOBS=2 make
make test_coverage
- name: Deploy
uses: JamesIves/[email protected]
if: matrix.config.grb_version == '7.4.1' && github.event_name == 'push' && github.ref == 'refs/heads/stable'
if: matrix.config.deployit && github.event_name == 'push' && github.ref == 'refs/heads/stable'
with:
branch: gh-pages
folder: build/test_coverage/
Expand All @@ -59,9 +55,7 @@ jobs:
strategy:
matrix:
config:
- {grb_version: 7.1.0, conda_grb_package_hash: h7881ed4, conda_extension: tar.bz2}
- {grb_version: 7.3.0, conda_grb_package_hash: ha894c9a, conda_extension: tar.bz2}
- {grb_version: 7.4.1, conda_grb_package_hash: ha894c9a, conda_extension: conda}
- {grb_version: 9.3.1}
steps:
- name: Checkout
uses: actions/[email protected]
Expand All @@ -70,22 +64,18 @@ jobs:
brew tap-new libomp/cask
brew extract --version=14.0.6 libomp libomp/cask
brew install [email protected]
- name: Get GraphBLAS binaries
- name: Build GraphBLAS
run: |
mkdir graphblas-binaries
cd graphblas-binaries
wget --quiet https://anaconda.org/conda-forge/graphblas/${{ matrix.config.grb_version }}/download/osx-64/graphblas-${{ matrix.config.grb_version }}-${{ matrix.config.conda_grb_package_hash }}_0.${{ matrix.config.conda_extension }}
if [ ${{ matrix.config.conda_extension }} == "tar.bz2" ]; then
tar xf graphblas-${{ matrix.config.grb_version }}-${{ matrix.config.conda_grb_package_hash }}_0.${{ matrix.config.conda_extension }}
else
unzip graphblas-${{ matrix.config.grb_version }}-${{ matrix.config.conda_grb_package_hash }}_0.${{ matrix.config.conda_extension }}
tar xf pkg-graphblas-${{ matrix.config.grb_version }}-${{ matrix.config.conda_grb_package_hash }}_0.tar.zst
fi
git clone https://github.com/DrTimothyAldenDavis/GraphBLAS.git
cd GraphBLAS
git checkout tags/v${{ matrix.config.grb_version }}
make compact
sudo make install
cd ..
- name: Build project
run: |
export GRAPHBLAS_INCLUDE_DIR=`pwd`/graphblas-binaries/include
export GRAPHBLAS_LIBRARY=`pwd`/graphblas-binaries/lib/libgraphblas.dylib
export GRAPHBLAS_INCLUDE_DIR=`pwd`/GraphBLAS/include/suitesparse
export GRAPHBLAS_LIBRARY=`pwd`/GraphBLAS/lib/libgraphblas.dylib
# adding an extra line to the CMakeLists.txt file to locate the libomp instance installed by brew
echo 'include_directories("/usr/local/opt/libomp/include")' | cat - CMakeLists.txt
cd build
Expand Down
4 changes: 2 additions & 2 deletions LAGraph/include/LAGraph.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@
// See also the LAGraph_Version utility method, which returns these values.
// These definitions are derived from LAGraph/CMakeLists.txt.

#define LAGRAPH_DATE "Mar 22, 2024"
#define LAGRAPH_DATE "Aug 20, 2024"
#define LAGRAPH_VERSION_MAJOR 1
#define LAGRAPH_VERSION_MINOR 1
#define LAGRAPH_VERSION_UPDATE 3
#define LAGRAPH_VERSION_UPDATE 4

//==============================================================================
// include files and helper macros
Expand Down
14 changes: 12 additions & 2 deletions LAGraph/src/utility/LAGraph_MMWrite.c
Original file line number Diff line number Diff line change
Expand Up @@ -459,8 +459,18 @@ int LAGraph_MMWrite
nvals_to_print = nself_edges + (nvals - nself_edges) / 2 ;
}

FPRINTF (f, "%" PRIu64 " %" PRIu64 " %" PRIu64 "\n",
nrows, ncols, nvals_to_print) ;
if (MM_fmt == MM_array)
{
// write `nrows ncols` if the array format is used
FPRINTF (f, "%" PRIu64 " %" PRIu64 "\n",
nrows, ncols) ;
}
else
{
// otherwise write `nrows ncols nvals` for the coordinate format
FPRINTF (f, "%" PRIu64 " %" PRIu64 " %" PRIu64 "\n",
nrows, ncols, nvals_to_print) ;
}

if (nvals_to_print == 0)
{
Expand Down
10 changes: 8 additions & 2 deletions ParU/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
# cmake 3.22 is required to find the BLAS in SuiteSparse_config
cmake_minimum_required ( VERSION 3.22 )

set ( PARU_DATE "Aug 2, 2024" )
set ( PARU_DATE "Aug 20, 2024" )
set ( PARU_VERSION_MAJOR 0 CACHE STRING "" FORCE )
set ( PARU_VERSION_MINOR 2 CACHE STRING "" FORCE )
set ( PARU_VERSION_MINOR 3 CACHE STRING "" FORCE )
set ( PARU_VERSION_UPDATE 0 CACHE STRING "" FORCE )

message ( STATUS "Building PARU version: v"
Expand Down Expand Up @@ -423,14 +423,20 @@ if ( SUITESPARSE_DEMOS )

if ( PARU_HAS_OPENMP )
add_executable ( paru_demo "Demo/paru_demo.cpp" )
add_executable ( paru_benchmark "Demo/paru_benchmark.cpp" )
if ( BUILD_SHARED_LIBS )
target_link_libraries ( paru_demo PUBLIC ParU )
target_link_libraries ( paru_benchmark PUBLIC ParU )
else ( )
target_link_libraries ( paru_demo PUBLIC ParU_static )
target_link_libraries ( paru_benchmark PUBLIC ParU_static )
endif ( )
target_link_libraries ( paru_demo
PUBLIC SuiteSparse::CHOLMOD SuiteSparse::UMFPACK
SuiteSparse::SuiteSparseConfig OpenMP::OpenMP_CXX )
target_link_libraries ( paru_benchmark
PUBLIC SuiteSparse::CHOLMOD SuiteSparse::UMFPACK
SuiteSparse::SuiteSparseConfig OpenMP::OpenMP_CXX )

add_executable ( paru_democ "Demo/paru_democ.c" )
if ( BUILD_SHARED_LIBS )
Expand Down
1 change: 1 addition & 0 deletions ParU/Config/ParU.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ typedef enum
// int64_t parameter, for ParU_Get only:
PARU_CONTROL_OPENMP = 1013, // if ParU compiled with OpenMP;
// (for ParU_Get only, not set)
PARU_CONTROL_NUM_THREADS = 1014, // actual number of threads used

// double parameters for ParU_Set and ParU_Get:
PARU_CONTROL_PIVOT_TOLERANCE = 2001, // pivot tolerance
Expand Down
3 changes: 3 additions & 0 deletions ParU/Demo/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Ignore the following:
Res
!.gitignore
Loading

0 comments on commit c8c3a9d

Please sign in to comment.