Skip to content

Commit

Permalink
Fix CI failure
Browse files Browse the repository at this point in the history
  • Loading branch information
gaohao95 committed Oct 28, 2023
1 parent 514ccc0 commit 3f19bd7
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
1 change: 1 addition & 0 deletions .test-conda-env-py3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@ dependencies:
- cython
- gmsh
- pyvkfft
- mpi4py
4 changes: 3 additions & 1 deletion examples/off-surface-eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ def main():
fmm_order=fmm_order)

from sumpy.kernel import LaplaceKernel
op = pytential.sym.D(LaplaceKernel(2), pytential.sym.var("sigma"), qbx_forced_limit=-2)
op = pytential.sym.D(
LaplaceKernel(2), pytential.sym.var("sigma"), qbx_forced_limit=-2)

if mpi_rank == 0:
sigma = layer_pot_source.density_discr.zeros(actx) + 1
Expand Down Expand Up @@ -107,5 +108,6 @@ def main():
plt.colorbar()
plt.show()


if __name__ == "__main__":
main()
7 changes: 3 additions & 4 deletions pytential/qbx/distributed.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
from boxtree.tools import DeviceDataRecord
from boxtree.timing import TimingRecorder
from pytools import memoize_method
import six


@dataclass
Expand Down Expand Up @@ -671,7 +670,7 @@ def exec_compute_potential_insn_fmm(self, actx: PyOpenCLArrayContext,
calibration_params = AbstractQBXCostModel.get_unit_calibration_params()

kernel_args = {}
for arg_name, arg_expr in six.iteritems(insn.kernel_arguments):
for arg_name, arg_expr in insn.kernel_arguments.items():
kernel_args[arg_name] = evaluate(arg_expr)

boxes_time, _ = cost_model.qbx_cost_per_box(
Expand Down Expand Up @@ -773,8 +772,8 @@ def exec_compute_potential_insn_fmm(self, actx: PyOpenCLArrayContext,
output_and_expansion_dtype,
self.qbx_order,
self.fmm_level_to_order,
source_extra_kwargs=source_extra_kwargs,
kernel_extra_kwargs=kernel_extra_kwargs,
source_extra_kwargs,
kernel_extra_kwargs,
_use_target_specific_qbx=self._use_target_specific_qbx)

if self.comm.Get_rank() == 0:
Expand Down
2 changes: 1 addition & 1 deletion pytential/symbolic/execution.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ def exec_assign(self, actx: PyOpenCLArrayContext, insn, bound_expr, evaluate):
if self.comm.Get_rank() == 0:
return super().exec_assign(actx, insn, bound_expr, evaluate)
else:
return dict()
return {}

def exec_compute_potential_insn(
self, actx: PyOpenCLArrayContext, insn, bound_expr, evaluate):
Expand Down

0 comments on commit 3f19bd7

Please sign in to comment.