Skip to content

Commit

Permalink
Placate flake8
Browse files Browse the repository at this point in the history
  • Loading branch information
gaohao95 committed Jun 23, 2024
1 parent 4e6049d commit 5cfb872
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ git+https://github.com/inducer/modepy.git#egg=modepy
git+https://github.com/inducer/pyopencl.git#egg=pyopencl
git+https://github.com/inducer/islpy.git#egg=islpy
git+https://github.com/inducer/loopy.git#egg=loopy
git+https://github.com/inducer/boxtree.git#egg=boxtree
git+https://github.com/gaohao95/boxtree.git@dist-pytential#egg=boxtree
git+https://github.com/inducer/arraycontext.git#egg=arraycontext
git+https://github.com/inducer/meshmode.git#egg=meshmode
git+https://github.com/inducer/sumpy.git#egg=sumpy
Expand Down
14 changes: 7 additions & 7 deletions test/test_distributed.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ def _test_urchin_against_single_rank(ctx_factory, m, n, op_wrapper, use_tsqbx):
u = 1 / dist
grad_u = -diff / dist ** 3
else:
assert False
raise RuntimeError("Unsupported dimension")

# }}}

Expand All @@ -226,11 +226,11 @@ def _test_urchin_against_single_rank(ctx_factory, m, n, op_wrapper, use_tsqbx):
density_discr.nodes(),
actx.from_numpy(grad_u.ravel()), actx, strict=False)

context = {'u': u_dev, 'grad_u': grad_u_dev}
context = {"u": u_dev, "grad_u": grad_u_dev}
else:
places = None
op = None
context = {'u': None, 'grad_u': None}
context = {"u": None, "grad_u": None}

from pytential.symbolic.execution import bind_distributed
bound_op = bind_distributed(comm, places, op)
Expand All @@ -244,7 +244,7 @@ def _test_urchin_against_single_rank(ctx_factory, m, n, op_wrapper, use_tsqbx):
**params)
places = GeometryCollection(qbx)

context = {'u': u_dev, 'grad_u': grad_u_dev}
context = {"u": u_dev, "grad_u": grad_u_dev}
single_node_result = bind(places, op)(actx, **context)

distributed_result = actx.to_numpy(flatten(distributed_result, actx))
Expand Down Expand Up @@ -286,16 +286,16 @@ def test_urchin_against_single_rank(
if "PYTEST" in os.environ:
if os.environ["PYTEST"] == "1":
# Run "test_off_surface_eval" test case
use_fmm = (os.environ["use_fmm"] == 'True')
do_plot = (os.environ["do_plot"] == 'True')
use_fmm = (os.environ["use_fmm"] == "True")
do_plot = (os.environ["do_plot"] == "True")

_test_off_surface_eval(cl.create_some_context, use_fmm, do_plot=do_plot)
elif os.environ["PYTEST"] == "2":
# Run "test_urchin_against_single_rank" test case
m = int(os.environ["m"])
n = int(os.environ["n"])
op_wrapper_str = os.environ["op_wrapper"]
use_tsqbx = (os.environ["use_tsqbx"] == 'True')
use_tsqbx = (os.environ["use_tsqbx"] == "True")

if op_wrapper_str == "single_layer_wrapper":
op_wrapper = single_layer_wrapper
Expand Down

0 comments on commit 5cfb872

Please sign in to comment.