Skip to content

Commit

Permalink
Merge pull request #12 from DrTimothyAldenDavis/master
Browse files Browse the repository at this point in the history
Master
  • Loading branch information
DrTimothyAldenDavis authored Jun 30, 2020
2 parents 2f98bdf + 62a95db commit 4305426
Show file tree
Hide file tree
Showing 16 changed files with 244 additions and 47 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ if ( CMAKE_VERSION VERSION_GREATER "3.0" )
endif ( )

# version of SuiteSparse:GraphBLAS
set ( GraphBLAS_DATE "June 26, 2020" )
set ( GraphBLAS_DATE "June 30, 2020" )
set ( GraphBLAS_VERSION_MAJOR 3 )
set ( GraphBLAS_VERSION_MINOR 3 )
set ( GraphBLAS_VERSION_SUB 0 )
set ( GraphBLAS_VERSION_SUB 1 )

# GraphBLAS C API Specification version, at graphblas.org
set ( GraphBLAS_API_DATE "Sept 25, 2019" )
Expand Down
9 changes: 8 additions & 1 deletion Doc/ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ Version 4.0.0, FUTURE, 2020 (this list is tentative):
* GrB_error: will have two inputs: a string (char **) and an object
* V4.0.0 will otherwise be identical to V3.3.0.

Version 3.3.1, June 30, 2020

* (19) bug fix: incorrect typecasting when GrB_assign or GxB_subassign
is simple: C=A where A is sparse or dense, in GB_dense_subassign_24.
Bug introduced in v3.2.0.
* revised gbmake: to allow GraphBLAS to be compiled in Octave

Version 3.3.0, June 26, 2020

* GrB_wait( ): with no input arguments, has been deprecated. It will
Expand Down Expand Up @@ -65,7 +72,7 @@ Version 3.2.0, Feb 20, 2020
instead.
* faster saxpy-based matrix multiply (about 5x to 10x for mxv and vxm):
removed Sauna workspace. Heap method removed. Hash method added.
* better performance for dense matrix and vectors
* better performance for dense matrix and vectors: NOTE: see bug (19) above
* faster typecast of the mask matrix M: GB_mcast replaces cast_M
* added GB_BURBLE: for development diagnostics
* changed default chunk size: from 4K to 64K
Expand Down
2 changes: 1 addition & 1 deletion Doc/GraphBLAS_UserGuide.bib
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ @inproceedings{Yang:2018:IPE
}

@inproceedings{10.1145/3229710.3229720,
author = {Nagasaka, Yusuke and Matsuoka, Satoshi and Azad, Ariful and Bulu\c{c}, Aydundefinedn},
author = {Nagasaka, Yusuke and Matsuoka, Satoshi and Azad, Ariful and Bulu\c{c}, Ayd\i{}n},
title = {High-Performance Sparse Matrix-Matrix Products on Intel KNL and Multicore Architectures},
year = {2018},
isbn = {9781450365239},
Expand Down
Binary file modified Doc/GraphBLAS_UserGuide.pdf
Binary file not shown.
6 changes: 5 additions & 1 deletion Doc/GraphBLAS_UserGuide.tex
Original file line number Diff line number Diff line change
Expand Up @@ -142,13 +142,17 @@ \subsection{Future plans:}
\verb'GrB_error' will change; it will take two parameters,
\verb'GrB_error(&s,C)' where \verb's' is the error string generated
when \verb'C' was last operated on.
V4.0 will otherwise be identical to V3.3.0.
V4.0 will otherwise be identical to V3.3.1.

\end{itemize}

\subsection{Release Notes:}
\begin{itemize}

\item Version 3.3.1 (June 30, 2020). Bug fix to \verb'GrB_assign' and
\verb'GxB_subassign' when the assignment is simple (\verb'C=A') but
with typecasting.

\item Version 3.3.0 (June 26, 2020). Compliant with V1.3 of the C API
(except that the polymorphic \verb'GrB_wait(&object)' doesn't appear yet;
it will appear in V4.0).
Expand Down
4 changes: 2 additions & 2 deletions Doc/GraphBLAS_version.tex
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
% version of SuiteSparse:GraphBLAS
\date{VERSION
3.3.0,
June 26, 2020}
3.3.1,
June 30, 2020}

