Skip to content

Commit

Permalink
SuiteSparse v5.6.0 with GraphBLAS v3.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
DrTimothyAldenDavis committed Oct 21, 2019
1 parent 0520010 commit 21ffbac
Show file tree
Hide file tree
Showing 3,499 changed files with 461,472 additions and 274,330 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
Oct 21, 2019, SuiteSparse 5.6.0

* GraphBLAS 3.1.1: OpenMP parallelism and MATLAB interface

Oct 20, 2019, SuiteSparse 5.5.0

* GraphBLAS 2.3.5: Collected Algorithm of the ACM
Expand Down
15 changes: 13 additions & 2 deletions GraphBLAS/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -48,17 +48,28 @@ Demo/wildtype_demo.out
Demo/*.log
Demo/complex_demo_out.m
Demo/import_demo.out
Demo/t1.out
Demo/t2.out

alternative/*.out
alternative/*_out.m
alternative/*_demo

Test/*.log
Test/errlog.txt
Test/errlog2.txt
Test/log.txt
Test/gunk*
Test/fprint.txt

Doc/GraphBLAS_UserGuide.log
Doc/GraphBLAS_UserGuide.out

Tcov/errlog.txt
Tcov/errlog2.txt
Tcov/log.txt
Tcov/gbstat.mat
Tcov/grbstat.mat
Tcov/fprint.txt
Test/fprint.txt

Doc/html

Expand Down
139 changes: 102 additions & 37 deletions GraphBLAS/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ if ( CMAKE_VERSION VERSION_GREATER "3.0" )
endif ( )

# version of SuiteSparse:GraphBLAS
set ( GraphBLAS_DATE "Oct 20, 2019" )
set ( GraphBLAS_VERSION_MAJOR 2 )
set ( GraphBLAS_VERSION_MINOR 3 )
set ( GraphBLAS_VERSION_SUB 5 )
set ( GraphBLAS_DATE "Oct 21, 2019" )
set ( GraphBLAS_VERSION_MAJOR 3 )
set ( GraphBLAS_VERSION_MINOR 1 )
set ( GraphBLAS_VERSION_SUB 1 )

# GraphBLAS C API Specification version, at graphblas.org
set ( GraphBLAS_API_DATE "May 18, 2018" )
Expand Down Expand Up @@ -86,6 +86,17 @@ if ( NOT CMAKE_BUILD_TYPE )
set ( CMAKE_BUILD_TYPE Release )
endif ( )

# select "true" to build both dynamic and static libraries:
# set ( BUILD_GRB_STATIC_LIBRARY true )
# set ( BUILD_GRB_STATIC_LIBRARY false )
# or use cmake with -DBUILD_GRB_STATIC_LIBRARY=1

if ( BUILD_GRB_STATIC_LIBRARY )
message ( STATUS "Building both static and dynamic GraphBLAS libraries" )
else ( )
message ( STATUS "Building dynamic GraphBLAS library only" )
endif ( )

#-------------------------------------------------------------------------------
# find m4 and configure GraphBLAS with user-defined objects (if any)
#-------------------------------------------------------------------------------
Expand Down Expand Up @@ -141,6 +152,9 @@ configure_file (

include ( FindOpenMP )
include ( FindThreads )
# enable_language ( CUDA )

# for nvcc, add -DGBCUDA

#-------------------------------------------------------------------------------
# report status
Expand Down Expand Up @@ -178,18 +192,25 @@ if ( "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU")
# cmake 2.8 workaround: gcc needs to be told to do ANSI C11.
# cmake 3.0 doesn't have this problem.
set ( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c11 -lm -Wno-pragmas -fPIC " )
# check all warnings:
# check all warnings (uncomment for development only)
# set ( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wpedantic -Werror " )
if ( CMAKE_C_COMPILER_VERSION VERSION_LESS 4.9 )
message ( FATAL_ERROR "gcc version must be at least 4.9" )
endif ( )
elseif ( "${CMAKE_C_COMPILER_ID}" STREQUAL "Intel" )
# options for icc: also needs -std=c11
set ( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c11 " )
# check all warnings:
# set ( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -w3 " )
if ( CMAKE_C_COMPILER_VERSION VERSION_LESS 18.0 )
message ( FATAL_ERROR "icc version must be at least 18.0" )
# set ( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -qopt-report -qopt-report-phase=vec" )
# the -mp1 option is important for predictable floating-point results with
# the icc compiler. Without, ((float) 1.)/((float) 0.) produces NaN,
# instead of the correct result, Inf.
set ( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c11 -mp1 -fPIC" )
# The -g option is useful for the Intel VTune tool, but it should be
# removed in production. Comment this line out if not in use:
# set ( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g" )
# check all warnings and remarks (uncomment for development only):
# set ( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -w3 -Wremarks -Werror " )
if ( CMAKE_C_COMPILER_VERSION VERSION_LESS 19.0 )
message ( FATAL_ERROR "icc version must be at least 19.0" )
endif ( )
elseif ( "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" )
# options for clang
Expand All @@ -198,6 +219,11 @@ elseif ( "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" )
endif ( )
elseif ( "${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC" )
# options for MicroSoft Visual Studio
elseif ( "${CMAKE_C_COMPILER_ID}" STREQUAL "PGI" )
# options for PGI pgcc compiler. The compiler has a bug, and the
# -DPGI_COMPILER_BUG causes GraphBLAS to use a workaround.
set ( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Mnoopenmp -noswitcherror -c11 -lm -fPIC -DPGI_COMPILER_BUG" )
set ( CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -Mnoopenmp -D__GCC_ATOMIC_TEST_AND_SET_TRUEVAL=1 -noswitcherror --c++11 -lm -fPIC -DPGI_COMPILER_BUG" )
endif ( )

if ( ${CMAKE_BUILD_TYPE} STREQUAL "Debug")
Expand Down Expand Up @@ -232,6 +258,7 @@ endif ( )
# changing the already existing items)

file ( GLOB GRAPHBLAS_SOURCES "Source/*.c" "Source/Generated/*.c" )

add_library ( graphblas SHARED ${GRAPHBLAS_SOURCES} )
SET_TARGET_PROPERTIES ( graphblas PROPERTIES
VERSION ${GraphBLAS_VERSION_MAJOR}.${GraphBLAS_VERSION_MINOR}.${GraphBLAS_VERSION_SUB}
Expand All @@ -244,15 +271,16 @@ set_property ( TARGET graphblas PROPERTY C_STANDARD 11 )
# static graphblas library properties
#-------------------------------------------------------------------------------

add_library ( graphblas_static STATIC ${GRAPHBLAS_SOURCES} )
SET_TARGET_PROPERTIES ( graphblas_static PROPERTIES
VERSION ${GraphBLAS_VERSION_MAJOR}.${GraphBLAS_VERSION_MINOR}.${GraphBLAS_VERSION_SUB}
OUTPUT_NAME graphblas
POSITION_INDEPENDENT_CODE OFF
SOVERSION ${GraphBLAS_VERSION_MAJOR}
C_STANDARD_REQUIRED 11
PUBLIC_HEADER "Include/GraphBLAS.h" )
set_property ( TARGET graphblas_static PROPERTY C_STANDARD 11 )
if ( BUILD_GRB_STATIC_LIBRARY )
add_library ( graphblas_static STATIC ${GRAPHBLAS_SOURCES} )
SET_TARGET_PROPERTIES ( graphblas_static PROPERTIES
VERSION ${GraphBLAS_VERSION_MAJOR}.${GraphBLAS_VERSION_MINOR}.${GraphBLAS_VERSION_SUB}
OUTPUT_NAME graphblas
SOVERSION ${GraphBLAS_VERSION_MAJOR}
C_STANDARD_REQUIRED 11
PUBLIC_HEADER "Include/GraphBLAS.h" )
set_property ( TARGET graphblas_static PROPERTY C_STANDARD 11 )
endif ( )

#-------------------------------------------------------------------------------
# select the threading library
Expand All @@ -271,7 +299,7 @@ elseif ( USER_NONE )
set ( USE_NONE true )
else ( )
# default: automatic selection
message ( STATUS "Automatic selection of synchronization method" )
message ( STATUS "Automatic selection of synchronization method for user threads" )
if ( OPENMP_FOUND )
set ( USE_OPENMP true )
elseif ( CMAKE_USE_PTHREADS_INIT )
Expand All @@ -284,28 +312,46 @@ endif ( )
#-------------------------------------------------------------------------------

if ( USE_OPENMP )
# use OpenMP
# use OpenMP for user thread synchronization
message ( STATUS "Using OpenMP to synchronize user threads" )
target_link_libraries ( graphblas m ${OpenMP_C_LIBRARIES} )
target_link_libraries ( graphblas_static m ${OpenMP_C_LIBRARIES} )
if ( BUILD_GRB_STATIC_LIBRARY )
target_link_libraries ( graphblas_static m ${OpenMP_C_LIBRARIES} )
endif ( )
set ( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS} -DUSER_OPENMP_THREADS " )
elseif ( USE_POSIX )
# use POSIX
# use POSIX for user thread synchronization
message ( STATUS "Using POSIX pthreads to synchronize user threads" )
target_link_libraries ( graphblas m )
target_link_libraries ( graphblas_static m )
if ( BUILD_GRB_STATIC_LIBRARY )
target_link_libraries ( graphblas_static m )
endif ( )
set ( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pthread -DUSER_POSIX_THREADS " )
else ( )
# use no threading at all
message ( WARNING "No support for user threads; GraphBLAS will not be thread-safe" )
target_link_libraries ( graphblas m )
target_link_libraries ( graphblas_static m )
if ( BUILD_GRB_STATIC_LIBRARY )
target_link_libraries ( graphblas_static m )
endif ( )
set ( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DUSER_NO_THREADS " )
endif ( )

if ( CMAKE_THREAD_LIBS_INIT )
target_link_libraries ( graphblas ${CMAKE_THREAD_LIBS_INIT} )
target_link_libraries ( graphblas_static ${CMAKE_THREAD_LIBS_INIT} )
if ( BUILD_GRB_STATIC_LIBRARY )
target_link_libraries ( graphblas_static ${CMAKE_THREAD_LIBS_INIT} )
endif ( )
endif ( )

if ( OPENMP_FOUND )
# use OpenMP for internal parallelism
message ( STATUS "Using OpenMP for internal parallelism" )
set ( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}" )
target_link_libraries ( graphblas m ${OpenMP_C_LIBRARIES} )
if ( BUILD_GRB_STATIC_LIBRARY )
target_link_libraries ( graphblas_static m ${OpenMP_C_LIBRARIES} )
endif ( )
endif ( )

if ( CMAKE_USE_PTHREADS_INIT )
Expand Down Expand Up @@ -340,14 +386,15 @@ add_library ( graphblasdemo SHARED ${DEMO_SOURCES} )
SET_TARGET_PROPERTIES ( graphblasdemo PROPERTIES
C_STANDARD_REQUIRED 11 )
set_property ( TARGET graphblasdemo PROPERTY C_STANDARD 11 )

add_library ( graphblasdemo_static STATIC ${DEMO_SOURCES} )
SET_TARGET_PROPERTIES ( graphblasdemo_static PROPERTIES
C_STANDARD_REQUIRED 11 )
set_property ( TARGET graphblasdemo_static PROPERTY C_STANDARD 11 )

target_link_libraries ( graphblasdemo m graphblas )
target_link_libraries ( graphblasdemo_static graphblas_static )

if ( BUILD_GRB_STATIC_LIBRARY )
add_library ( graphblasdemo_static STATIC ${DEMO_SOURCES} )
SET_TARGET_PROPERTIES ( graphblasdemo_static PROPERTIES
C_STANDARD_REQUIRED 11 )
set_property ( TARGET graphblasdemo_static PROPERTY C_STANDARD 11 )
target_link_libraries ( graphblasdemo_static graphblas_static )
endif ( )

#-------------------------------------------------------------------------------
# Demo programs
Expand All @@ -363,6 +410,7 @@ add_executable ( complex_demo "Demo/Program/complex_demo.c" )
add_executable ( kron_demo "Demo/Program/kron_demo.c" )
add_executable ( simple_demo "Demo/Program/simple_demo.c" )
add_executable ( wildtype_demo "Demo/Program/wildtype_demo.c" )
add_executable ( reduce_demo "Demo/Program/reduce_demo.c" )
add_executable ( import_demo "Demo/Program/import_demo.c" )

# Libraries required for Demo programs
Expand All @@ -376,13 +424,30 @@ target_link_libraries ( complex_demo graphblas graphblasdemo )
target_link_libraries ( kron_demo graphblas graphblasdemo )
target_link_libraries ( simple_demo graphblasdemo )
target_link_libraries ( wildtype_demo graphblas )
target_link_libraries ( reduce_demo graphblas )
target_link_libraries ( import_demo graphblas graphblasdemo )

#-------------------------------------------------------------------------------
# graphblas installation location
#-------------------------------------------------------------------------------

install ( TARGETS graphblas graphblas_static
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} )
# note that the demo libraries are not installed

if ( BUILD_GRB_STATIC_LIBRARY )

# install both the dynamic and static libraries
install ( TARGETS graphblas graphblas_static
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} )

else ( )

# only install the dynamic library
install ( TARGETS graphblas
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} )

endif ( )

Loading

0 comments on commit 21ffbac

Please sign in to comment.