Skip to content

Commit 8a1cfcf

Browse files
Merge pull request #255 from GraphBLAS/v1.1_branch
v1.1.4
2 parents 3b461aa + fa693bc commit 8a1cfcf

File tree

10 files changed

+53
-45
lines changed

10 files changed

+53
-45
lines changed

Diff for: .github/workflows/build.yml

+22-32
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: LAGraph CI
1+
name: LAGraph CI with Builtin GraphBLAS
22

33
on:
44
workflow_dispatch:
@@ -13,38 +13,34 @@ jobs:
1313
strategy:
1414
matrix:
1515
config:
16-
- {grb_version: 7.1.0, conda_grb_package_hash: h27087fc, conda_extension: tar.bz2}
17-
- {grb_version: 7.3.0, conda_grb_package_hash: h27087fc, conda_extension: tar.bz2}
18-
- {grb_version: 7.4.1, conda_grb_package_hash: hcb278e6, conda_extension: conda}
16+
# if there are multiple items in this list, only use should
17+
# deployit=true for just one of them.
18+
- {grb_version: 9.3.1, deployit: true}
1919
steps:
2020
- name: Checkout
2121
uses: actions/[email protected]
2222
- name: Install tools for build
2323
run: |
2424
sudo apt install -y lcov
25-
- name: Get GraphBLAS binaries
25+
- name: Build GraphBLAS
2626
run: |
27-
mkdir graphblas-binaries
28-
cd graphblas-binaries
29-
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 }}
30-
if [ ${{ matrix.config.conda_extension }} == "tar.bz2" ]; then
31-
tar xf graphblas-${{ matrix.config.grb_version }}-${{ matrix.config.conda_grb_package_hash }}_0.${{ matrix.config.conda_extension }}
32-
else
33-
unzip graphblas-${{ matrix.config.grb_version }}-${{ matrix.config.conda_grb_package_hash }}_0.${{ matrix.config.conda_extension }}
34-
tar xf pkg-graphblas-${{ matrix.config.grb_version }}-${{ matrix.config.conda_grb_package_hash }}_0.tar.zst
35-
fi
27+
git clone https://github.com/DrTimothyAldenDavis/GraphBLAS.git
28+
cd GraphBLAS
29+
git checkout tags/v${{ matrix.config.grb_version }}
30+
make compact
31+
sudo make install
3632
cd ..
3733
- name: Build project
3834
run: |
39-
export GRAPHBLAS_INCLUDE_DIR=`pwd`/graphblas-binaries/include
40-
export GRAPHBLAS_LIBRARY=`pwd`/graphblas-binaries/lib/libgraphblas.so
35+
export GRAPHBLAS_INCLUDE_DIR=`pwd`/GraphBLAS/include/suitesparse
36+
export GRAPHBLAS_LIBRARY=`pwd`/GraphBLAS/lib/libgraphblas.so
4137
cd build
4238
cmake .. -DCOVERAGE=1 -DGRAPHBLAS_INCLUDE_DIR=${GRAPHBLAS_INCLUDE_DIR} -DGRAPHBLAS_LIBRARY=${GRAPHBLAS_LIBRARY}
4339
JOBS=2 make
4440
make test_coverage
4541
- name: Deploy
4642
uses: JamesIves/[email protected]
47-
if: matrix.config.grb_version == '7.4.1' && github.event_name == 'push' && github.ref == 'refs/heads/stable'
43+
if: matrix.config.deployit && github.event_name == 'push' && github.ref == 'refs/heads/stable'
4844
with:
4945
branch: gh-pages
5046
folder: build/test_coverage/
@@ -59,9 +55,7 @@ jobs:
5955
strategy:
6056
matrix:
6157
config:
62-
- {grb_version: 7.1.0, conda_grb_package_hash: h7881ed4, conda_extension: tar.bz2}
63-
- {grb_version: 7.3.0, conda_grb_package_hash: ha894c9a, conda_extension: tar.bz2}
64-
- {grb_version: 7.4.1, conda_grb_package_hash: ha894c9a, conda_extension: conda}
58+
- {grb_version: 9.3.1}
6559
steps:
6660
- name: Checkout
6761
uses: actions/[email protected]
@@ -70,22 +64,18 @@ jobs:
7064
brew tap-new libomp/cask
7165
brew extract --version=14.0.6 libomp libomp/cask
7266
brew install [email protected]
73-
- name: Get GraphBLAS binaries
67+
- name: Build GraphBLAS
7468
run: |
75-
mkdir graphblas-binaries
76-
cd graphblas-binaries
77-
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 }}
78-
if [ ${{ matrix.config.conda_extension }} == "tar.bz2" ]; then
79-
tar xf graphblas-${{ matrix.config.grb_version }}-${{ matrix.config.conda_grb_package_hash }}_0.${{ matrix.config.conda_extension }}
80-
else
81-
unzip graphblas-${{ matrix.config.grb_version }}-${{ matrix.config.conda_grb_package_hash }}_0.${{ matrix.config.conda_extension }}
82-
tar xf pkg-graphblas-${{ matrix.config.grb_version }}-${{ matrix.config.conda_grb_package_hash }}_0.tar.zst
83-
fi
69+
git clone https://github.com/DrTimothyAldenDavis/GraphBLAS.git
70+
cd GraphBLAS
71+
git checkout tags/v${{ matrix.config.grb_version }}
72+
make compact
73+
sudo make install
8474
cd ..
8575
- name: Build project
8676
run: |
87-
export GRAPHBLAS_INCLUDE_DIR=`pwd`/graphblas-binaries/include
88-
export GRAPHBLAS_LIBRARY=`pwd`/graphblas-binaries/lib/libgraphblas.dylib
77+
export GRAPHBLAS_INCLUDE_DIR=`pwd`/GraphBLAS/include/suitesparse
78+
export GRAPHBLAS_LIBRARY=`pwd`/GraphBLAS/lib/libgraphblas.dylib
8979
# adding an extra line to the CMakeLists.txt file to locate the libomp instance installed by brew
9080
echo 'include_directories("/usr/local/opt/libomp/include")' | cat - CMakeLists.txt
9181
cd build

