Skip to content

Commit 2f36dc2

Browse files
authored
Merge pull request #24 from eriknw/v600_alpha11
Updated to SS:GB v6.0.0.alpha16
2 parents b203e46 + 7ed85ca commit 2f36dc2

File tree

9 files changed

+778
-156
lines changed

9 files changed

+778
-156
lines changed

.github/workflows/test.yml

+20-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ jobs:
1515
fail-fast: false
1616
matrix:
1717
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
18-
python-version: [3.7, 3.8, 3.9]
18+
python-version: ["3.7", "3.8", "3.9", "3.10"]
19+
source: ["conda-forge"]
20+
graphblas-version: ["6.0.2"]
1921
steps:
2022
- name: Checkout
2123
uses: actions/checkout@v2
@@ -27,6 +29,23 @@ jobs:
2729
environment-file: continuous_integration/environment.yml
2830
channels: conda-forge
2931
activate-environment: suitesparse-graphblas
32+
- name: GraphBLAS (from conda-forge)
33+
if: (contains(matrix.source, 'conda-forge'))
34+
run: |
35+
conda install -c conda-forge graphblas=${{ matrix.graphblas-version }}
36+
- name: GraphBLAS (from source)
37+
if: (contains(matrix.source, 'source'))
38+
run: |
39+
# This isn't working! Why not?
40+
# sh suitesparse.sh refs/tags/${{ matrix.graphblas-version }}
41+
curl -L https://github.com/DrTimothyAldenDavis/GraphBLAS/archive/refs/tags/v${{ matrix.graphblas-version }}.tar.gz | tar xzf -
42+
pushd GraphBLAS-${{ matrix.graphblas-version }}/build
43+
echo ${CONDA_PREFIX}
44+
cmake -DCMAKE_INSTALL_PREFIX=${CONDA_PREFIX} -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_BUILD_TYPE=Release ..
45+
cat Makefile
46+
make all JOBS=16
47+
make install
48+
popd
3049
- name: Build
3150
run: |
3251
python setup.py build_ext --inplace

.github/workflows/wheels.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ jobs:
1818
- name: Checkout
1919
uses: actions/checkout@v2
2020
- name: Build manylinux Python wheels
21-
uses: RalfG/python-wheels-manylinux-build@v0.3.4-manylinux2014_x86_64
21+
uses: RalfG/python-wheels-manylinux-build@v0.4.0-manylinux2014_x86_64
2222
with:
23-
python-versions: 'cp37-cp37m cp38-cp38 cp39-cp39'
23+
python-versions: 'cp37-cp37m cp38-cp38 cp39-cp39 cp310-cp310'
2424
build-requirements: 'cffi numpy>=1.18,<1.19 cython'
2525
pre-build-command: ${{ format('sh suitesparse.sh {0}', github.ref) }}
2626
- name: Publish wheels to PyPI

continuous_integration/environment.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ channels:
33
- conda-forge
44
- defaults
55
dependencies:
6-
- graphblas=5.1.10
6+
# - graphblas=6.0.2
77
- cffi
88
- cython
99
- numpy

suitesparse_graphblas/create_headers.py

+17-5
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,7 @@ def groupby(index, seq):
261261
}
262262

263263
DEFINES = {
264+
"GrB_INDEX_MAX",
264265
"GxB_STDC_VERSION",
265266
"GxB_IMPLEMENTATION_MAJOR",
266267
"GxB_IMPLEMENTATION_MINOR",
@@ -290,6 +291,13 @@ def groupby(index, seq):
290291
"GxB_BEGIN",
291292
"GxB_END",
292293
"GxB_INC",
294+
"GxB_FAST_IMPORT",
295+
"GxB_MAX_NAME_LEN",
296+
"GxB_COMPRESSION_DEFAULT",
297+
"GxB_COMPRESSION_INTEL",
298+
"GxB_COMPRESSION_LZ4",
299+
"GxB_COMPRESSION_LZ4HC",
300+
"GxB_COMPRESSION_NONE",
293301
}
294302

295303
CHAR_DEFINES = {
@@ -321,6 +329,9 @@ def groupby(index, seq):
321329
"GxB_cuda_malloc",
322330
"GxB_cuda_free",
323331
}
332+
IGNORE_ENUMS = {
333+
"memory_order",
334+
}
324335

325336

326337
class VisitEnumTypedef(c_generator.CGenerator):
@@ -360,7 +371,7 @@ def get_groups(ast):
360371
groups["GB methods"] = sorted(vals, key=sort_key)
361372

362373
missing_methods = {x for x in lines if "extern GrB_Info " in x} - seen
363-
assert not missing_methods
374+
assert not missing_methods, ", ".join(sorted(missing_methods))
364375

365376
vals = {x for x in lines if "extern GrB" in x} - seen
366377
seen.update(vals)
@@ -379,7 +390,7 @@ def get_groups(ast):
379390
groups["GrB const"] = sorted(vals, key=sort_key)
380391

381392
missing_const = {x for x in lines if "extern const" in x} - seen
382-
assert not missing_const
393+
assert not missing_const, ", ".join(sorted(missing_const))
383394

384395
vals = {x for x in lines if "typedef" in x and "GxB" in x and "(" not in x} - seen
385396
seen.update(vals)
@@ -390,7 +401,7 @@ def get_groups(ast):
390401
groups["GrB typedef"] = sorted(vals, key=sort_key)
391402

392403
missing_typedefs = {x for x in lines if "typedef" in x and "GB" in x and "(" not in x} - seen
393-
assert not missing_typedefs
404+
assert not missing_typedefs, ", ".join(sorted(missing_typedefs))
394405
assert all(x.endswith(";") for x in seen) # sanity check
395406

396407
g = VisitEnumTypedef()
@@ -408,14 +419,15 @@ def get_groups(ast):
408419
groups["GxB typedef enums"] = sorted(vals, key=lambda x: sort_key(x.rsplit("}", 1)[-1]))
409420

410421
missing_enums = set(enums) - set(groups["GrB typedef enums"]) - set(groups["GxB typedef enums"])
411-
assert not missing_enums
422+
missing_enums = {x for x in missing_enums if not any(y in x for y in IGNORE_ENUMS)}
423+
assert not missing_enums, ", ".join(sorted(missing_enums))
412424

413425
vals = {x for x in lines if "typedef" in x and "GxB" in x} - seen
414426
seen.update(vals)
415427
groups["GxB typedef funcs"] = sorted(vals, key=sort_key)
416428

417429
vals = {x for x in lines if "typedef" in x and "GrB" in x} - seen
418-
assert not vals
430+
assert not vals, ", ".join(sorted(vals))
419431
groups["not seen"] = sorted(set(lines) - seen, key=sort_key)
420432
for group in groups["not seen"]:
421433
assert "extern" not in group, group

suitesparse_graphblas/io/binary.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def binwrite(A, filename, comments=None, opener=Path.open):
9090
if isinstance(filename, str):
9191
filename = Path(filename)
9292

93-
check_status(A, lib.GrB_Matrix_wait(A))
93+
check_status(A, lib.GrB_Matrix_wait(A[0], lib.GrB_MATERIALIZE))
9494

9595
ffinew = ffi.new
9696

0 commit comments

Comments
 (0)