diff --git a/test/test_mpi_communication.py b/test/test_mpi_communication.py index 24e3d63805be26d573e0292c06109c9a2ddc6f95..8e053f6fda10314d569289fed7022bd428e4444d 100644 --- a/test/test_mpi_communication.py +++ b/test/test_mpi_communication.py @@ -150,19 +150,21 @@ def _test_func_comparison_mpi_communication_entrypoint(actx): bdry_faces_func = op.project(dcoll, BTAG_ALL, dd_af, op.project(dcoll, dd_vol, BTAG_ALL, myfunc)) - hopefully_zero = ( - op.project( - dcoll, "int_faces", "all_faces", - dcoll.opposite_face_connection()(int_faces_func) - ) - + sum(op.project(dcoll, tpair.dd, "all_faces", tpair.int) - for tpair in op.cross_rank_trace_pairs(dcoll, myfunc, - comm_tag=SimpleTag)) - ) - (all_faces_func - bdry_faces_func) + def hopefully_zero(): + return ( + op.project( + dcoll, "int_faces", "all_faces", + dcoll.opposite_face_connection()(int_faces_func) + ) + + sum(op.project(dcoll, tpair.dd, "all_faces", tpair.ext) + for tpair in op.cross_rank_trace_pairs(dcoll, myfunc, + comm_tag=SimpleTag)) + ) - (all_faces_func - bdry_faces_func) + + hopefully_zero_result = actx.compile(hopefully_zero)() - error = actx.to_numpy(flat_norm(hopefully_zero, ord=np.inf)) + error = actx.to_numpy(flat_norm(hopefully_zero_result, ord=np.inf)) - print(__file__) with np.printoptions(threshold=100000000, suppress=True): logger.debug(hopefully_zero) logger.info("error: %.5e", error)