Skip to content

Commit a8763f2

Browse files
committed
misc: cleanup deprecated
1 parent 2b933a2 commit a8763f2

File tree

8 files changed

+10
-10
lines changed

8 files changed

+10
-10
lines changed

conftest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
import pytest
66
from sympy import Add
7+
from sympy.printing import sstr
78

89
from devito import Eq, configuration, Revolver # noqa
910
from devito.checkpointing import NoopRevolver
@@ -295,9 +296,8 @@ def pytest_make_parametrize_id(config, val, argname):
295296
# First see if it has a name
296297
if hasattr(val, '__name__'):
297298
return val.__name__
298-
# Then try str(val)
299299
try:
300-
return str(val)
300+
return sstr(val)
301301
except Exception:
302302
return None # Fall back to default behavior
303303

examples/cfd/01_convection.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@
382382
"# Now combine the BC expressions with the stencil to form operator\n",
383383
"expressions = [Eq(u.forward, stencil)]\n",
384384
"expressions += [bc_left, bc_right, bc_top, bc_bottom]\n",
385-
"op = Operator(expressions=expressions, opt=None, openmp=False) # <-- Turn off performance optimisations\n",
385+
"op = Operator(expressions=expressions, opt=None, language='C') # <-- Turn off performance optimisations\n",
386386
"op(time=nt, dt=dt)\n",
387387
"\n",
388388
"plot_field(u.data[0])\n",

examples/cfd/01_convection_revisited.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@
359359
"# Now combine the BC expressions with the stencil to form operator.\n",
360360
"expressions = [Eq(u.forward, stencil, subdomain=grid.interior)]\n",
361361
"expressions += [bc_left, bc_right, bc_top, bc_bottom]\n",
362-
"op = Operator(expressions=expressions, opt=None, openmp=False) # <-- Turn off performance optimisations\n",
362+
"op = Operator(expressions=expressions, opt=None, language='C') # <-- Turn off performance optimisations\n",
363363
"op(time=nt, dt=dt)\n",
364364
"\n",
365365
"plot_field(u.data[0])\n",

examples/userapi/05_conditional_dimension.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -792,8 +792,8 @@
792792
"for n, i in enumerate(f.dimensions):\n",
793793
" eqs.append(Eq(g[k, n], f.dimensions[n], implicit_dims=(f.dimensions + (ci,))))\n",
794794
"\n",
795-
"# TODO: Must be openmp=False for now due to issue #2061\n",
796-
"op0 = Operator(eqs, openmp=False)\n",
795+
"# TODO: Must be language='C' for now due to issue #2061\n",
796+
"op0 = Operator(eqs, language='C')\n",
797797
"op0.apply()\n",
798798
"print(op0.body.body[-1])\n",
799799
"\n",

tests/test_dimension.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1087,7 +1087,7 @@ def test_subsampled_fd(self):
10871087
assert np.all(u2.data[1, 1:4, 1:4] == 0.)
10881088

10891089
# This test generates an openmp loop form which makes older gccs upset
1090-
@switchconfig(openmp=False)
1090+
@switchconfig(language='C')
10911091
def test_nothing_in_negative(self):
10921092
"""Test the case where when the condition is false, there is nothing to do."""
10931093
nt = 4

tests/test_dle.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -627,7 +627,7 @@ class DummyBarrier(sympy.Function, Barrier):
627627
Eq(Symbol('dummy2'), DummyBarrier(time)),
628628
Eq(r.forward, r.dy + 1)]
629629

630-
op = Operator(eqns, openmp=False)
630+
op = Operator(eqns, language='C')
631631

632632
unique = 't,x0_blk0,y0_blk0,x,y,z'
633633
reused = 't,x1_blk0,y1_blk0,x,y,z'

tests/test_iet.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def test_conditional(fc, grid):
5252
(('Eq(v[t,x,y], v[t,x-1,y] + 1)', 'Eq(v[t,x,y], v[t,x+1,y] + u[x,y])'),
5353
(1, 2), (1, 1), ('xy', 'xy'))
5454
])
55-
@switchconfig(openmp=False)
55+
@switchconfig(language='C')
5656
def test_make_efuncs(exprs, nfuncs, ntimeiters, nests):
5757
"""Test construction of ElementalFunctions."""
5858
exprs = list(as_tuple(exprs))

tests/test_mpi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3236,7 +3236,7 @@ def test_adjoint_F(self, nd, mode):
32363236
self.run_adjoint_F(nd)
32373237

32383238
@pytest.mark.parallel(mode=[(8, 'diag2'), (8, 'full')])
3239-
@switchconfig(openmp=False)
3239+
@switchconfig(language='C')
32403240
def test_adjoint_F_no_omp(self, mode):
32413241
"""
32423242
``run_adjoint_F`` with OpenMP disabled. By disabling OpenMP, we can

0 commit comments

Comments
 (0)