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

v1.1.4 #255

Merged
merged 20 commits into from
Aug 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
275a986
bug fix for MMWrite (invalid output on array format)
tweska Jun 26, 2024
64a629f
Merge pull request #253 from tweska/knobel
DrTimothyAldenDavis Jul 1, 2024
0fca67e
minor updates to build system for Windows, and bug fix for MMWrite wh…
DrTimothyAldenDavis Aug 12, 2024
960b5e7
add GraphBLAS 9.1.0 to the workflow
DrTimothyAldenDavis Aug 12, 2024
8187e9b
FindGraphBLAS for SuiteSparse v9.x and later
DrTimothyAldenDavis Aug 12, 2024
f752e20
FindGraphBLAS: looking for GraphBLAS.h
DrTimothyAldenDavis Aug 12, 2024
b672b44
Finding GraphBLAS, try 3
DrTimothyAldenDavis Aug 13, 2024
1990a1a
Finding GraphBLAS, try 4
DrTimothyAldenDavis Aug 13, 2024
b240531
workflow
DrTimothyAldenDavis Aug 13, 2024
458abc5
on the mac
DrTimothyAldenDavis Aug 13, 2024
be7d698
turn off LAGRAPH_DUMP in FindGraphBLAS.cmake
DrTimothyAldenDavis Aug 13, 2024
3973dfe
restore original FindGraphBLAS.cmake
DrTimothyAldenDavis Aug 13, 2024
5906d78
take stab and builtin graphblas build.
michelp Aug 14, 2024
e9693f9
make compact.
michelp Aug 14, 2024
10d4de0
change path names for lagraph build, not necessary since make install…
michelp Aug 15, 2024
3a1ce93
stab at macos
michelp Aug 15, 2024
8d3d762
remove debug printfs from test_BF.c
DrTimothyAldenDavis Aug 15, 2024
89bf3a0
move new build over to build.
michelp Aug 15, 2024
dd43e4f
Merge pull request #256 from GraphBLAS/michelp/v1.1-builtin-graphblas…
DrTimothyAldenDavis Aug 15, 2024
fa693bc
CI: deploy test coverage for only one entry in the CI matrix
DrTimothyAldenDavis Aug 21, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 22 additions & 32 deletions .github/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
8 changes: 4 additions & 4 deletions 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 "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}.
Expand Down Expand Up @@ -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
Expand Down
8 changes: 8 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion 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: 1 addition & 1 deletion experimental/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 ( )
Expand Down
2 changes: 1 addition & 1 deletion experimental/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 ( )
Expand Down
4 changes: 2 additions & 2 deletions 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 "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
Expand Down
2 changes: 1 addition & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 ( )
Expand Down
2 changes: 1 addition & 1 deletion src/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 ( )
Expand Down
14 changes: 12 additions & 2 deletions 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
Loading