From 275a986cb37fb99739b883b91f0f8fcf867b5279 Mon Sep 17 00:00:00 2001 From: Kevin Nobel Date: Wed, 26 Jun 2024 15:49:36 +0200 Subject: [PATCH 01/21] bug fix for MMWrite (invalid output on array format) for array format, the first non-comment line must contain just two integers --- data/comments_full.mtx | 2 +- src/utility/LAGraph_MMWrite.c | 14 ++++++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/data/comments_full.mtx b/data/comments_full.mtx index 430b7756bb..097bb7a77a 100644 --- a/data/comments_full.mtx +++ b/data/comments_full.mtx @@ -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 diff --git a/src/utility/LAGraph_MMWrite.c b/src/utility/LAGraph_MMWrite.c index 51bd5841c2..4c4c8828f9 100644 --- a/src/utility/LAGraph_MMWrite.c +++ b/src/utility/LAGraph_MMWrite.c @@ -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) { From 0fca67e304eae325d86e82e4f9f71874bc023765 Mon Sep 17 00:00:00 2001 From: Tim Davis Date: Mon, 12 Aug 2024 18:17:22 -0500 Subject: [PATCH 02/21] minor updates to build system for Windows, and bug fix for MMWrite when the matrix is dense --- CMakeLists.txt | 8 ++++---- ChangeLog | 8 ++++++++ experimental/CMakeLists.txt | 2 +- experimental/test/CMakeLists.txt | 2 +- experimental/test/test_BF.c | 2 ++ include/LAGraph.h | 4 ++-- src/CMakeLists.txt | 2 +- src/test/CMakeLists.txt | 2 +- 8 files changed, 20 insertions(+), 10 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c62160797c..90a9350697 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -39,10 +39,10 @@ cmake_minimum_required ( VERSION 3.20 ) # LAGraph can be built stand-alone # version of LAGraph -set ( LAGraph_DATE "Jan 20, 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 2 CACHE STRING "" FORCE ) +set ( LAGraph_VERSION_SUB 4 CACHE STRING "" FORCE ) message ( STATUS "Building LAGraph version: v" ${LAGraph_VERSION_MAJOR}. @@ -247,13 +247,13 @@ elseif ( "${CMAKE_C_COMPILER_ID}" STREQUAL "Intel" ) #if ( CMAKE_C_COMPILER_VERSION VERSION_LESS 18.0 ) # message ( FATAL_ERROR "icc version must be at least 18.0" ) #endif ( ) -elseif ( "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" ) +elseif ( "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" AND NOT "${CMAKE_C_COMPILER_FRONTEND_VARIANT}" STREQUAL "MSVC" ) # options for clang set ( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3 " ) #if ( CMAKE_C_COMPILER_VERSION VERSION_LESS 3.3 ) # message ( FATAL_ERROR "clang version must be at least 3.3" ) #endif ( ) -elseif ( "${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC" ) +elseif ( "${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC" OR "${CMAKE_C_COMPILER_FRONTEND_VARIANT}" STREQUAL "MSVC" ) # options for MicroSoft Visual Studio elseif ( "${CMAKE_C_COMPILER_ID}" STREQUAL "PGI" ) # options for PGI pgcc compiler diff --git a/ChangeLog b/ChangeLog index f7a0f454a3..758ed824e3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +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 + Jan 20, 2024: version 1.1.2 * minor update to build system diff --git a/experimental/CMakeLists.txt b/experimental/CMakeLists.txt index 2caaa1c6d9..217abb9b92 100644 --- a/experimental/CMakeLists.txt +++ b/experimental/CMakeLists.txt @@ -61,7 +61,7 @@ if ( BUILD_STATIC_LIBS ) C_STANDARD 11 PUBLIC_HEADER "include/LAGraphX.h" ) - if ( MSVC ) + if ( MSVC OR ("${CMAKE_C_SIMULATE_ID}" STREQUAL "MSVC") ) set_target_properties ( LAGraphX_static PROPERTIES OUTPUT_NAME lagraphx_static ) endif ( ) diff --git a/experimental/test/CMakeLists.txt b/experimental/test/CMakeLists.txt index 3f72d74b9e..0df29008ae 100644 --- a/experimental/test/CMakeLists.txt +++ b/experimental/test/CMakeLists.txt @@ -62,7 +62,7 @@ if ( BUILD_STATIC_LIBS ) C_STANDARD_REQUIRED ON C_STANDARD 11 ) - if ( MSVC ) + if ( MSVC OR ("${CMAKE_C_SIMULATE_ID}" STREQUAL "MSVC") ) set_target_properties ( lagraphxtest_static PROPERTIES OUTPUT_NAME lagraphxtest_static ) endif ( ) diff --git a/experimental/test/test_BF.c b/experimental/test/test_BF.c index e5e88ff4e6..ad48ca5d68 100644 --- a/experimental/test/test_BF.c +++ b/experimental/test/test_BF.c @@ -396,6 +396,8 @@ 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 diff --git a/include/LAGraph.h b/include/LAGraph.h index 6eed809cb9..8357c8bdb5 100644 --- a/include/LAGraph.h +++ b/include/LAGraph.h @@ -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 "Jan 20, 2024" +#define LAGRAPH_DATE "Aug 20, 2024" #define LAGRAPH_VERSION_MAJOR 1 #define LAGRAPH_VERSION_MINOR 1 -#define LAGRAPH_VERSION_UPDATE 2 +#define LAGRAPH_VERSION_UPDATE 4 //============================================================================== // include files and helper macros diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 09177c73ee..451f0bd2ba 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -63,7 +63,7 @@ if ( BUILD_STATIC_LIBS ) C_STANDARD 11 PUBLIC_HEADER "include/LAGraph.h" ) - if ( MSVC ) + if ( MSVC OR ("${CMAKE_C_SIMULATE_ID}" STREQUAL "MSVC") ) set_target_properties ( LAGraph_static PROPERTIES OUTPUT_NAME lagraph_static ) endif ( ) diff --git a/src/test/CMakeLists.txt b/src/test/CMakeLists.txt index 37e56418ae..db36bd3581 100644 --- a/src/test/CMakeLists.txt +++ b/src/test/CMakeLists.txt @@ -64,7 +64,7 @@ if ( BUILD_STATIC_LIBS ) C_STANDARD_REQUIRED ON C_STANDARD 11 ) - if ( MSVC ) + if ( MSVC OR ("${CMAKE_C_SIMULATE_ID}" STREQUAL "MSVC") ) set_target_properties ( lagraphtest_static PROPERTIES OUTPUT_NAME lagraphtest_static ) endif ( ) From 960b5e782d16444f8917400004a5e518c8b85f76 Mon Sep 17 00:00:00 2001 From: Tim Davis Date: Mon, 12 Aug 2024 18:27:52 -0500 Subject: [PATCH 03/21] add GraphBLAS 9.1.0 to the workflow --- .github/workflows/build.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 26fa99157e..b87e283e09 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,6 +16,7 @@ jobs: - {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} + - {grb_version: 9.1.0, conda_grb_package_hash: hd29ac08, conda_extension: conda} steps: - name: Checkout uses: actions/checkout@v2.0.0 @@ -44,7 +45,7 @@ jobs: make test_coverage - name: Deploy uses: JamesIves/github-pages-deploy-action@4.1.1 - if: matrix.config.grb_version == '7.4.1' && github.event_name == 'push' && github.ref == 'refs/heads/stable' + if: matrix.config.grb_version == '9.1.0' && github.event_name == 'push' && github.ref == 'refs/heads/stable' with: branch: gh-pages folder: build/test_coverage/ @@ -62,6 +63,7 @@ jobs: - {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.1.0, conda_grb_package_hash: heb48c95, conda_extension: conda} steps: - name: Checkout uses: actions/checkout@v2.0.0 From 8187e9b6408f9f6f79dbe40eb4527161f3eaaa76 Mon Sep 17 00:00:00 2001 From: Tim Davis Date: Mon, 12 Aug 2024 18:36:21 -0500 Subject: [PATCH 04/21] FindGraphBLAS for SuiteSparse v9.x and later --- cmake_modules/FindGraphBLAS.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/cmake_modules/FindGraphBLAS.cmake b/cmake_modules/FindGraphBLAS.cmake index 086eaf4351..e73fadf3b7 100644 --- a/cmake_modules/FindGraphBLAS.cmake +++ b/cmake_modules/FindGraphBLAS.cmake @@ -218,6 +218,7 @@ find_path ( GRAPHBLAS_INCLUDE_DIR HINTS ${PROJECT_SOURCE_DIR}/.. HINTS ${PROJECT_SOURCE_DIR}/../GraphBLAS HINTS ${PROJECT_SOURCE_DIR}/../SuiteSparse/GraphBLAS + HINTS ${PROJECT_SOURCE_DIR}/../include/suitesparse PATH_SUFFIXES include Include NO_DEFAULT_PATH ) From f752e20d7847fc0e604fa6f8a408878a37df676d Mon Sep 17 00:00:00 2001 From: Tim Davis Date: Mon, 12 Aug 2024 18:38:23 -0500 Subject: [PATCH 05/21] FindGraphBLAS: looking for GraphBLAS.h --- cmake_modules/FindGraphBLAS.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake_modules/FindGraphBLAS.cmake b/cmake_modules/FindGraphBLAS.cmake index e73fadf3b7..7969f61f87 100644 --- a/cmake_modules/FindGraphBLAS.cmake +++ b/cmake_modules/FindGraphBLAS.cmake @@ -218,8 +218,8 @@ find_path ( GRAPHBLAS_INCLUDE_DIR HINTS ${PROJECT_SOURCE_DIR}/.. HINTS ${PROJECT_SOURCE_DIR}/../GraphBLAS HINTS ${PROJECT_SOURCE_DIR}/../SuiteSparse/GraphBLAS - HINTS ${PROJECT_SOURCE_DIR}/../include/suitesparse - PATH_SUFFIXES include Include + HINTS ${PROJECT_SOURCE_DIR}/../include + PATH_SUFFIXES include Include suitesparse NO_DEFAULT_PATH ) # dynamic SuiteSparse:GraphBLAS library From b672b443e50367e44bee8d7c1e3248a4263506e7 Mon Sep 17 00:00:00 2001 From: Tim Davis Date: Mon, 12 Aug 2024 20:31:03 -0500 Subject: [PATCH 06/21] Finding GraphBLAS, try 3 --- cmake_modules/FindGraphBLAS.cmake | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cmake_modules/FindGraphBLAS.cmake b/cmake_modules/FindGraphBLAS.cmake index 7969f61f87..a51e27f19a 100644 --- a/cmake_modules/FindGraphBLAS.cmake +++ b/cmake_modules/FindGraphBLAS.cmake @@ -69,7 +69,7 @@ CMake looks. #]=======================================================================] -option ( LAGRAPH_DUMP "ON: display list of places to search. OFF (default): no debug output" OFF ) +option ( LAGRAPH_DUMP "ON: display list of places to search. OFF (default): no debug output" ON ) # NB: this is built around assumptions about one particular GraphBLAS # installation (SuiteSparse:GraphBLAS). As other installations become available @@ -218,8 +218,7 @@ find_path ( GRAPHBLAS_INCLUDE_DIR HINTS ${PROJECT_SOURCE_DIR}/.. HINTS ${PROJECT_SOURCE_DIR}/../GraphBLAS HINTS ${PROJECT_SOURCE_DIR}/../SuiteSparse/GraphBLAS - HINTS ${PROJECT_SOURCE_DIR}/../include - PATH_SUFFIXES include Include suitesparse + PATH_SUFFIXES include Include include/suitesparse NO_DEFAULT_PATH ) # dynamic SuiteSparse:GraphBLAS library From 1990a1a90b1d451a0e9c52ccc6157745fbe10d61 Mon Sep 17 00:00:00 2001 From: Tim Davis Date: Mon, 12 Aug 2024 20:41:49 -0500 Subject: [PATCH 07/21] Finding GraphBLAS, try 4 --- .github/workflows/build.yml | 15 ++++++++------- cmake_modules/FindGraphBLAS.cmake | 4 +++- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b87e283e09..f435e22c2c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -13,9 +13,9 @@ 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} +# - {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} - {grb_version: 9.1.0, conda_grb_package_hash: hd29ac08, conda_extension: conda} steps: - name: Checkout @@ -37,7 +37,8 @@ jobs: cd .. - name: Build project run: | - export GRAPHBLAS_INCLUDE_DIR=`pwd`/graphblas-binaries/include +# export GRAPHBLAS_INCLUDE_DIR=`pwd`/graphblas-binaries/include + export GRAPHBLAS_INCLUDE_DIR=`pwd`/graphblas-binaries/include/suitesparse export GRAPHBLAS_LIBRARY=`pwd`/graphblas-binaries/lib/libgraphblas.so cd build cmake .. -DCOVERAGE=1 -DGRAPHBLAS_INCLUDE_DIR=${GRAPHBLAS_INCLUDE_DIR} -DGRAPHBLAS_LIBRARY=${GRAPHBLAS_LIBRARY} @@ -60,9 +61,9 @@ 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: 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.1.0, conda_grb_package_hash: heb48c95, conda_extension: conda} steps: - name: Checkout diff --git a/cmake_modules/FindGraphBLAS.cmake b/cmake_modules/FindGraphBLAS.cmake index a51e27f19a..065d664359 100644 --- a/cmake_modules/FindGraphBLAS.cmake +++ b/cmake_modules/FindGraphBLAS.cmake @@ -218,9 +218,11 @@ find_path ( GRAPHBLAS_INCLUDE_DIR HINTS ${PROJECT_SOURCE_DIR}/.. HINTS ${PROJECT_SOURCE_DIR}/../GraphBLAS HINTS ${PROJECT_SOURCE_DIR}/../SuiteSparse/GraphBLAS - PATH_SUFFIXES include Include include/suitesparse + PATH_SUFFIXES include Include include/suitesparse suitesparse NO_DEFAULT_PATH ) +message ( status "GraphBLAS Include dir: ${GRAPHBLAS_INCLUDE_DIR}" ) + # dynamic SuiteSparse:GraphBLAS library find_library ( GRAPHBLAS_LIBRARY NAMES graphblas From b2405319bdb841b939870e32851a020994e8be97 Mon Sep 17 00:00:00 2001 From: Tim Davis Date: Mon, 12 Aug 2024 20:43:50 -0500 Subject: [PATCH 08/21] workflow --- .github/workflows/build.yml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f435e22c2c..8fb5e79899 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -13,9 +13,6 @@ 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} - {grb_version: 9.1.0, conda_grb_package_hash: hd29ac08, conda_extension: conda} steps: - name: Checkout @@ -37,7 +34,6 @@ jobs: cd .. - name: Build project run: | -# export GRAPHBLAS_INCLUDE_DIR=`pwd`/graphblas-binaries/include export GRAPHBLAS_INCLUDE_DIR=`pwd`/graphblas-binaries/include/suitesparse export GRAPHBLAS_LIBRARY=`pwd`/graphblas-binaries/lib/libgraphblas.so cd build @@ -61,9 +57,6 @@ 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.1.0, conda_grb_package_hash: heb48c95, conda_extension: conda} steps: - name: Checkout From 458abc5c7363b5475278c5c261e0ed20152d1ba9 Mon Sep 17 00:00:00 2001 From: Tim Davis Date: Mon, 12 Aug 2024 20:47:56 -0500 Subject: [PATCH 09/21] on the mac --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8fb5e79899..b02eb2bfed 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -80,7 +80,7 @@ jobs: cd .. - name: Build project run: | - export GRAPHBLAS_INCLUDE_DIR=`pwd`/graphblas-binaries/include + export GRAPHBLAS_INCLUDE_DIR=`pwd`/graphblas-binaries/include/suitesparse export GRAPHBLAS_LIBRARY=`pwd`/graphblas-binaries/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 From be7d6980ac4172c7e0519a2beaeb2c07c4df95ce Mon Sep 17 00:00:00 2001 From: Tim Davis Date: Mon, 12 Aug 2024 21:21:20 -0500 Subject: [PATCH 10/21] turn off LAGRAPH_DUMP in FindGraphBLAS.cmake --- cmake_modules/FindGraphBLAS.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake_modules/FindGraphBLAS.cmake b/cmake_modules/FindGraphBLAS.cmake index 065d664359..27fd9f2d03 100644 --- a/cmake_modules/FindGraphBLAS.cmake +++ b/cmake_modules/FindGraphBLAS.cmake @@ -69,7 +69,7 @@ CMake looks. #]=======================================================================] -option ( LAGRAPH_DUMP "ON: display list of places to search. OFF (default): no debug output" ON ) +option ( LAGRAPH_DUMP "ON: display list of places to search. OFF (default): no debug output" OFF ) # NB: this is built around assumptions about one particular GraphBLAS # installation (SuiteSparse:GraphBLAS). As other installations become available From 3973dfe655881eaa5147db4e13f9567ce2b732fa Mon Sep 17 00:00:00 2001 From: Tim Davis Date: Mon, 12 Aug 2024 21:22:43 -0500 Subject: [PATCH 11/21] restore original FindGraphBLAS.cmake --- cmake_modules/FindGraphBLAS.cmake | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/cmake_modules/FindGraphBLAS.cmake b/cmake_modules/FindGraphBLAS.cmake index 27fd9f2d03..086eaf4351 100644 --- a/cmake_modules/FindGraphBLAS.cmake +++ b/cmake_modules/FindGraphBLAS.cmake @@ -218,11 +218,9 @@ find_path ( GRAPHBLAS_INCLUDE_DIR HINTS ${PROJECT_SOURCE_DIR}/.. HINTS ${PROJECT_SOURCE_DIR}/../GraphBLAS HINTS ${PROJECT_SOURCE_DIR}/../SuiteSparse/GraphBLAS - PATH_SUFFIXES include Include include/suitesparse suitesparse + PATH_SUFFIXES include Include NO_DEFAULT_PATH ) -message ( status "GraphBLAS Include dir: ${GRAPHBLAS_INCLUDE_DIR}" ) - # dynamic SuiteSparse:GraphBLAS library find_library ( GRAPHBLAS_LIBRARY NAMES graphblas From 5906d785d01b6f3316266cf5798584d86b4e86d1 Mon Sep 17 00:00:00 2001 From: Michel Pelletier Date: Wed, 14 Aug 2024 09:50:21 -0700 Subject: [PATCH 12/21] take stab and builtin graphblas build. --- .github/workflows/new_build.yml | 85 +++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 .github/workflows/new_build.yml diff --git a/.github/workflows/new_build.yml b/.github/workflows/new_build.yml new file mode 100644 index 0000000000..fe3793f9fc --- /dev/null +++ b/.github/workflows/new_build.yml @@ -0,0 +1,85 @@ +name: LAGraph CI with Builtin GraphBLAS + +on: + workflow_dispatch: + push: + branches-ignore: + - '**/*dev2' + pull_request: + +jobs: + linux: + runs-on: ubuntu-22.04 + strategy: + matrix: + config: + - {grb_version: 9.3.1} + steps: + - name: Checkout + uses: actions/checkout@v2.0.0 + - name: Install tools for build + run: | + sudo apt install -y lcov + - name: Get GraphBLAS binaries + run: | + git clone https://github.com/DrTimothyAldenDavis/GraphBLAS.git + cd GraphBLAS + git checkout tags/v${{ matrix.config.grb_version }} + make && make install + cd .. + - name: Build project + run: | + 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/github-pages-deploy-action@4.1.1 + # if: matrix.config.grb_version == '9.1.0' && github.event_name == 'push' && github.ref == 'refs/heads/stable' + # with: + # branch: gh-pages + # folder: build/test_coverage/ + # single-commit: true + # - name: Save output + # uses: actions/upload-artifact@v2.2.3 + # with: + # name: test_coverage + # path: build/test_coverage/ + # macos: + # runs-on: macos-12 + # strategy: + # matrix: + # config: + # - {grb_version: 9.1.0, conda_grb_package_hash: heb48c95, conda_extension: conda} + # steps: + # - name: Checkout + # uses: actions/checkout@v2.0.0 + # - name: Install dependencies + # run: | + # brew tap-new libomp/cask + # brew extract --version=14.0.6 libomp libomp/cask + # brew install libomp@14.0.6 + # - name: Get GraphBLAS binaries + # 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 + # cd .. + # - name: Build project + # run: | + # export GRAPHBLAS_INCLUDE_DIR=`pwd`/graphblas-binaries/include/suitesparse + # export GRAPHBLAS_LIBRARY=`pwd`/graphblas-binaries/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 + # CC=gcc cmake .. -DGRAPHBLAS_INCLUDE_DIR=${GRAPHBLAS_INCLUDE_DIR} -DGRAPHBLAS_LIBRARY=${GRAPHBLAS_LIBRARY} + # JOBS=2 make + # make test From e9693f99d7b751345fbdd8f72f42ffd8921d48aa Mon Sep 17 00:00:00 2001 From: Michel Pelletier Date: Wed, 14 Aug 2024 10:19:19 -0700 Subject: [PATCH 13/21] make compact. --- .github/workflows/new_build.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/new_build.yml b/.github/workflows/new_build.yml index fe3793f9fc..243e524ce2 100644 --- a/.github/workflows/new_build.yml +++ b/.github/workflows/new_build.yml @@ -25,7 +25,8 @@ jobs: git clone https://github.com/DrTimothyAldenDavis/GraphBLAS.git cd GraphBLAS git checkout tags/v${{ matrix.config.grb_version }} - make && make install + make compact + sudo make install cd .. - name: Build project run: | From 10d4de081eff884321ae885c824cac2a769b7b0d Mon Sep 17 00:00:00 2001 From: Michel Pelletier Date: Wed, 14 Aug 2024 20:21:46 -0700 Subject: [PATCH 14/21] change path names for lagraph build, not necessary since make install puts it in system path but more correct if Tim has some reason for being specific. --- .github/workflows/new_build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/new_build.yml b/.github/workflows/new_build.yml index 243e524ce2..b9811f1b27 100644 --- a/.github/workflows/new_build.yml +++ b/.github/workflows/new_build.yml @@ -30,8 +30,8 @@ jobs: cd .. - name: Build project run: | - export GRAPHBLAS_INCLUDE_DIR=`pwd`/graphblas/include/suitesparse - export GRAPHBLAS_LIBRARY=`pwd`/graphblas/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 From 3a1ce93d583873696f49948c92ff817e33ed10d2 Mon Sep 17 00:00:00 2001 From: Michel Pelletier Date: Thu, 15 Aug 2024 09:40:24 -0700 Subject: [PATCH 15/21] stab at macos --- .github/workflows/new_build.yml | 92 ++++++++++++++++----------------- 1 file changed, 44 insertions(+), 48 deletions(-) diff --git a/.github/workflows/new_build.yml b/.github/workflows/new_build.yml index b9811f1b27..a1e5aa7129 100644 --- a/.github/workflows/new_build.yml +++ b/.github/workflows/new_build.yml @@ -36,51 +36,47 @@ jobs: cmake .. -DCOVERAGE=1 -DGRAPHBLAS_INCLUDE_DIR=${GRAPHBLAS_INCLUDE_DIR} -DGRAPHBLAS_LIBRARY=${GRAPHBLAS_LIBRARY} JOBS=2 make make test_coverage - # - name: Deploy - # uses: JamesIves/github-pages-deploy-action@4.1.1 - # if: matrix.config.grb_version == '9.1.0' && github.event_name == 'push' && github.ref == 'refs/heads/stable' - # with: - # branch: gh-pages - # folder: build/test_coverage/ - # single-commit: true - # - name: Save output - # uses: actions/upload-artifact@v2.2.3 - # with: - # name: test_coverage - # path: build/test_coverage/ - # macos: - # runs-on: macos-12 - # strategy: - # matrix: - # config: - # - {grb_version: 9.1.0, conda_grb_package_hash: heb48c95, conda_extension: conda} - # steps: - # - name: Checkout - # uses: actions/checkout@v2.0.0 - # - name: Install dependencies - # run: | - # brew tap-new libomp/cask - # brew extract --version=14.0.6 libomp libomp/cask - # brew install libomp@14.0.6 - # - name: Get GraphBLAS binaries - # 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 - # cd .. - # - name: Build project - # run: | - # export GRAPHBLAS_INCLUDE_DIR=`pwd`/graphblas-binaries/include/suitesparse - # export GRAPHBLAS_LIBRARY=`pwd`/graphblas-binaries/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 - # CC=gcc cmake .. -DGRAPHBLAS_INCLUDE_DIR=${GRAPHBLAS_INCLUDE_DIR} -DGRAPHBLAS_LIBRARY=${GRAPHBLAS_LIBRARY} - # JOBS=2 make - # make test + - name: Deploy + uses: JamesIves/github-pages-deploy-action@4.1.1 + if: matrix.config.grb_version == '9.1.0' && github.event_name == 'push' && github.ref == 'refs/heads/stable' + with: + branch: gh-pages + folder: build/test_coverage/ + single-commit: true + - name: Save output + uses: actions/upload-artifact@v2.2.3 + with: + name: test_coverage + path: build/test_coverage/ + macos: + runs-on: macos-12 + strategy: + matrix: + config: + - {grb_version: 9.3.1} + steps: + - name: Checkout + uses: actions/checkout@v2.0.0 + - name: Install dependencies + run: | + brew tap-new libomp/cask + brew extract --version=14.0.6 libomp libomp/cask + brew install libomp@14.0.6 + - name: Get GraphBLAS binaries + run: | + 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/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 + CC=gcc cmake .. -DGRAPHBLAS_INCLUDE_DIR=${GRAPHBLAS_INCLUDE_DIR} -DGRAPHBLAS_LIBRARY=${GRAPHBLAS_LIBRARY} + JOBS=2 make + make test From 8d3d76270b9eb96b8a3b0a6f5c17894ce651c9d4 Mon Sep 17 00:00:00 2001 From: Tim Davis Date: Thu, 15 Aug 2024 12:24:26 -0500 Subject: [PATCH 16/21] remove debug printfs from test_BF.c --- experimental/test/test_BF.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/experimental/test/test_BF.c b/experimental/test/test_BF.c index ad48ca5d68..e5e88ff4e6 100644 --- a/experimental/test/test_BF.c +++ b/experimental/test/test_BF.c @@ -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 From 89bf3a0511100866935dabb7493f3696c5e59878 Mon Sep 17 00:00:00 2001 From: Michel Pelletier Date: Thu, 15 Aug 2024 10:33:05 -0700 Subject: [PATCH 17/21] move new build over to build. --- .github/workflows/build.yml | 46 ++++++++---------- .github/workflows/new_build.yml | 82 --------------------------------- 2 files changed, 19 insertions(+), 109 deletions(-) delete mode 100644 .github/workflows/new_build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b02eb2bfed..3a76340ad9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,4 +1,4 @@ -name: LAGraph CI +name: LAGraph CI with Builtin GraphBLAS on: workflow_dispatch: @@ -13,29 +13,25 @@ jobs: strategy: matrix: config: - - {grb_version: 9.1.0, conda_grb_package_hash: hd29ac08, conda_extension: conda} + - {grb_version: 9.3.1} steps: - name: Checkout uses: actions/checkout@v2.0.0 - 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/suitesparse - 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 @@ -57,7 +53,7 @@ jobs: strategy: matrix: config: - - {grb_version: 9.1.0, conda_grb_package_hash: heb48c95, conda_extension: conda} + - {grb_version: 9.3.1} steps: - name: Checkout uses: actions/checkout@v2.0.0 @@ -66,22 +62,18 @@ jobs: brew tap-new libomp/cask brew extract --version=14.0.6 libomp libomp/cask brew install libomp@14.0.6 - - 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/suitesparse - 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 diff --git a/.github/workflows/new_build.yml b/.github/workflows/new_build.yml deleted file mode 100644 index a1e5aa7129..0000000000 --- a/.github/workflows/new_build.yml +++ /dev/null @@ -1,82 +0,0 @@ -name: LAGraph CI with Builtin GraphBLAS - -on: - workflow_dispatch: - push: - branches-ignore: - - '**/*dev2' - pull_request: - -jobs: - linux: - runs-on: ubuntu-22.04 - strategy: - matrix: - config: - - {grb_version: 9.3.1} - steps: - - name: Checkout - uses: actions/checkout@v2.0.0 - - name: Install tools for build - run: | - sudo apt install -y lcov - - name: Get GraphBLAS binaries - run: | - 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/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/github-pages-deploy-action@4.1.1 - if: matrix.config.grb_version == '9.1.0' && github.event_name == 'push' && github.ref == 'refs/heads/stable' - with: - branch: gh-pages - folder: build/test_coverage/ - single-commit: true - - name: Save output - uses: actions/upload-artifact@v2.2.3 - with: - name: test_coverage - path: build/test_coverage/ - macos: - runs-on: macos-12 - strategy: - matrix: - config: - - {grb_version: 9.3.1} - steps: - - name: Checkout - uses: actions/checkout@v2.0.0 - - name: Install dependencies - run: | - brew tap-new libomp/cask - brew extract --version=14.0.6 libomp libomp/cask - brew install libomp@14.0.6 - - name: Get GraphBLAS binaries - run: | - 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/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 - CC=gcc cmake .. -DGRAPHBLAS_INCLUDE_DIR=${GRAPHBLAS_INCLUDE_DIR} -DGRAPHBLAS_LIBRARY=${GRAPHBLAS_LIBRARY} - JOBS=2 make - make test From fa693bcaf9e1b61768c264a4f57259aedb25816d Mon Sep 17 00:00:00 2001 From: Tim Davis Date: Wed, 21 Aug 2024 14:57:04 -0500 Subject: [PATCH 18/21] CI: deploy test coverage for only one entry in the CI matrix --- .github/workflows/build.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3a76340ad9..f1562e1b0f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -13,7 +13,9 @@ jobs: strategy: matrix: config: - - {grb_version: 9.3.1} + # 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/checkout@v2.0.0 @@ -38,7 +40,7 @@ jobs: make test_coverage - name: Deploy uses: JamesIves/github-pages-deploy-action@4.1.1 - if: matrix.config.grb_version == '9.1.0' && 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/ From 432aa3382431cf5115c023b80552e384859bc115 Mon Sep 17 00:00:00 2001 From: Michel Pelletier Date: Thu, 29 Aug 2024 08:53:59 -0700 Subject: [PATCH 19/21] Add os config for rtd build. --- .readthedocs.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 7eb49372af..a30fa13251 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -2,6 +2,11 @@ version: 2 +build: + os: ubuntu-22.04 + tools: + python: "3.12" + formats: - pdf From 414ec314e715b4e4c1b984156edc56768d16878e Mon Sep 17 00:00:00 2001 From: Michel Pelletier Date: Fri, 30 Aug 2024 08:54:59 -0700 Subject: [PATCH 20/21] update sphinx version to work with python312 --- rtdocs/requirements.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rtdocs/requirements.txt b/rtdocs/requirements.txt index d1fc996b1f..35a5197155 100644 --- a/rtdocs/requirements.txt +++ b/rtdocs/requirements.txt @@ -1,3 +1,3 @@ -sphinx==4.0.3 -sphinx_rtd_theme>=0.5.2 -breathe \ No newline at end of file +sphinx==8.0.2 +sphinx_rtd_theme +breathe From a0f545a584d0c463e49d3ae03d43cb5e93eb9bd4 Mon Sep 17 00:00:00 2001 From: Michel Pelletier Date: Fri, 30 Aug 2024 10:10:45 -0700 Subject: [PATCH 21/21] unpin all requirements see if we can get it to work with PR. --- rtdocs/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rtdocs/requirements.txt b/rtdocs/requirements.txt index 35a5197155..baeb2ce4f3 100644 --- a/rtdocs/requirements.txt +++ b/rtdocs/requirements.txt @@ -1,3 +1,3 @@ -sphinx==8.0.2 +sphinx sphinx_rtd_theme breathe