Skip to content

Commit 0c84c41

Browse files
Merge pull request #148 from GraphBLAS/dev
LAGraph v1.0.1
2 parents 81a0a77 + d79e67e commit 0c84c41

File tree

205 files changed

+2160
-985
lines changed

Some content is hidden

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

205 files changed

+2160
-985
lines changed

CMakeLists.txt

+11-6
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,14 @@
22
# LAGraph/CMakeLists.txt: cmake script for LAGraph
33
#-------------------------------------------------------------------------------
44

5-
# LAGraph, (c) 2021 by The LAGraph Contributors, All Rights Reserved.
5+
# LAGraph, (c) 2019-2022 by The LAGraph Contributors, All Rights Reserved.
66
# SPDX-License-Identifier: BSD-2-Clause
7-
# See additional acknowledgments in the LICENSE file,
8-
# or contact [email protected] for the full terms.
7+
#
8+
# For additional details (including references to third party source code and
9+
# other files) see the LICENSE file or contact [email protected]. See
10+
# Contributors.txt for a full list of contributors. Created, in part, with
11+
# funding and support from the U.S. Government (see Acknowledgments.txt file).
12+
# DM22-0790
913

1014
#-------------------------------------------------------------------------------
1115

@@ -45,10 +49,10 @@ cmake_policy ( SET CMP0048 NEW )
4549
set ( CMAKE_MACOSX_RPATH TRUE )
4650

4751
# version of LAGraph
48-
set ( LAGraph_DATE "Sept 20, 2022" )
52+
set ( LAGraph_DATE "Dec 28, 2022" )
4953
set ( LAGraph_VERSION_MAJOR 1 )
5054
set ( LAGraph_VERSION_MINOR 0 )
51-
set ( LAGraph_VERSION_SUB 0 )
55+
set ( LAGraph_VERSION_SUB 1 )
5256

5357
project ( lagraph
5458
VERSION "${LAGraph_VERSION_MAJOR}.${LAGraph_VERSION_MINOR}.${LAGraph_VERSION_SUB}" )
@@ -112,7 +116,8 @@ endif ( )
112116
# GRAPHBLAS_ROOT=<path> cmake ..
113117
# or uncomment the next line:
114118
# set ( ENV{GRAPHBLAS_ROOT} ${CMAKE_SOURCE_DIR}/../GraphBLAS )
115-
message ( STATUS "GraphBLAS root: " ${GRAPHBLAS_ROOT} )
119+
message ( STATUS "GraphBLAS_ROOT: ${GraphBLAS_ROOT} $ENV{GraphBLAS_ROOT}" )
120+
message ( STATUS "GRAPHBLAS_ROOT: ${GRAPHBLAS_ROOT} $ENV{GRAPHBLAS_ROOT}" )
116121
find_package (GraphBLAS 7.0.1 REQUIRED MODULE)
117122

118123
#-------------------------------------------------------------------------------

CODE_OF_CONDUCT.md