70 changes: 43 additions & 27 deletions GraphBLAS/@GrB/private/gbmake.m
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,16 @@ function gbmake (what)
% SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
% http://suitesparse.com See GraphBLAS/Doc/License.txt for license.

if verLessThan ('matlab', '9.4')
error ('MATLAB 9.4 (R2018a) or later is required') ;
have_octave = (exist ('OCTAVE_VERSION', 'builtin') == 5) ;

if (have_octave)
if verLessThan ('octave', '7')
gb_error ('Octave 7 or later is required') ;
end
else
if verLessThan ('matlab', '9.4')
error ('MATLAB 9.4 (R2018a) or later is required') ;
end
end

% finish GraphBLAS
Expand All @@ -39,35 +47,43 @@ function gbmake (what)

make_all = (isequal (what, 'all')) ;

% use -R2018a for the new interleaved complex API
flags = '-O -R2018a' ;
if (have_octave)
%% Octave does not have the new MEX classdef object and as of
%% version 7, the mex command doesn't handle compiler options
%% the same way as MATLAB's mex command.

try
if (strncmp (computer, 'GLNX', 4))
% remove -ansi from CFLAGS and replace it with -std=c11
cc = mex.getCompilerConfigurations ('C', 'Selected') ;
env = cc.Details.SetEnv ;
c1 = strfind (env, 'CFLAGS=') ;
q = strfind (env, '"') ;
q = q (q > c1) ;
if (~isempty (c1) && length (q) > 1)
c2 = q (2) ;
cflags = env (c1:c2) ; % the CFLAGS="..." string
ansi = strfind (cflags, '-ansi') ;
if (~isempty (ansi))
cflags = [cflags(1:ansi-1) '-std=c11' cflags(ansi+5:end)] ;
flags = [flags ' ' cflags] ;
fprintf ('compiling with -std=c11 instead of default -ansi\n') ;
% use -R2018a for the new interleaved complex API
flags = '-O -R2018a -std=c11 -fopenmp -fPIC -Wno-pragmas' ;
else
% use -R2018a for the new interleaved complex API
flags = '-O -R2018a' ;

try
if (strncmp (computer, 'GLNX', 4))
% remove -ansi from CFLAGS and replace it with -std=c11
cc = mex.getCompilerConfigurations ('C', 'Selected') ;
env = cc.Details.SetEnv ;
c1 = strfind (env, 'CFLAGS=') ;
q = strfind (env, '"') ;
q = q (q > c1) ;
if (~isempty (c1) && length (q) > 1)
c2 = q (2) ;
cflags = env (c1:c2) ; % the CFLAGS="..." string
ansi = strfind (cflags, '-ansi') ;
if (~isempty (ansi))
cflags = [cflags(1:ansi-1) '-std=c11' cflags(ansi+5:end)] ;
flags = [flags ' ' cflags] ;
fprintf ('compiling with -std=c11 instead of default -ansi\n') ;
end
end
end
catch
end
if (~ismac && isunix)
flags = [ flags ' CFLAGS="$CXXFLAGS -fopenmp -fPIC -Wno-pragmas" '] ;
flags = [ flags ' CXXFLAGS="$CXXFLAGS -fopenmp -fPIC -Wno-pragmas" '] ;
flags = [ flags ' LDFLAGS="$LDFLAGS -fopenmp -fPIC" '] ;
end
catch
end

if (~ismac && isunix)
flags = [ flags ' CFLAGS="$CXXFLAGS -fopenmp -fPIC -Wno-pragmas" '] ;
flags = [ flags ' CXXFLAGS="$CXXFLAGS -fopenmp -fPIC -Wno-pragmas" '] ;
flags = [ flags ' LDFLAGS="$LDFLAGS -fopenmp -fPIC" '] ;
end

if ispc
Expand Down
4 changes: 2 additions & 2 deletions Include/GraphBLAS.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,10 @@

