Skip to content

Commit

Permalink
Update merged trace_pair
Browse files Browse the repository at this point in the history
  • Loading branch information
MTCam committed Dec 6, 2024
1 parent 17485dc commit c9eb887
Showing 1 changed file with 25 additions and 6 deletions.
31 changes: 25 additions & 6 deletions grudge/trace_pair.py
Original file line number Diff line number Diff line change
Expand Up @@ -897,12 +897,31 @@ def cross_rank_trace_pairs(
comm_tag = tag
del tag

if isinstance(ary, Number):
# NOTE: Assumed that the same number is passed on every rank
return [TracePair(
volume_dd.trace(BTAG_PARTITION(remote_rank)),
interior=ary, exterior=ary)
for remote_rank in connected_parts(dcoll, volume_dd=volume_dd)]
# This next bit causes a strange error for multi-volume domains:
# -------
# File "/mirgecom/diffusion.py", line 835, in diffusion_operator
# kappa_tpairs = interior_trace_pairs(
# ^^^^^^^^^^^^^^^^^^^^^
# File "grudge/trace_pair.py", line 385, in interior_trace_pairs
# *cross_rank_trace_pairs(dcoll, vec, comm_tag=comm_tag, volume_dd=volume_dd)]
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
# File "grudge/trace_pair.py", line 905, in cross_rank_trace_pairs
# for remote_rank in connected_parts(dcoll, volume_dd=volume_dd)]
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
# File "pytools/__init__.py", line 747, in wrapper
# result = function(obj, *args, **kwargs)
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
# TypeError: connected_parts() missing 2 required positional arguments:
# 'self_volume_tag' and 'other_volume_tag'
# --------

# Disabling this bit due to above error
# if isinstance(ary, Number):
# # NOTE: Assumed that the same number is passed on every rank
# return [TracePair(
# volume_dd.trace(BTAG_PARTITION(remote_rank)),
# interior=ary, exterior=ary)
# for remote_rank in connected_parts(dcoll, volume_dd=volume_dd)]

rank = dcoll.mpi_communicator.Get_rank()

Expand Down

0 comments on commit c9eb887

Please sign in to comment.