Skip to content

Make both src and dst call back when ready #644

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

jbakosi
Copy link
Member

@jbakosi jbakosi commented Mar 18, 2025

This modifies mesh-to-mesh transfer so that both the src and the dst side call back to client code when each is ready, as opposed to the previous solution which only called back from dst when a transfer step was done.

This simplifies client code logic after a transfer step and also enables to/from transfer with meshes using unequal number of chares. This can happen using different virtualization for different meshes or using the same virtualization but for meshes with significantly different number of elements. As far as I know, the former has not been exercised so far, since this is not exposed to the user, while the latter may happen but has not occurred due to limited testing using virtualization (and in parallel).

Note that I only modified the code immediately before and after a transfer step (in Discretization), and did not attempt to remove the global sync between the 'to' and 'from' transfer steps because that would tie in with logic in OversetFE::setTransferFlags(). It is possible that this global sync could be removed in the future, because my implementation of this same idea in xyst, where client code is still a bit simpler, works without this global sync.

More testing would be good. In particular, setting unequal virtualization for different meshes could be exposed to the user and that would allow testing that case as well (which was the original use case triggered the problem being solved in the first place).


This change is Reviewable

This modifies mesh-to-mesh transfer so that both the src and the dst
side call back to client code when each is ready, as opposed to the
previous solution which only called back from dst when a transfer step
was done.

This simplifies client code logic after a transfer step and also enables
to/from transfer with meshes using unequal number of chares. This can
happen using different virtualization for different meshes or using the
same virtualization but for meshes with significantly different number
of elements. As far as I know, the former has not been exercised so far,
since this is not exposed to the user, while the latter may happen but
has not occurred due to limited testing using virtualization (and in
parallel).

Note that I only modified the code immediately before and after a transfer
step (in Discretization), and did not attempt to remove the global sync
between the 'to' and 'from' transfer steps because that would tie in with
logic in OversetFE::setTransferFlags(). It is possible that this global
sync could be removed in the future, because my implementation of this
same idea in xyst, where client code is still a bit simpler, works
without this global sync.

More testing would be good. In particular, setting unequal
virtualization for different meshes could be exposed to the user and
that would allow testing that case as well (which was the original use
case triggered the problem being solved in the first place).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant