Skip to content

Commit 6e9a758

Browse files
use hash of comm_tag if not numeric
1 parent 44760a5 commit 6e9a758

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

grudge/trace_pair.py

+6-3
Original file line numberDiff line numberDiff line change
@@ -497,9 +497,12 @@ def cross_rank_trace_pairs(
497497
num_tag = actx.comm_tag_to_mpi_tag.get(comm_tag)
498498

499499
if num_tag is None:
500-
raise ValueError("Encountered unknown symbolic tag "
501-
f"'{comm_tag}'. To make this symbolic tag work, "
502-
f"use 'grudge.array_context.MPIPyOpenCLArrayContext' and "
500+
num_tag = hash(comm_tag)
501+
from warnings import warn
502+
warn("Encountered unknown symbolic tag "
503+
f"'{comm_tag}', assigning a value of '{num_tag}'. "
504+
"To use a different value, "
505+
"use 'grudge.array_context.MPIPyOpenCLArrayContext' and "
503506
"assign this tag a numerical value via its "
504507
"comm_tag_to_mpi_tag attribute.")
505508

0 commit comments

Comments
 (0)