Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
100 commits
Select commit Hold shift + click to select a range
f9d1e34
compiler: Add PETSc module
ZoeLeibowitz Dec 13, 2023
5505a12
Clean up
ZoeLeibowitz Feb 18, 2025
f4ee1b9
compiler: Initialize and Finalize PETSc once and command line args
ZoeLeibowitz Mar 10, 2025
0af998d
Coupled (#41)
ZoeLeibowitz Mar 19, 2025
1146a07
misc: Rebase fixes
ZoeLeibowitz Mar 21, 2025
cccb988
Fix sympy_dtype for expressions containing FieldFromPointer objects (…
ZoeLeibowitz Mar 24, 2025
f61d4dd
compiler: Add PETSc language and printer (#67)
ZoeLeibowitz Mar 26, 2025
6cdb7d0
compiler: Temp fix for memory leaks. (#70)
ZoeLeibowitz Mar 31, 2025
9d389da
workflows: Push PETSc/Devito docker image to Docker Hub (#71)
ZoeLeibowitz Mar 31, 2025
735da03
Merge branch 'devitocodes:main' into master
ZoeLeibowitz Mar 31, 2025
fb4b96f
Compiler: Add basic initguess callback (#72)
ZoeLeibowitz Apr 2, 2025
33b2896
Staggered grids (#73)
ZoeLeibowitz Apr 2, 2025
515046a
Drop unnecessary IndexedData check (#74)
ZoeLeibowitz Apr 2, 2025
f1d7f0f
Separate PETSc install into single image (#75)
ZoeLeibowitz Apr 2, 2025
42e0e70
Add some examples (#76)
ZoeLeibowitz Apr 2, 2025
1e99432
Merge branch 'devitocodes:main' into master
ZoeLeibowitz Apr 2, 2025
bdade2c
Merge branch 'devitocodes:main' into master
ZoeLeibowitz Apr 3, 2025
4f3bd88
Use VecCreateMPIWithArray (#77)
ZoeLeibowitz Apr 3, 2025
9c60990
workflows: Edit petsc docker image
ZoeLeibowitz Apr 3, 2025
a8f11a7
workflows: Update petsc install to latest release
ZoeLeibowitz Apr 3, 2025
d06b275
logging: Corner case for PETSc
JDBetteridge Apr 16, 2025
2b6c038
examples: Add 1D example
ZoeLeibowitz Apr 17, 2025
ab2450b
examples: Add 04_poisson example
ZoeLeibowitz Apr 17, 2025
dd73033
workflows: Update workflow to run new tests
ZoeLeibowitz Apr 17, 2025
d3e7be6
misc: Flake 8
ZoeLeibowitz Apr 17, 2025
9f32c1a
misc: Fix conflict with main
ZoeLeibowitz Apr 21, 2025
7e21e5b
misc: Flake8
ZoeLeibowitz Apr 21, 2025
f2a7df1
misc: Fix merge conflicts with main
ZoeLeibowitz Jun 10, 2025
44b4aeb
misc: Fix merge leftover
ZoeLeibowitz Jun 10, 2025
92edf68
dsl/compiler: Edits to mixed solver functionality
ZoeLeibowitz Apr 24, 2025
f6b38ed
compiler: Working petscbundle
ZoeLeibowitz Apr 29, 2025
7300c8f
compiler: Add PetscMixin to simplify priority destroys
ZoeLeibowitz Apr 30, 2025
1ddc053
compiler: Working reuse_efunc for petscbundles
ZoeLeibowitz May 28, 2025
6834611
dsl/compiler: Zero columns for essential bcs
ZoeLeibowitz May 29, 2025
9642278
dsl: Compatible scaling of jacobian
ZoeLeibowitz May 29, 2025
ce9150f
dsl: Scale boundary rows of jacobian
ZoeLeibowitz May 30, 2025
f7e00bb
types: Edit PetscMixin and use it in other petsc classes
ZoeLeibowitz Jun 3, 2025
6e20d4b
dsl: Add extraction file
ZoeLeibowitz Jun 3, 2025
8a79fcd
dsl: Move symbolic extraction functions outside of the PETSc module
ZoeLeibowitz Jun 3, 2025
3000bd8
types: Move EssentialBC to another file
ZoeLeibowitz Jun 3, 2025
a0457f0
dsl/compiler: Add equation.py to petsc module
ZoeLeibowitz Jun 3, 2025
7132eb1
dsl: Add jacobian class for single fields
ZoeLeibowitz Jun 4, 2025
6897ab8
dsl: Fix compatible scaling for single fields
ZoeLeibowitz Jun 4, 2025
8386992
dsl: Improve Jacobian abstraction
ZoeLeibowitz Jun 5, 2025
fb20781
examples: Add pressure norm check in stokes example
ZoeLeibowitz Jun 5, 2025
5c1b686
tests: Add more petsc tests for linear coupled
ZoeLeibowitz Jun 8, 2025
b0ca11f
misc: Merge petsc branch in but broken petscbundle
ZoeLeibowitz Jun 10, 2025
b6710be
types: Fix PetscBundle symbolic shape
ZoeLeibowitz Jun 10, 2025
01d153a
tests: Fix petsc tests
ZoeLeibowitz Jun 10, 2025
d6bd4f4
misc: Address comments
ZoeLeibowitz Jun 11, 2025
4fad6aa
misc: Merge leftover
ZoeLeibowitz Jun 11, 2025
6b6ad4f
Merge pull request #2588 from devitocodes/JDBetteridge/petsc_fix_pyte…
ZoeLeibowitz Jun 11, 2025
525fdf6
Merge branch 'petsc' into biharmonic
ZoeLeibowitz Jun 11, 2025
27dd201
compiler: Edit switch_log_level
ZoeLeibowitz Jun 11, 2025
30ed5ba
tests: Add mpi petsc test
ZoeLeibowitz Jun 11, 2025
51d4d7e
misc: Address more comments and add docstrings
ZoeLeibowitz Jun 11, 2025
a4a5660
misc: Clean up more docstrings
ZoeLeibowitz Jun 12, 2025
312c826
misc: Add BaseJacobian
ZoeLeibowitz Jun 12, 2025
048f693
misc: Docstrings, stop list output for PETScSolve, tests
ZoeLeibowitz Jun 13, 2025
905def2
misc: Flake8
ZoeLeibowitz Jun 13, 2025
19fddbe
misc: Fix exprs in 01_navierstokes.py due to change in PETScSolve out…
ZoeLeibowitz Jun 13, 2025
6972cbc
Merge branch 'biharmonic' into petsc_mpi
ZoeLeibowitz Jun 13, 2025
8037cf9
misc: Clean up
ZoeLeibowitz Jun 13, 2025
8c16f2e
misc: Utilise zero_vector function
ZoeLeibowitz Jun 13, 2025
dcbf929
Merge branch 'biharmonic' into petsc_mpi
ZoeLeibowitz Jun 13, 2025
f3d4d2d
misc: Move vecset to function inside iet/utils.py
ZoeLeibowitz Jun 13, 2025
8d10b87
misc: Flake8
ZoeLeibowitz Jun 13, 2025
53b58a9
misc: Clean up
ZoeLeibowitz Jun 13, 2025
857eb9c
misc: Add more tests
ZoeLeibowitz Jun 15, 2025
7a5b10f
mpi: Start parallel tests
ZoeLeibowitz Jun 16, 2025
467c19b
add to petsc laplacian test
ZoeLeibowitz Jun 16, 2025
343ba75
merge conflict
ZoeLeibowitz Jun 16, 2025
d2e3eb5
mpi tests
ZoeLeibowitz Jun 16, 2025
6165373
edit test
ZoeLeibowitz Jun 16, 2025
0b43ea6
tests: Add petsc parallel test
ZoeLeibowitz Jun 16, 2025
62d0045
clean up
ZoeLeibowitz Jun 16, 2025
bd96379
misc: Simplify comm extraction in lower_petsc
ZoeLeibowitz Jun 16, 2025
ce5cf82
clean up
ZoeLeibowitz Jun 16, 2025
b7c4082
trigger petsc CI
ZoeLeibowitz Jun 16, 2025
e485c9c
misc: Add todo:
ZoeLeibowitz Jun 17, 2025
df4e638
address some of ed's comments
ZoeLeibowitz Jun 17, 2025
72e8222
misc: Address comments
ZoeLeibowitz Jun 17, 2025
b72465f
Merge pull request #2635 from devitocodes/petsc_mpi
ZoeLeibowitz Jun 19, 2025
16be19a
dsl/compiler: Add PETSc logging instrastructure and tests
ZoeLeibowitz Jun 20, 2025
f790ab9
Merge pull request #2655 from devitocodes/petsc_performance_summary
ZoeLeibowitz Jul 14, 2025
e3e26f0
compiler: Fix language summary
ZoeLeibowitz Jul 14, 2025
9a182da
misc: Fix advisor profiling with new language arg
ZoeLeibowitz Jul 14, 2025
774af10
misc: Clean up and docstrings
ZoeLeibowitz Jul 16, 2025
910c987
misc: Clean up
ZoeLeibowitz Jul 17, 2025
ff4b2d7
misc: flake8
ZoeLeibowitz Jul 17, 2025
91c91c3
Merge pull request #2626 from devitocodes/biharmonic
ZoeLeibowitz Jul 30, 2025
70d1719
misc: Merge with main
ZoeLeibowitz Aug 18, 2025
3044691
tests: Update petsc tests since merging with latest main
ZoeLeibowitz Aug 18, 2025
4139a3f
misc: Flake8
ZoeLeibowitz Aug 18, 2025
7c69c4d
dsl/compiler: Extend solver_parameters handling in PETScSolve and upd…
ZoeLeibowitz Sep 19, 2025
a19f136
workflows: Fix segfault in parallel tests
ZoeLeibowitz Sep 19, 2025
cdb83ef
PETSc clean up (#2740)
ZoeLeibowitz Sep 22, 2025
c51d394
Merge branch 'main' into petsc
ZoeLeibowitz Sep 22, 2025
bf52c5b
misc: Fixes since merge with main
ZoeLeibowitz Sep 23, 2025
807396c
tests: Edit test_special_array_definition
ZoeLeibowitz Sep 23, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/examples-mpi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,11 @@ on:
push:
branches:
- main
- petsc
pull_request:
branches:
- main
- petsc

jobs:
build:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@ on:
push:
branches:
- main
- petsc
pull_request:
branches:
- main
- petsc

jobs:
tutorials:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/flake8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@ on:
push:
branches:
- main
- petsc
pull_request:
branches:
- main
- petsc

jobs:
flake8:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/pytest-core-mpi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@ on:
push:
branches:
- main
- petsc
pull_request:
branches:
- main
- petsc

jobs:
test-mpi-basic:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/pytest-core-nompi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@ on:
push:
branches:
- main
- petsc
pull_request:
branches:
- main
- petsc

jobs:
pytest:
Expand Down
97 changes: 97 additions & 0 deletions .github/workflows/pytest-petsc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
name: CI-petsc

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

on:
# Trigger the workflow on push or pull request,
# but only for the master branch
push:
branches:
- main
- petsc
pull_request:
branches:
- main
- petsc

jobs:
pytest:
name: ${{ matrix.name }}-${{ matrix.set }}
runs-on: "${{ matrix.os }}"

env:
DOCKER_BUILDKIT: "1"
DEVITO_ARCH: "${{ matrix.arch }}"
DEVITO_LANGUAGE: ${{ matrix.language }}

strategy:
# Prevent all build to stop if a single one fails
fail-fast: false

matrix:
name: [
pytest-docker-py39-gcc-noomp
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Python 3.9 is EOL soon, so this version should get bumped. It would also be worth adding an Omp run

]
include:
- name: pytest-docker-py39-gcc-noomp
python-version: '3.9'
os: ubuntu-latest
arch: "gcc"
language: "C"
sympy: "1.12"

steps:
- name: Checkout devito
uses: actions/checkout@v4

- name: Log in to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Build docker image
run: |
docker build -f docker/Dockerfile.devito --build-arg base=zoeleibowitz/petsc_image:latest --tag zoeleibowitz/petsc_devito_image:latest .
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This image should probably be on the main Devito Dockerhub now


- name: Set run prefix
run: |
echo "RUN_CMD=docker run --rm -t -e CODECOV_TOKEN=${{ secrets.CODECOV_TOKEN }} --name testrun zoeleibowitz/petsc_devito_image:latest" >> $GITHUB_ENV
id: set-run

- name: Set tests
run : |
echo "TESTS=tests/test_petsc.py" >> $GITHUB_ENV
id: set-tests

- 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()]))"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ultra nitpick: fstring


- name: Test with pytest - serial
run: |
${{ env.RUN_CMD }} mpiexec -n 1 pytest -m "not parallel" --cov --cov-config=.coveragerc --cov-report=xml ${{ env.TESTS }}

- name: Test with pytest - parallel
run: |
${{ env.RUN_CMD }} mpiexec -n 1 pytest -m parallel --cov --cov-config=.coveragerc --cov-report=xml ${{ env.TESTS }}

- name: Test examples
run: |
${{ env.RUN_CMD }} mpiexec -n 1 python3 examples/petsc/seismic/01_staggered_acoustic.py
${{ env.RUN_CMD }} mpiexec -n 1 python3 examples/petsc/cfd/01_navierstokes.py
${{ env.RUN_CMD }} mpiexec -n 1 python3 examples/petsc/Poisson/01_poisson.py
${{ env.RUN_CMD }} mpiexec -n 1 python3 examples/petsc/Poisson/02_laplace.py
${{ env.RUN_CMD }} mpiexec -n 1 python3 examples/petsc/Poisson/03_poisson.py
${{ env.RUN_CMD }} mpiexec -n 1 python3 examples/petsc/Poisson/04_poisson.py
${{ env.RUN_CMD }} mpiexec -n 1 python3 examples/petsc/random/01_helmholtz.py
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about naming this folder 'misc' rather than 'random'?

${{ env.RUN_CMD }} mpiexec -n 1 python3 examples/petsc/random/02_biharmonic.py

- name: Upload coverage to Codecov
if: "!contains(matrix.name, 'docker')"
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
name: ${{ matrix.name }}
2 changes: 2 additions & 0 deletions .github/workflows/tutorials.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@ on:
push:
branches:
- main
- petsc
pull_request:
branches:
- main
- petsc

jobs:
tutorials:
Expand Down
9 changes: 8 additions & 1 deletion conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
from devito.ir.iet import (FindNodes, FindSymbols, Iteration, ParallelBlock,
retrieve_iteration_tree)
from devito.tools import as_tuple
from devito.petsc.config import PetscOSError, get_petsc_dir

try:
from mpi4py import MPI # noqa
Expand All @@ -34,7 +35,7 @@ def skipif(items, whole_module=False):
accepted = set()
accepted.update({'device', 'device-C', 'device-openmp', 'device-openacc',
'device-aomp', 'cpu64-icc', 'cpu64-icx', 'cpu64-nvc',
'noadvisor', 'cpu64-arm', 'cpu64-icpx', 'chkpnt'})
'noadvisor', 'cpu64-arm', 'cpu64-icpx', 'chkpnt', 'petsc'})
accepted.update({'nodevice'})
unknown = sorted(set(items) - accepted)
if unknown:
Expand Down Expand Up @@ -94,6 +95,12 @@ def skipif(items, whole_module=False):
if i == 'chkpnt' and Revolver is NoopRevolver:
skipit = "pyrevolve not installed"
break
if i == 'petsc':
try:
_ = get_petsc_dir()
except PetscOSError:
skipit = "PETSc is not installed"
break

if skipit is False:
return pytest.mark.skipif(False, reason='')
Expand Down
3 changes: 3 additions & 0 deletions devito/core/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
Cpu64CXXNoopCOperator, Cpu64CXXNoopOmpOperator,
Cpu64AdvCXXOperator, Cpu64AdvCXXOmpOperator,
Cpu64FsgCXXOperator, Cpu64FsgCXXOmpOperator,
Cpu64NoopPetscOperator, Cpu64AdvPetscOperator,
Cpu64CustomCXXOmpOperator, Cpu64CustomCOperator
)
from devito.core.intel import (
Expand Down Expand Up @@ -45,12 +46,14 @@
operator_registry.add(Cpu64NoopOmpOperator, Cpu64, 'noop', 'Copenmp')
operator_registry.add(Cpu64CXXNoopCOperator, Cpu64, 'noop', 'CXX')
operator_registry.add(Cpu64CXXNoopOmpOperator, Cpu64, 'noop', 'CXXopenmp')
operator_registry.add(Cpu64NoopPetscOperator, Cpu64, 'noop', 'petsc')

operator_registry.add(Cpu64AdvCOperator, Cpu64, 'advanced', 'C')
operator_registry.add(Cpu64AdvOmpOperator, Cpu64, 'advanced', 'openmp')
operator_registry.add(Cpu64AdvOmpOperator, Cpu64, 'advanced', 'Copenmp')
operator_registry.add(Cpu64AdvCXXOperator, Cpu64, 'advanced', 'CXX')
operator_registry.add(Cpu64AdvCXXOmpOperator, Cpu64, 'advanced', 'CXXopenmp')
operator_registry.add(Cpu64AdvPetscOperator, Cpu64, 'advanced', 'petsc')

operator_registry.add(Cpu64FsgCOperator, Cpu64, 'advanced-fsg', 'C')
operator_registry.add(Cpu64FsgOmpOperator, Cpu64, 'advanced-fsg', 'openmp')
Expand Down
31 changes: 29 additions & 2 deletions devito/core/cpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,16 @@
from devito.passes.iet import (CTarget, CXXTarget, COmpTarget, CXXOmpTarget,
avoid_denormals, linearize,
mpiize, hoist_prodders, relax_incr_dimensions,
check_stability)
check_stability, PetscTarget)
from devito.tools import timed_pass

from devito.petsc.iet.passes import lower_petsc_symbols

__all__ = ['Cpu64NoopCOperator', 'Cpu64NoopOmpOperator', 'Cpu64AdvCOperator',
'Cpu64AdvOmpOperator', 'Cpu64FsgCOperator', 'Cpu64FsgOmpOperator',
'Cpu64CustomOperator', 'Cpu64CustomCXXOperator', 'Cpu64AdvCXXOperator',
'Cpu64AdvCXXOmpOperator', 'Cpu64FsgCXXOperator', 'Cpu64FsgCXXOmpOperator']
'Cpu64AdvCXXOmpOperator', 'Cpu64FsgCXXOperator', 'Cpu64FsgCXXOmpOperator',
'Cpu64NoopPetscOperator']


class Cpu64OperatorMixin:
Expand Down Expand Up @@ -142,6 +145,9 @@ def _specialize_iet(cls, graph, **kwargs):
# Symbol definitions
cls._Target.DataManager(**kwargs).process(graph)

# Lower PETSc symbols
lower_petsc_symbols(graph, **kwargs)

return graph


Expand Down Expand Up @@ -221,6 +227,9 @@ def _specialize_iet(cls, graph, **kwargs):
# Symbol definitions
cls._Target.DataManager(**kwargs).process(graph)

# Lower PETSc symbols
lower_petsc_symbols(graph, **kwargs)

# Linearize n-dimensional Indexeds
linearize(graph, **kwargs)

Expand Down Expand Up @@ -360,6 +369,15 @@ class Cpu64CXXNoopOmpOperator(Cpu64NoopOperator):
LINEARIZE = True


class Cpu64NoopPetscOperator(Cpu64NoopOperator):
_Target = PetscTarget

@classmethod
def _rcompile_wrapper(cls, **kwargs0):
kwargs0['language'] = 'petsc'
return super()._rcompile_wrapper(**kwargs0)


class Cpu64AdvCOperator(Cpu64AdvOperator):
_Target = CTarget

Expand All @@ -369,6 +387,15 @@ class Cpu64AdvCXXOperator(Cpu64AdvOperator):
LINEARIZE = True


class Cpu64AdvPetscOperator(Cpu64AdvOperator):
_Target = PetscTarget

@classmethod
def _rcompile_wrapper(cls, **kwargs0):
kwargs0['language'] = 'petsc'
return super()._rcompile_wrapper(**kwargs0)


class Cpu64AdvOmpOperator(Cpu64AdvOperator):
_Target = COmpTarget

Expand Down
3 changes: 2 additions & 1 deletion devito/ir/equations/algorithms.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,8 @@ def concretize_subdims(exprs, **kwargs):
"""
sregistry = kwargs.get('sregistry')

mapper = {}
# To be updated based on changes in #2509
mapper = kwargs.get('concretize_mapper', {})
rebuilt = {} # Rebuilt implicit dims etc which are shared between dimensions

_concretize_subdims(exprs, mapper, rebuilt, sregistry)
Expand Down
10 changes: 7 additions & 3 deletions devito/ir/equations/equation.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@
Stencil, detect_io, detect_accesses)
from devito.symbolics import IntDiv, limits_mapper, uxreplace
from devito.tools import Pickable, Tag, frozendict
from devito.types import Eq, Inc, ReduceMax, ReduceMin, relational_min
from devito.types import (Eq, Inc, ReduceMax, ReduceMin,
relational_min)
from devito.types.equation import PetscEq

__all__ = ['LoweredEq', 'ClusterizedEq', 'DummyEq', 'OpInc', 'OpMin', 'OpMax',
'identity_mapper']
'identity_mapper', 'OpPetsc']


class IREq(sympy.Eq, Pickable):
Expand Down Expand Up @@ -102,7 +104,8 @@ def detect(cls, expr):
reduction_mapper = {
Inc: OpInc,
ReduceMax: OpMax,
ReduceMin: OpMin
ReduceMin: OpMin,
PetscEq: OpPetsc
}
try:
return reduction_mapper[type(expr)]
Expand All @@ -119,6 +122,7 @@ def detect(cls, expr):
OpInc = Operation('+')
OpMax = Operation('max')
OpMin = Operation('min')
OpPetsc = Operation('solve')


identity_mapper = {
Expand Down
4 changes: 4 additions & 0 deletions devito/ir/iet/algorithms.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
from devito.ir.iet import (Expression, Increment, Iteration, List, Conditional, SyncSpot,
Section, HaloSpot, ExpressionBundle)
from devito.tools import timed_pass
from devito.petsc.types import MetaData
from devito.petsc.iet.nodes import petsc_iet_mapper

__all__ = ['iet_build']

Expand All @@ -24,6 +26,8 @@ def iet_build(stree):
for e in i.exprs:
if e.is_Increment:
exprs.append(Increment(e))
elif isinstance(e.rhs, MetaData):
exprs.append(petsc_iet_mapper[e.operation](e, operation=e.operation))
else:
exprs.append(Expression(e, operation=e.operation))
body = ExpressionBundle(i.ispace, i.ops, i.traffic, body=exprs)
Expand Down
4 changes: 2 additions & 2 deletions devito/ir/iet/efunc.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from functools import cached_property

from devito.ir.iet.nodes import Call, Callable
from devito.ir.iet.nodes import Call, Callable, FixedArgsCallable
from devito.ir.iet.utils import derive_parameters
from devito.symbolics import uxreplace
from devito.tools import as_tuple
Expand Down Expand Up @@ -131,7 +131,7 @@ class AsyncCall(Call):
pass


class ThreadCallable(Callable):
class ThreadCallable(FixedArgsCallable):

"""
A Callable executed asynchronously by a thread.
Expand Down
Loading
Loading