Skip to content

Commit

Permalink
ci: add configuration check
Browse files Browse the repository at this point in the history
  • Loading branch information
mloubout committed Sep 29, 2023
1 parent bd54b78 commit 6ff4803
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/pytest-core-nompi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,10 @@ jobs:
pip install -e .[tests]
pip install sympy==${{matrix.sympy}}
- name: Check configuration
run: |
${{ env.RUN_CMD }} python3 -c "from devito import configuration; print(''.join(['%s: %s \n' % (k, v) for (k, v) in configuration.items()]))"
- name: Test with pytest
run: |
${{ env.RUN_CMD }} ${{ matrix.arch }} --version
Expand Down
2 changes: 1 addition & 1 deletion tests/test_buffering.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ def test_over_injection():

# Check generated code
assert len(retrieve_iteration_tree(op1)) == \
7 + int(configuration['language'] != 'C')
7 + int(configuration['language'] != 'C') * 2
buffers = [i for i in FindSymbols().visit(op1) if i.is_Array]
assert len(buffers) == 1

Expand Down
6 changes: 3 additions & 3 deletions tests/test_dle.py
Original file line number Diff line number Diff line change
Expand Up @@ -799,7 +799,7 @@ def test_mapify_reduction_sparse(self):
eqns = [Eq(r, 0), Inc(r, s*s), Eq(n0[0], r)]
op0 = Operator(eqns)
op1 = Operator(eqns, opt=('advanced', {'mapify-reduce': True}))

expr0 = FindNodes(Expression).visit(op0)
assert len(expr0) == 3
assert expr0[1].is_reduction
Expand All @@ -809,11 +809,11 @@ def test_mapify_reduction_sparse(self):
assert expr1[1].expr.lhs.indices == s.indices
assert expr1[2].expr.rhs.is_Indexed
assert expr1[2].is_reduction

op0()
assert n0.data[0] == 11
op1()
assert n0.data[0] == 11
assert n0.data[0] == 11

def test_array_max_reduction(self):
"""
Expand Down

0 comments on commit 6ff4803

Please sign in to comment.