Skip to content

Commit ccf4c9e

Browse files
v5.1.0
1 parent 0ecd652 commit ccf4c9e

File tree

129 files changed

+5698
-3168
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

129 files changed

+5698
-3168
lines changed

ChangeLog

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
Dec 1, 2017: SuiteSparse 5.1.0
2+
3+
* GraphBLAS 1.1.0
4+
* minor update to SPQR Makefile (version remains unchanged;
5+
no change to source)
6+
17
Nov 25, 2017: SuiteSparse 5.0.0
28

39
* added GraphBLAS Version 1.0.0

GraphBLAS/CMakeLists.txt

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,19 +59,28 @@ if ("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU")
5959
# cmake 2.8 workaround: gcc needs to be told to do ANSI C11.
6060
# cmake 3.0 doesn't have this problem.
6161
set (CMAKE_C_FLAGS "-std=c11 -lm")
62+
if (CMAKE_C_COMPILER_VERSION VERSION_LESS 4.9)
63+
message (FATAL_ERROR "gcc version must be at least 4.9")
64+
endif ( )
6265
elseif ("${CMAKE_C_COMPILER_ID}" STREQUAL "Intel")
6366
# options for icc: also needs -std=c11
6467
set (CMAKE_C_FLAGS "-std=c11")
68+
if (CMAKE_C_COMPILER_VERSION VERSION_LESS 18.0)
69+
message (FATAL_ERROR "icc version must be at least 18.0")
70+
endif ( )
6571
elseif ("${CMAKE_C_COMPILER_ID}" STREQUAL "Clang")
6672
# options for clang
73+
if (CMAKE_C_COMPILER_VERSION VERSION_LESS 3.3)
74+
message (FATAL_ERROR "clang version must be at least 3.3")
75+
endif ( )
6776
elseif ("${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC")
6877
# options for MicroSoft Visual Studio
6978
endif ( )
7079