Diff for: CMakeLists.txt

+4-4
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@
3939
cmake_minimum_required ( VERSION 3.20 ) # LAGraph can be built stand-alone
4040

4141
# version of LAGraph
42-
set ( LAGraph_DATE "Jan 20, 2024" )
42+
set ( LAGraph_DATE "Aug 20, 2024" )
4343
set ( LAGraph_VERSION_MAJOR 1 CACHE STRING "" FORCE )
4444
set ( LAGraph_VERSION_MINOR 1 CACHE STRING "" FORCE )
45-
set ( LAGraph_VERSION_SUB 2 CACHE STRING "" FORCE )
45+
set ( LAGraph_VERSION_SUB 4 CACHE STRING "" FORCE )
4646

4747
message ( STATUS "Building LAGraph version: v"
4848
${LAGraph_VERSION_MAJOR}.
@@ -247,13 +247,13 @@ elseif ( "${CMAKE_C_COMPILER_ID}" STREQUAL "Intel" )
247247
#if ( CMAKE_C_COMPILER_VERSION VERSION_LESS 18.0 )
248248
# message ( FATAL_ERROR "icc version must be at least 18.0" )
249249
#endif ( )
250-
elseif ( "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" )
250+
elseif ( "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" AND NOT "${CMAKE_C_COMPILER_FRONTEND_VARIANT}" STREQUAL "MSVC" )
251251
# options for clang
252252
set ( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3 " )
253253
#if ( CMAKE_C_COMPILER_VERSION VERSION_LESS 3.3 )
254254
# message ( FATAL_ERROR "clang version must be at least 3.3" )
255255
#endif ( )
256-
elseif ( "${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC" )
256+
elseif ( "${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC" OR "${CMAKE_C_COMPILER_FRONTEND_VARIANT}" STREQUAL "MSVC" )
257257
# options for MicroSoft Visual Studio
258258
elseif ( "${CMAKE_C_COMPILER_ID}" STREQUAL "PGI" )
259259
# options for PGI pgcc compiler

Diff for: ChangeLog

+8
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
Aug 20, 2024: version 1.1.4
2+
3+
* fix MMWrite when matrix is dense
4+
5+
Mar 22, 2024: version 1.1.3
6+
7+
* minor updates to build system
8+
19
Jan 20, 2024: version 1.1.2
210

311
* minor update to build system

Diff for: data/comments_full.mtx

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
%%GraphBLAS type double
33
% comments for full.mtx
44
% this file was created by test_MMRead.c
5-
3 3 9
5+
3 3
66
.646
77
.709
88
.754

Diff for: experimental/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ if ( BUILD_STATIC_LIBS )
6161
C_STANDARD 11
6262
PUBLIC_HEADER "include/LAGraphX.h" )
6363

64-
if ( MSVC )
64+
if ( MSVC OR ("${CMAKE_C_SIMULATE_ID}" STREQUAL "MSVC") )
6565
set_target_properties ( LAGraphX_static PROPERTIES
6666
OUTPUT_NAME lagraphx_static )
6767
endif ( )

Diff for: experimental/test/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ if ( BUILD_STATIC_LIBS )
6262
C_STANDARD_REQUIRED ON
6363
C_STANDARD 11 )
6464