// The version of this implementation, and the GraphBLAS API version:
#define GxB_IMPLEMENTATION_NAME "SuiteSparse:GraphBLAS"
#define GxB_IMPLEMENTATION_DATE "June 26, 2020"
#define GxB_IMPLEMENTATION_DATE "June 30, 2020"
#define GxB_IMPLEMENTATION_MAJOR 3
#define GxB_IMPLEMENTATION_MINOR 3
#define GxB_IMPLEMENTATION_SUB 0
#define GxB_IMPLEMENTATION_SUB 1
#define GxB_SPEC_DATE "Sept 25, 2019"
#define GxB_SPEC_MAJOR 1
#define GxB_SPEC_MINOR 3
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
http://suitesparse.com See GraphBLAS/Doc/License.txt for license.

VERSION 3.3.0, June 26, 2020
VERSION 3.3.1, June 30, 2020

SuiteSparse:GraphBLAS is an full implementation of the GraphBLAS standard,
which defines a set of sparse matrix operations on an extended algebra of
Expand Down
26 changes: 21 additions & 5 deletions Source/GB_dense_subassign_24.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
// C = A, making a deep copy into an existing non-shallow matrix C, but
// possibly reusing parts of C if C is dense. See also GB_dup.

// Handles arbitrary typecasting. A is either sparse or dense; the name of
// the function is a bit of a misnomer since it implies that only the dense
// case is handled.

#include "GB_dense.h"
#define GB_FREE_ALL ;

Expand Down Expand Up @@ -80,12 +84,10 @@ GrB_Info GB_dense_subassign_24 // C = A, copy A into an existing matrix C
{

//----------------------------------------------------------------------
// copy the values from A to C; nothing else changes
// only copy the values from A to C; nothing else changes
//----------------------------------------------------------------------

GBBURBLE ("(dense copy) ") ;
int nthreads = GB_nthreads (anz, chunk, nthreads_max) ;
GB_memcpy (C->x, A->x, anz * A->type->size, nthreads) ;

}
else
Expand All @@ -95,14 +97,28 @@ GrB_Info GB_dense_subassign_24 // C = A, copy A into an existing matrix C
// copy a sparse matrix from A to C
//----------------------------------------------------------------------

// clear prior content of C, but keep the CSR/CSC format
// clear prior content of C, but keep the CSR/CSC format and its type
GBBURBLE ("(deep copy) ") ;
bool C_is_csc = C->is_csc ;
GB_PHIX_FREE (C) ;
GB_OK (GB_dup2 (&C, A, true, A->type, Context)) ;
// copy the pattern, not the values
GB_OK (GB_dup2 (&C, A, false, C->type, Context)) ;
C->is_csc = C_is_csc ; // do not change the CSR/CSC format of C
}

//-------------------------------------------------------------------------
// copy the values from A to C, typecasting as needed
//-------------------------------------------------------------------------

if (C->type != A->type)
{
GBBURBLE ("(typecast) ") ;
}

int nthreads = GB_nthreads (anz, chunk, nthreads_max) ;
GB_cast_array (C->x, C->type->code, A->x, A->type->code, A->type->size,
anz, nthreads) ;

//-------------------------------------------------------------------------
// return the result
//--------------------------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions Source/GB_subassigner.c
Original file line number Diff line number Diff line change
Expand Up @@ -869,14 +869,14 @@ GrB_Info GB_subassigner // C(I,J)<#M> = A or accum (C (I,J), A)
// submatrix assignment C(I,J)<M> = accum (C(I,J),A): meta-algorithm
//==========================================================================

// There are up to 64 combinations of options, but not required to be
// There are up to 128 combinations of options, but not all must be
// implemented, because they are either identical to another method
// (C_replace is effectively false if M=NULL and Mask_comp=false), or they
// are not used (the last option, whether or not S is constructed, is
// determined here; it is not a user input). The first 5 options are
// determined by the input. The table below has been pruned to remove
// combinations that are not used, or equivalent to other entries in the
// table. Only 22 unique combinations of the 64 combinations are needed,
// table. Only 22 unique combinations of the 128 combinations are needed,
// with additional special cases when C(:,:) is dense.

// M present or NULL
Expand Down
Loading

0 comments on commit 4305426

Please sign in to comment.