+134
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
2+
# Contributor Covenant Code of Conduct
3+
4+
## Our Pledge
5+
6+
We as members, contributors, and leaders pledge to make participation in our
7+
community a harassment-free experience for everyone, regardless of age, body
8+
size, visible or invisible disability, ethnicity, sex characteristics, gender
9+
identity and expression, level of experience, education, socio-economic status,
10+
nationality, personal appearance, race, caste, color, religion, or sexual
11+
identity and orientation.
12+
13+
We pledge to act and interact in ways that contribute to an open, welcoming,
14+
diverse, inclusive, and healthy community.
15+
16+
## Our Standards
17+
18+
Examples of behavior that contributes to a positive environment for our
19+
community include:
20+
21+
* Demonstrating empathy and kindness toward other people
22+
* Being respectful of differing opinions, viewpoints, and experiences
23+
* Giving and gracefully accepting constructive feedback
24+
* Accepting responsibility and apologizing to those affected by our mistakes,
25+
and learning from the experience
26+
* Focusing on what is best not just for us as individuals, but for the overall
27+
community
28+
29+
Examples of unacceptable behavior include:
30+
31+
* The use of sexualized language or imagery, and sexual attention or advances of
32+
any kind
33+
* Trolling, insulting or derogatory comments, and personal or political attacks
34+
* Public or private harassment
35+
* Publishing others' private information, such as a physical or email address,
36+
without their explicit permission
37+
* Other conduct which could reasonably be considered inappropriate in a
38+
professional setting
39+
40+
## Enforcement Responsibilities
41+
42+
Community leaders are responsible for clarifying and enforcing our standards of
43+
acceptable behavior and will take appropriate and fair corrective action in
44+
response to any behavior that they deem inappropriate, threatening, offensive,
45+
or harmful.
46+
47+
Community leaders have the right and responsibility to remove, edit, or reject
48+
comments, commits, code, wiki edits, issues, and other contributions that are
49+
not aligned to this Code of Conduct, and will communicate reasons for moderation
50+
decisions when appropriate.
51+
52+
## Scope
53+
54+
This Code of Conduct applies within all community spaces, and also applies when
55+
an individual is officially representing the community in public spaces.
56+
Examples of representing our community include using an official e-mail address,
57+
posting via an official social media account, or acting as an appointed
58+
representative at an online or offline event.
59+
60+
## Enforcement
61+
62+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
63+
reported to the community leaders responsible for enforcement at
64+
[https://graphblas.org][GraphBLAS.org] by contacting the GraphBLAS Steering Committee.
65+
All complaints will be reviewed and investigated promptly and fairly.
66+
67+
All community leaders are obligated to respect the privacy and security of the
68+
reporter of any incident.
69+
70+
## Enforcement Guidelines
71+
72+
Community leaders will follow these Community Impact Guidelines in determining
73+
the consequences for any action they deem in violation of this Code of Conduct:
74+
75+
### 1. Correction
76+
77+
**Community Impact**: Use of inappropriate language or other behavior deemed
78+
unprofessional or unwelcome in the community.
79+
80+
**Consequence**: A private, written warning from community leaders, providing
81+
clarity around the nature of the violation and an explanation of why the
82+
behavior was inappropriate. A public apology may be requested.
83+
84+
### 2. Warning
85+
86+
**Community Impact**: A violation through a single incident or series of
87+
actions.
88+
89+
**Consequence**: A warning with consequences for continued behavior. No
90+
interaction with the people involved, including unsolicited interaction with
91+
those enforcing the Code of Conduct, for a specified period of time. This
92+
includes avoiding interactions in community spaces as well as external channels
93+
like social media. Violating these terms may lead to a temporary or permanent
94+
ban.
95+
96+
### 3. Temporary Ban
97+
98+
**Community Impact**: A serious violation of community standards, including
99+
sustained inappropriate behavior.
100+
101+
**Consequence**: A temporary ban from any sort of interaction or public
102+
communication with the community for a specified period of time. No public or
103+
private interaction with the people involved, including unsolicited interaction
104+
with those enforcing the Code of Conduct, is allowed during this period.
105+
Violating these terms may lead to a permanent ban.
106+
107+
### 4. Permanent Ban
108+
109+
**Community Impact**: Demonstrating a pattern of violation of community
110+
standards, including sustained inappropriate behavior, harassment of an
111+
individual, or aggression toward or disparagement of classes of individuals.
112+
113+
**Consequence**: A permanent ban from any sort of public interaction within the
114+
community.
115+
116+
## Attribution
117+
118+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
119+
version 2.1, available at
120+
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
121+
122+
Community Impact Guidelines were inspired by
123+
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].
124+
125+
For answers to common questions about this code of conduct, see the FAQ at
126+
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
127+
[https://www.contributor-covenant.org/translations][translations].
128+
129+
[homepage]: https://www.contributor-covenant.org
130+
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
131+
[Mozilla CoC]: https://github.com/mozilla/diversity
132+
[FAQ]: https://www.contributor-covenant.org/faq
133+
[translations]: https://www.contributor-covenant.org/translations
134+

ContributionInstructions.txt CONTRIBUTING.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
File: ContributionInstructions.txt:
21

32
Thank you for your interest in contributing to the LAGraph project (“We” or
43
“Us”). By making any Contribution to this project, you agree to the terms
@@ -95,7 +94,7 @@ necessary permissions to make this Contribution.
9594
(c) The grant of rights under Section 2 does not violate any grant of rights
9695
which You have made to third parties, including Your employer. If You are an
9796
employee, You warrant that Your employer has approved this Agreement. If You are
98-
less than eighteen years old, Uour parent or guardian must sign a printed
97+
less than eighteen years old, Your parent or guardian must sign a printed
9998
version of this Agreement and send it to [email protected].
10099

101100
(d) You shall make each Contribution in full compliance with U.S. export control

ChangeLog

+16
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
Version 1.0.1: Dec 26, 2022
2+
3+
* bug fix: LAGraph_MMWrite incorrectly created a Matrix Market
4+
file with "array pattern" format, which is invalid.
5+
* header updates: with copyright info
6+
* CONTRIBUTING.md: renamed the file
7+
* CODE_OF_CONDUCT.md: added, from https://www.contributor-covenant.org
8+
* FindGraphBLAS.cmake and FindLAGraph.cmake: revised to find both dynamic
9+
and static libraries, and to find the version number from the include
10+
file if it's not present in the filename of the library.
11+
* LAGraph_FastGraphletTransform: now able to compile it when OpenMP
12+
is not available.
13+
* bug fix: LAGRAPH_VANILLA option fixed. Added "make vanilla" to the
14+
Makefile. GxB_*_TypeName methods are required, even for a "vanilla"
15+
GraphBLAS.
16+
117
Version 1.0.0: Sept 20, 2022
218

319
* LAGraph v1.0 released.

Makefile

+3
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ default: library
5353
library:
5454
( cd build && cmake $(CMAKE_OPTIONS) .. && $(MAKE) --jobs=${JOBS} )
5555

56+
vanilla:
57+
( cd build && cmake $(CMAKE_OPTIONS) -DLAGRAPH_VANILLA=1 .. && $(MAKE) --jobs=${JOBS} )
58+
5659
# compile with -g for debugging
5760
debug:
5861
( cd build && cmake $(CMAKE_OPTIONS) -DCMAKE_BUILD_TYPE=Debug .. && $(MAKE) --jobs=${JOBS} )

README.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,10 @@ LAGraph contains the following files and folders:
100100

101101
config: LAGraph.h.in, for constructing include/LAGraph.h
102102

103-
ContributionInstructions.txt: how to contributed to LAGraph
103+
CONTRIBUTING.md: how to contributed to LAGraph
104+
105+
CODE_OF_CONDUCT.md: code of conduct from
106+
https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
104107

105108
Contributors.txt: list of contributors
106109

cmake_modules/FindGraphBLAS.cmake

+82-21
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
FindGraphBLAS
33
--------
44
5+
The following copyright and license applies to just this file only, not to
6+
the GraphBLAS library itself:
57
LAGraph, (c) 2019-2022 by The LAGraph Contributors, All Rights Reserved.
68
SPDX-License-Identifier: BSD-2-Clause
79
See additional acknowledgments in the LICENSE file,
@@ -23,7 +25,8 @@ This module defines the following variables:
2325
::
2426
2527
GRAPHBLAS_INCLUDE_DIR - where to find GraphBLAS.h, etc.
26-
GRAPHBLAS_LIBRARY - GraphBLAS library
28+
GRAPHBLAS_LIBRARY - dynamic GraphBLAS library
29+
GRAPHBLAS_STATIC - static GraphBLAS library
2730
GRAPHBLAS_LIBRARIES - List of libraries when using GraphBLAS.
2831
GRAPHBLAS_FOUND - True if GraphBLAS found.
2932
@@ -32,8 +35,8 @@ This module defines the following variables:
3235
Hints
3336
^^^^^
3437
35-
A user may set ``GRAPHBLAS_ROOT`` to a GraphBLAS installation root to tell this
36-
module where to look.
38+
A user may set ``GRAPHBLAS_ROOT`` or ``GraphBLAS_ROOT`` to a GraphBLAS
39+
installation root to tell this module where to look.
3740
3841
Otherwise, the first place searched is in ../GraphBLAS, relative to the LAGraph
3942
source directory. That is, if GraphBLAS and LAGraph reside in the same parent
@@ -43,44 +46,96 @@ This takes precedence over the system-wide installation of GraphBLAS, which
4346
might be an older version. This method gives the user the ability to compile
4447
LAGraph with their own copy of GraphBLAS, ignoring the system-wide version.
4548
49+
If SuiteSparse:GraphBLAS is the GraphBLAS library being utilized,
50+
all the Find*.cmake files in SuiteSparse are installed by 'make install' into
51+
/usr/local/lib/cmake/SuiteSparse (where '/usr/local' is the
52+
${CMAKE_INSTALL_PREFIX}). To access this file, place the following commands
53+
in your CMakeLists.txt file. See also SuiteSparse/Example/CMakeLists.txt:
54+
55+
set ( CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH}
56+
${CMAKE_INSTALL_PREFIX}/lib/cmake/SuiteSparse )
57+
4658
#]=======================================================================]
4759