7180
# create the graphblas library. Requires ANSI C11
7281
file ( GLOB GRAPHBLAS_SOURCES "Source/*.c" )
7382
add_library ( graphblas SHARED ${GRAPHBLAS_SOURCES} )
74-
SET_TARGET_PROPERTIES ( graphblas PROPERTIES VERSION 1.0.0
83+
SET_TARGET_PROPERTIES ( graphblas PROPERTIES VERSION 1.1.0
7584
SOVERSION 1
7685
C_STANDARD_REQUIRED 11
7786
PUBLIC_HEADER "Include/GraphBLAS.h" )

GraphBLAS/Demo/Output/bfs_demo.out

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ must be identical to monoid operator z=or(x,y) of type [bool]
112112
=================================================================
113113
SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017, All Rights Reserved.
114114
http://suitesparse.com Dept of Computer Sci. & Eng, Texas A&M University
115-
SuiteSparse:GraphBLAS version: 1.0.0 Date: Nov 25, 2017
115+
SuiteSparse:GraphBLAS version: 1.1.0 Date: Dec 1, 2017
116116
SuiteSparse:GraphBLAS, Copyright 2017, Timothy A. Davis
117117

118118
Licensed under the Apache License, Version 2.0 (the "License");
@@ -178,7 +178,7 @@ must be identical to monoid operator z=or(x,y) of type [bool]
178178
=================================================================
179179
SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017, All Rights Reserved.
180180
http://suitesparse.com Dept of Computer Sci. & Eng, Texas A&M University
181-
SuiteSparse:GraphBLAS version: 1.0.0 Date: Nov 25, 2017
181+
SuiteSparse:GraphBLAS version: 1.1.0 Date: Dec 1, 2017
182182
SuiteSparse:GraphBLAS, Copyright 2017, Timothy A. Davis
183183

184184
Licensed under the Apache License, Version 2.0 (the "License");

GraphBLAS/Demo/Program/bfs_demo.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ int main (int argc, char **argv)
6767
A2 = A ;
6868

6969
GrB_Type atype ;
70-
OK (GrB_Matrix_type (&atype, A)) ;
70+
OK (GxB_Matrix_type (&atype, A)) ;
7171
if (atype != GrB_BOOL)
7272
{
7373
GrB_Matrix_new (&Abool, GrB_BOOL, n, n) ;
@@ -129,7 +129,7 @@ int main (int argc, char **argv)
129129

130130
OK (GrB_Vector_new (&is_reachable, GrB_BOOL, n)) ;
131131
OK (GrB_apply (is_reachable, NULL, NULL, GrB_IDENTITY_BOOL, v, NULL)) ;
132-
OK (GrB_reduce (&nreachable, NULL, GrB_PLUS_INT32_MONOID, is_reachable, NULL)) ;
132+
OK (GrB_reduce (&nreachable, NULL, GxB_PLUS_INT32_MONOID, is_reachable, NULL)) ;
133133
OK (GrB_free (&is_reachable)) ;
134134
// OK (GrB_Vector_nvals (&nreachable, v)) ;
135135
printf ("nodes reachable from node %.16g: %.16g out of %.16g\n",
@@ -141,7 +141,7 @@ int main (int argc, char **argv)
141141

142142
// find the max BFS level
143143
int64_t nlevels = -1 ;
144-
OK (GrB_reduce (&nlevels, NULL, GrB_MAX_INT32_MONOID, v, NULL)) ;
144+
OK (GrB_reduce (&nlevels, NULL, GxB_MAX_INT32_MONOID, v, NULL)) ;
145145
printf ("max BFS level: %.16g\n", (double) nlevels) ;
146146

147147
fprintf (stderr, "nodes reached: %.16g of %.16g levels: %.16g "

GraphBLAS/Demo/Program/mis_demo.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,16 +104,16 @@ int main (int argc, char **argv)
104104
OK (GrB_eWiseAdd (e, NULL, NULL, GrB_EQ_BOOL, iset, iset2, NULL)) ;
105105

106106
bool a ;
107-
OK (GrB_reduce (&a, NULL, GrB_LAND_BOOL_MONOID, e, NULL)) ;
107+
OK (GrB_reduce (&a, NULL, GxB_LAND_BOOL_MONOID, e, NULL)) ;
108108
if (!a) { printf ("error!\n") ; exit (1) ; }
109109

110110
int64_t isize1 ;
111-
OK (GrB_reduce (&isize1, NULL, GrB_PLUS_INT64_MONOID, iset,
111+
OK (GrB_reduce (&isize1, NULL, GxB_PLUS_INT64_MONOID, iset,
112112
NULL)) ;
113113
printf ("isize: %.16g\n", (double) isize1) ;
114114

115115
int64_t isize2 ;
116-
OK (GrB_reduce (&isize2, NULL, GrB_PLUS_INT64_MONOID, iset2,
116+
OK (GrB_reduce (&isize2, NULL, GxB_PLUS_INT64_MONOID, iset2,
117117
NULL )) ;
118118

119119
if (isize1 != isize2) { printf ("error!\n") ; exit (1) ; }
@@ -189,7 +189,7 @@ int main (int argc, char **argv)
189189
// iset2 = iset
190190
OK (GrB_Vector_dup (&iset2, iset)) ;
191191
// iset2 = iset2 or A*iset, using the Boolean semiring
192-
OK (GrB_mxv (iset2, NULL, GrB_LOR, GrB_LOR_LAND_BOOL, A, iset, NULL)) ;
192+
OK (GrB_mxv (iset2, NULL, GrB_LOR, GxB_LOR_LAND_BOOL, A, iset, NULL)) ;
193193
OK (GrB_Vector_nvals (&nvals, iset2)) ;
194194
if (nvals != n)
195195
{

GraphBLAS/Demo/Program/tri_demo.c

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,25 +68,28 @@ int main (int argc, char **argv)
6868

6969
// A = spones (C), and typecast to uint32
7070
OK (GrB_Matrix_new (&A, GrB_UINT32, n, n)) ;
71-
OK (GrB_apply (A, NULL, NULL, GrB_ONE_UINT32, C, NULL)) ;
71+
OK (GrB_apply (A, NULL, NULL, GxB_ONE_UINT32, C, NULL)) ;
7272
double t_read = simple_toc (tic) ;
7373
printf ("\ntotal time to read A matrix: %14.6f sec\n", t_read) ;
7474
GrB_free (&C) ;
7575

76-
// U = triu (A)
76+
// U = triu (A,1)
7777
simple_tic (tic) ;
78-
OK (triu (&U, A)) ;
78+
GrB_Index k = 1 ;
79+
OK (GrB_Matrix_new (&U, GrB_UINT32, n, n)) ;
80+
OK (GxB_select (U, NULL, NULL, GxB_TRIU, A, &k, NULL)) ;
7981
OK (GrB_Matrix_nvals (&nedges, U)) ;
8082
printf ("\nn %.16g # edges %.16g\n", (double) n, (double) nedges) ;
8183
double t_prune = simple_toc (tic) ;
8284
printf ("U=triu(A) time: %14.6f sec\n", t_prune) ;
8385

84-
// L = U', for method 4
86+
// L = tril (A,-1), for method 4
8587
simple_tic (tic) ;
8688
OK (GrB_Matrix_new (&L, GrB_UINT32, n, n)) ;
87-
OK (GrB_transpose (L, NULL, NULL, U, NULL)) ;
89+
k = -1 ;
90+
OK (GxB_select (L, NULL, NULL, GxB_TRIL, A, &k, NULL)) ;
8891
double t_trans = simple_toc (tic) ;
89-
printf ("L=U' time : %14.6f sec\n", t_trans) ;
92+
printf ("L=tril(A) time: %14.6f sec\n", t_trans) ;
9093

9194
//--------------------------------------------------------------------------
9295
// count the triangles via C<U> = U*U (outer-product)

GraphBLAS/Demo/Program/wildtype_demo.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ void wildtype_print (const wildtype *x, const char *name)
4444
void wildtype_print_matrix (GrB_Matrix A, char *name)
4545
{
4646
GrB_Type type ;
47-
GrB_Matrix_type (&type, A) ;
47+
GxB_Matrix_type (&type, A) ;
4848
if (type != WildType)
4949
{
5050
printf ("\nThe matrix %s is not wild enough to print.\n", name) ;
@@ -126,7 +126,7 @@ int main (void)
126126

127127
// get its properties
128128
size_t s ;
129-
GrB_Type_size (&s, WildType) ;
129+
GxB_Type_size (&s, WildType) ;
130130
printf ("WildType size: %d\n", (int) s) ;
131131

132132
// create a 10-by-10 WildType matrix, each entry is a 'scalar' WildType

GraphBLAS/Demo/Source/bfs5m_check.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
// by Aydin Buluc, Timothy Mattson, Scott McMillan, Jose' Moreira, Carl Yang.
77
// Based on "GraphBLAS Mathematics" by Jeremy Kepner.
88

9-
// This version uses a predefined semiring (GrB_LOR_LAND_BOOL) and a predefined
10-
// monoid (GrB_LOR_BOOL_MONOID), in GraphBLAS.h. It also checks the status of
9+
// This version uses a predefined semiring (GxB_LOR_LAND_BOOL) and a predefined
10+
// monoid (GxB_LOR_BOOL_MONOID), in GraphBLAS.h. It also checks the status of
1111
// each call to GraphBLAS functions. These two changes are unrelated. Both
1212
// change are made here to illustrate two different things.
1313

@@ -76,10 +76,10 @@ GrB_Info bfs5m_check // BFS of a graph (using vector assign & reduce)
7676

7777
// q<!v> = A ||.&& q ; finds all the unvisited
7878
// successors from current q, using !v as the mask
79-
OK (GrB_mxv (q, v, NULL, GrB_LOR_LAND_BOOL, A, q, desc)) ;
79+
OK (GrB_mxv (q, v, NULL, GxB_LOR_LAND_BOOL, A, q, desc)) ;
8080

8181
// successor = ||(q)
82-
OK (GrB_reduce (&successor, NULL, GrB_LOR_BOOL_MONOID, q, NULL)) ;
82+
OK (GrB_reduce (&successor, NULL, GxB_LOR_BOOL_MONOID, q, NULL)) ;
8383
}
8484

8585
*v_output = v ; // return result

GraphBLAS/Demo/Source/bfs6_check.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
// by Aydin Buluc, Timothy Mattson, Scott McMillan, Jose' Moreira, Carl Yang.
77
// Based on "GraphBLAS Mathematics" by Jeremy Kepner.
88

9-
// This version uses a predefined semiring (GrB_LOR_LAND_BOOL) and a predefined
10-
// monoid (GrB_LOR_BOOL_MONOID), in GraphBLAS.h. It also checks the status of
9+
// This version uses a predefined semiring (GxB_LOR_LAND_BOOL) and a predefined
10+
// monoid (GxB_LOR_BOOL_MONOID), in GraphBLAS.h. It also checks the status of
1111
// each call to GraphBLAS functions. These two changes are unrelated. Both
1212
// change are made here to illustrate two different things.
1313

@@ -80,7 +80,7 @@ GrB_Info bfs6_check // BFS of a graph (using unary operator)
8080

8181
// q<!v> = A ||.&& q ; finds all the unvisited successors from current
8282
// q, using !v as the mask
83-
OK (GrB_mxv (q, v, NULL, GrB_LOR_LAND_BOOL, A, q, desc)) ;
83+
OK (GrB_mxv (q, v, NULL, GxB_LOR_LAND_BOOL, A, q, desc)) ;
8484

8585
GrB_Vector_nvals (&nvals, q) ;
8686
}

GraphBLAS/Demo/Source/mis_check.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@
1111

1212
#include "GraphBLAS.h"
1313

14-
#ifdef SUITESPARSE_GRAPHBLAS
14+
#ifdef GXB_SUITESPARSE_GRAPHBLAS
1515
// use predefined semirings. They are safe to free,
1616
// so the FREE_ALL macro can be used as-is in either case.
17-
#define Max GrB_MAX_FP32_MONOID
18-
#define maxSelect2nd GrB_MAX_SECOND_FP32
19-
#define Lor GrB_LOR_BOOL_MONOID
20-
#define Boolean GrB_LOR_LAND_BOOL
17+
#define Max GxB_MAX_FP32_MONOID
18+
#define maxSelect2nd GxB_MAX_SECOND_FP32
19+
#define Lor GxB_LOR_BOOL_MONOID
20+
#define Boolean GxB_LOR_LAND_BOOL
2121
#endif
2222

2323
// "OK(x)" macro defined in demos.h calls a GraphBLAS method, and if it fails,
@@ -76,7 +76,7 @@ GrB_Info mis_check // compute a maximal independent set
7676
GrB_Vector new_members = NULL ; // set of new members to iset
7777
GrB_Vector new_neighbors = NULL ; // new neighbors to new iset members
7878
GrB_Vector candidates = NULL ; // candidate members to iset
79-
#ifndef SUITESPARSE_GRAPHBLAS
79+
#ifndef GXB_SUITESPARSE_GRAPHBLAS
8080
GrB_Monoid Max = NULL ;
8181
GrB_Semiring maxSelect2nd = NULL ; // Max/Select2nd "semiring"
8282
GrB_Monoid Lor = NULL ;
@@ -101,7 +101,7 @@ GrB_Info mis_check // compute a maximal independent set
101101
// Initialize independent set vector, bool
102102
OK (GrB_Vector_new (&iset, GrB_BOOL, n)) ;
103103

104-
#ifndef SUITESPARSE_GRAPHBLAS
104+
#ifndef GXB_SUITESPARSE_GRAPHBLAS
105105
// create the maxSelect2nd semiring
106106
OK (GrB_Monoid_new (&Max, GrB_MAX_FP32, (float) 0.0)) ;
107107
OK (GrB_Semiring_new (&maxSelect2nd, Max, GrB_SECOND_FP32)) ;

GraphBLAS/Demo/Source/tricount.c

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -94,14 +94,14 @@ GrB_Info tricount // count # of triangles
9494
OK (GrB_Matrix_ncols (&ne, E)) ;
9595
OK (GrB_Matrix_new (&C, GrB_UINT32, n, ne)) ;
9696
// mxm: outer product method, no mask
97-
OK (GrB_mxm (C, NULL, NULL, GrB_PLUS_TIMES_UINT32, A, E, NULL));
97+
OK (GrB_mxm (C, NULL, NULL, GxB_PLUS_TIMES_UINT32, A, E, NULL));
9898
t [0] = simple_toc (tic) ;
9999

100100
simple_tic (tic) ;
101101
OK (GrB_UnaryOp_new (&Two, two, GrB_UINT32, GrB_UINT32)) ;
102102
OK (GrB_Matrix_new (&S, GrB_UINT32, n, ne)) ;
103103
OK (GrB_apply (S, NULL, NULL, Two, C, NULL)) ;
104-
OK (GrB_reduce (&ntri, NULL, GrB_PLUS_INT64_MONOID, S, NULL)) ;
104+
OK (GrB_reduce (&ntri, NULL, GxB_PLUS_INT64_MONOID, S, NULL)) ;
105105
ntri /= 3 ;
106106
break ;
107107

@@ -110,11 +110,11 @@ GrB_Info tricount // count # of triangles
110110
OK (GrB_Matrix_nrows (&n, A)) ;
111111
OK (GrB_Matrix_new (&C, GrB_UINT32, n, n)) ;
112112
// mxm: outer product method, with mask
113-
OK (GrB_mxm (C, A, NULL, GrB_PLUS_TIMES_UINT32, A, A, NULL)) ;
113+
OK (GrB_mxm (C, A, NULL, GxB_PLUS_TIMES_UINT32, A, A, NULL)) ;
114114
t [0] = simple_toc (tic) ;
115115

116116
simple_tic (tic) ;
117-
OK (GrB_reduce (&ntri, NULL, GrB_PLUS_INT64_MONOID, C, NULL)) ;
117+
OK (GrB_reduce (&ntri, NULL, GxB_PLUS_INT64_MONOID, C, NULL)) ;
118118
ntri /= 6 ;
119119
break ;
120120

@@ -123,11 +123,11 @@ GrB_Info tricount // count # of triangles
123123
OK (GrB_Matrix_nrows (&n, A)) ;
124124
OK (GrB_Matrix_new (&C, GrB_UINT32, n, n)) ;
125125
// mxm: outer product method, with mask
126-
OK (GrB_mxm (C, A, NULL, GrB_PLUS_TIMES_UINT32, L, U, NULL)) ;
126+
OK (GrB_mxm (C, A, NULL, GxB_PLUS_TIMES_UINT32, L, U, NULL)) ;
127127
t [0] = simple_toc (tic) ;
128128

129129
simple_tic (tic) ;
130-
OK (GrB_reduce (&ntri, NULL, GrB_PLUS_INT64_MONOID, C, NULL)) ;
130+
OK (GrB_reduce (&ntri, NULL, GxB_PLUS_INT64_MONOID, C, NULL)) ;
131131
ntri /= 2 ;
132132
break ;
133133

@@ -137,23 +137,23 @@ GrB_Info tricount // count # of triangles
137137
OK (GrB_Matrix_nrows (&n, U)) ;
138138
OK (GrB_Matrix_new (&C, GrB_UINT32, n, n)) ;
139139
// mxm: outer product method, with mask
140-
OK (GrB_mxm (C, U, NULL, GrB_PLUS_TIMES_UINT32, U, U, NULL)) ;
140+
OK (GrB_mxm (C, U, NULL, GxB_PLUS_TIMES_UINT32, U, U, NULL)) ;
141141
t [0] = simple_toc (tic) ;
142142

143143
simple_tic (tic) ;
144-
OK (GrB_reduce (&ntri, NULL, GrB_PLUS_INT64_MONOID, C, NULL)) ;
144+
OK (GrB_reduce (&ntri, NULL, GxB_PLUS_INT64_MONOID, C, NULL)) ;
145145
break ;
146146

147147
case 4: // SandiaL: ntri = sum (sum ((L * L) .* L))
148148

149149
// same as case 3, just a different matrix
150150
OK (GrB_Matrix_nrows (&n, L)) ;
151151
OK (GrB_Matrix_new (&C, GrB_UINT32, n, n)) ;
152-
OK (GrB_mxm (C, L, NULL, GrB_PLUS_TIMES_UINT32, L, L, d)) ;
152+
OK (GrB_mxm (C, L, NULL, GxB_PLUS_TIMES_UINT32, L, L, d)) ;
153153
t [0] = simple_toc (tic) ;
154154

155155
simple_tic (tic) ;
156-
OK (GrB_reduce (&ntri, NULL, GrB_PLUS_INT64_MONOID, C, NULL)) ;
156+
OK (GrB_reduce (&ntri, NULL, GxB_PLUS_INT64_MONOID, C, NULL)) ;
157157
break ;
158158

159159
case 5: // SandiaDot: ntri = sum (sum ((L' * U) .* U))
@@ -163,11 +163,11 @@ GrB_Info tricount // count # of triangles
163163
OK (GrB_Descriptor_new (&d)) ;
164164
OK (GrB_Descriptor_set (d, GrB_INP0, GrB_TRAN)) ;
165165
// mxm: dot product method, with mask
166-
OK (GrB_mxm (C, U, NULL, GrB_PLUS_TIMES_UINT32, L, U, d)) ;
166+
OK (GrB_mxm (C, U, NULL, GxB_PLUS_TIMES_UINT32, L, U, d)) ;
167167
t [0] = simple_toc (tic) ;
168168

169169
simple_tic (tic) ;
170-
OK (GrB_reduce (&ntri, NULL, GrB_PLUS_INT64_MONOID, C, NULL)) ;
170+
OK (GrB_reduce (&ntri, NULL, GxB_PLUS_INT64_MONOID, C, NULL)) ;
171171
break ;
172172

173173
default: // invalid method

0 commit comments

Comments
 (0)