65-
if ( MSVC )
65+
if ( MSVC OR ("${CMAKE_C_SIMULATE_ID}" STREQUAL "MSVC") )
6666
set_target_properties ( lagraphxtest_static PROPERTIES
6767
OUTPUT_NAME lagraphxtest_static )
6868
endif ( )

Diff for: include/LAGraph.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@
3737
// See also the LAGraph_Version utility method, which returns these values.
3838
// These definitions are derived from LAGraph/CMakeLists.txt.
3939

40-
#define LAGRAPH_DATE "Jan 20, 2024"
40+
#define LAGRAPH_DATE "Aug 20, 2024"
4141
#define LAGRAPH_VERSION_MAJOR 1
4242
#define LAGRAPH_VERSION_MINOR 1
43-
#define LAGRAPH_VERSION_UPDATE 2
43+
#define LAGRAPH_VERSION_UPDATE 4
4444

4545
//==============================================================================
4646
// include files and helper macros

Diff for: src/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ if ( BUILD_STATIC_LIBS )
6363
C_STANDARD 11
6464
PUBLIC_HEADER "include/LAGraph.h" )
6565

66-
if ( MSVC )
66+
if ( MSVC OR ("${CMAKE_C_SIMULATE_ID}" STREQUAL "MSVC") )
6767
set_target_properties ( LAGraph_static PROPERTIES
6868
OUTPUT_NAME lagraph_static )
6969
endif ( )

Diff for: src/test/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ if ( BUILD_STATIC_LIBS )
6464
C_STANDARD_REQUIRED ON
6565
C_STANDARD 11 )
6666

67-
if ( MSVC )
67+
if ( MSVC OR ("${CMAKE_C_SIMULATE_ID}" STREQUAL "MSVC") )
6868
set_target_properties ( lagraphtest_static PROPERTIES
6969
OUTPUT_NAME lagraphtest_static )
7070
endif ( )

Diff for: src/utility/LAGraph_MMWrite.c

+12-2
Original file line numberDiff line numberDiff line change
@@ -459,8 +459,18 @@ int LAGraph_MMWrite
459459
nvals_to_print = nself_edges + (nvals - nself_edges) / 2 ;
460460
}
461461

462-
FPRINTF (f, "%" PRIu64 " %" PRIu64 " %" PRIu64 "\n",
463-
nrows, ncols, nvals_to_print) ;
462+
if (MM_fmt == MM_array)
463+
{
464+
// write `nrows ncols` if the array format is used
465+
FPRINTF (f, "%" PRIu64 " %" PRIu64 "\n",
466+
nrows, ncols) ;
467+
}
468+
else
469+
{
470+
// otherwise write `nrows ncols nvals` for the coordinate format
471+
FPRINTF (f, "%" PRIu64 " %" PRIu64 " %" PRIu64 "\n",
472+
nrows, ncols, nvals_to_print) ;
473+
}
464474

465475
if (nvals_to_print == 0)
466476
{

0 commit comments

Comments
 (0)