4860
# NB: this is built around assumptions about one particular GraphBLAS
4961
# installation (SuiteSparse:GraphBLAS). As other installations become available
5062
# changes to this will likely be required.
5163

5264
# "Include" for SuiteSparse:GraphBLAS
53-
find_path(
54-
GRAPHBLAS_INCLUDE_DIR
65+
find_path ( GRAPHBLAS_INCLUDE_DIR
5566
NAMES GraphBLAS.h
67+
HINTS ${GRAPHBLAS_ROOT}
68+
HINTS ENV GRAPHBLAS_ROOT
5669
HINTS ${CMAKE_SOURCE_DIR}/..
5770
HINTS ${CMAKE_SOURCE_DIR}/../GraphBLAS
5871
HINTS ${CMAKE_SOURCE_DIR}/../SuiteSparse/GraphBLAS
59-
PATHS GRAPHBLAS_ROOT ENV GRAPHBLAS_ROOT
6072
PATH_SUFFIXES include Include
6173
)
6274

63-
# "build" for SuiteSparse:GraphBLAS
64-
find_library(
65-
GRAPHBLAS_LIBRARY
75+
# dynamic SuiteSparse:GraphBLAS library
76+
find_library ( GRAPHBLAS_LIBRARY
6677
NAMES graphblas
78+
HINTS ${GRAPHBLAS_ROOT}
79+
HINTS ENV GRAPHBLAS_ROOT
6780
HINTS ${CMAKE_SOURCE_DIR}/..
6881
HINTS ${CMAKE_SOURCE_DIR}/../GraphBLAS
6982
HINTS ${CMAKE_SOURCE_DIR}/../SuiteSparse/GraphBLAS
70-
PATHS GRAPHBLAS_ROOT ENV GRAPHBLAS_ROOT
7183
PATH_SUFFIXES lib build alternative
7284
)
7385

74-
# get version of .so using REALPATH
75-
get_filename_component(GRAPHBLAS_LIBRARY ${GRAPHBLAS_LIBRARY} REALPATH)
76-
string(
77-
REGEX MATCH "[0-9]+.[0-9]+.[0-9]+"
78-
GRAPHBLAS_VERSION
79-
${GRAPHBLAS_LIBRARY}
86+
if ( MSVC )
87+
set ( STATIC_SUFFIX .lib )
88+
set ( STATIC_NAME graphblas_static )
89+
else ( )
90+
set ( STATIC_SUFFIX .a )
91+
set ( STATIC_NAME graphblas )
92+
endif ( )
93+
94+
# static SuiteSparse:GraphBLAS library
95+
set ( save ${CMAKE_FIND_LIBRARY_SUFFIXES} )
96+
set ( CMAKE_FIND_LIBRARY_SUFFIXES ${STATIC_SUFFIX} ${CMAKE_FIND_LIBRARY_SUFFIXES} )
97+
find_library ( GRAPHBLAS_STATIC
98+
NAMES ${STATIC_NAME}
99+
HINTS ${GRAPHBLAS_ROOT}
100+
HINTS ENV GRAPHBLAS_ROOT
101+
HINTS ${CMAKE_SOURCE_DIR}/..
102+
HINTS ${CMAKE_SOURCE_DIR}/../GraphBLAS
103+
HINTS ${CMAKE_SOURCE_DIR}/../SuiteSparse/GraphBLAS
104+
PATH_SUFFIXES lib build alternative
105+
)
106+
set ( CMAKE_FIND_LIBRARY_SUFFIXES ${save} )
107+
108+
# get version of the library from the dynamic library name
109+
get_filename_component ( GRAPHBLAS_LIBRARY ${GRAPHBLAS_LIBRARY} REALPATH )
110+
get_filename_component ( GRAPHBLAS_FILENAME ${GRAPHBLAS_LIBRARY} NAME )
111+
string (
112+
REGEX MATCH "[0-9]+.[0-9]+.[0-9]+"
113+
GRAPHBLAS_VERSION
114+
${GRAPHBLAS_FILENAME}
80115
)
81-
set(GRAPHBLAS_LIBRARIES ${GRAPHBLAS_LIBRARY})
82116

83-
include(FindPackageHandleStandardArgs)
117+
# set ( GRAPHBLAS_VERSION "" )
118+
if ( EXISTS "${GRAPHBLAS_INCLUDE_DIR}" AND NOT GRAPHBLAS_VERSION )
119+
# if the version does not appear in the filename, read the include file
120+
file ( STRINGS ${GRAPHBLAS_INCLUDE_DIR}/GraphBLAS.h GRAPHBLAS_MAJOR_STR
121+
REGEX "define GxB_IMPLEMENTATION_MAJOR" )
122+
file ( STRINGS ${GRAPHBLAS_INCLUDE_DIR}/GraphBLAS.h GRAPHBLAS_MINOR_STR
123+
REGEX "define GxB_IMPLEMENTATION_MINOR" )
124+
file ( STRINGS ${GRAPHBLAS_INCLUDE_DIR}/GraphBLAS.h GRAPHBLAS_PATCH_STR
125+
REGEX "define GxB_IMPLEMENTATION_SUB" )
126+
message ( STATUS "major: ${GRAPHBLAS_MAJOR_STR}" )
127+
message ( STATUS "minor: ${GRAPHBLAS_MINOR_STR}" )
128+
message ( STATUS "patch: ${GRAPHBLAS_PATCH_STR}" )
129+
string ( REGEX MATCH "[0-9]+" GRAPHBLAS_MAJOR ${GRAPHBLAS_MAJOR_STR} )
130+
string ( REGEX MATCH "[0-9]+" GRAPHBLAS_MINOR ${GRAPHBLAS_MINOR_STR} )
131+
string ( REGEX MATCH "[0-9]+" GRAPHBLAS_PATCH ${GRAPHBLAS_PATCH_STR} )
132+
set (GRAPHBLAS_VERSION "${GRAPHBLAS_MAJOR}.${GRAPHBLAS_MINOR}.${GRAPHBLAS_PATCH}")
133+
endif ( )
134+
135+
set ( GRAPHBLAS_LIBRARIES ${GRAPHBLAS_LIBRARY} )
136+
137+
include ( FindPackageHandleStandardArgs )
138+
84139
find_package_handle_standard_args(
85140
GraphBLAS
86141
REQUIRED_VARS GRAPHBLAS_LIBRARIES GRAPHBLAS_INCLUDE_DIR
@@ -90,14 +145,20 @@ find_package_handle_standard_args(
90145
mark_as_advanced(
91146
GRAPHBLAS_INCLUDE_DIR
92147
GRAPHBLAS_LIBRARY
148+
GRAPHBLAS_STATIC
93149
GRAPHBLAS_LIBRARIES
94150
)
95151

96152
if ( GRAPHBLAS_FOUND )
97-
message ( STATUS "GraphBLAS include dir: " ${GRAPHBLAS_INCLUDE_DIR} )
98-
message ( STATUS "GraphBLAS library: " ${GRAPHBLAS_LIBRARY} )
99-
message ( STATUS "GraphBLAS version: " ${GRAPHBLAS_VERSION} )
153+
message ( STATUS "GraphBLAS version: ${GRAPHBLAS_VERSION}" )
154+
message ( STATUS "GraphBLAS include: ${GRAPHBLAS_INCLUDE_DIR}" )
155+
message ( STATUS "GraphBLAS library: ${GRAPHBLAS_LIBRARY}" )
156+
message ( STATUS "GraphBLAS static: ${GRAPHBLAS_STATIC}" )
100157
else ( )
101158
message ( STATUS "GraphBLAS not found" )
159+
set ( GRAPHBLAS_INCLUDE_DIR "" )
160+
set ( GRAPHBLAS_LIBRARIES "" )
161+
set ( GRAPHBLAS_LIBRARY "" )
162+
set ( GRAPHBLAS_STATIC "" )
102163
endif ( )
103164

0 commit comments

Comments
 (0)