Skip to content

Commit

Permalink
demo and openmp options
Browse files Browse the repository at this point in the history
  • Loading branch information
DrTimothyAldenDavis committed Nov 10, 2022
1 parent 6d3174e commit 1534586
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
15 changes: 14 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ endif ( )

option ( NOPENMP "ON: do not use OpenMP. OFF (default): use OpenMP" off )
if ( NOPENMP )
# OpenMP has been disabled
# OpenMP has been disabled.

set ( OPENMP_FOUND false )
else ( )
find_package ( OpenMP )
Expand Down Expand Up @@ -372,6 +373,17 @@ if ( OPENMP_FOUND )
message ( STATUS "CMAKE OpenMP C flags: " ${OpenMP_C_FLAGS} )
set ( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS} " )
include_directories ( ${OpenMP_C_INCLUDE_DIRS} )
else ( )
message ( WARNING
"WARNING: OpenMP was not found (or was disabled with NOPENMP). See the "
"GrapBLAS user guide on the consequences of compiling GraphBLAS without "
"OpenMP. GraphBLAS will work but may not be thread-safe, since it relies "
"on '#pragma omp flush' to ensure the work performed by one user thread is "
"available to another, in GrB_wait. If OpenMP is not in use, the "
"thread-safety of GrB_wait becomes the responsibilty of the user "
"application (perhaps through a pthreads construct). Compiling GraphBLAS "
"without OpenMP is not recommended for installation in a package manager "
"(Linux, conda-forge, spack, brew, vcpkg, etc). " )
endif ( )

if ( SUITESPARSE_CUDA )
Expand All @@ -391,6 +403,7 @@ message ( STATUS "CMAKE C flags: " ${CMAKE_C_FLAGS} )
# Demo library and programs
#-------------------------------------------------------------------------------

option ( DEMO "ON: Build the demo programs. OFF (default): do not build the demo programs." off )
if ( DEMO )

#---------------------------------------------------------------------------
Expand Down
Binary file modified Doc/GraphBLAS_UserGuide.pdf
Binary file not shown.
3 changes: 3 additions & 0 deletions Doc/GraphBLAS_UserGuide.tex
Original file line number Diff line number Diff line change
Expand Up @@ -8595,6 +8595,9 @@ \subsection{OpenMP parallelism}
if (!have_openmp) printf ("GraphBLAS not compiled with OpenMP\n") :
\end{verbatim}

Compiling GraphBLAS without OpenMP is not recommended for installation in a
package manager (Linux, conda-forge, spack, brew, vcpkg, etc).

%-------------------------------------------------------------------------------
\subsection{Storing a matrix by row or by column}
%-------------------------------------------------------------------------------
Expand Down

0 comments on commit 1534586

Please sign in to comment.