-
Notifications
You must be signed in to change notification settings - Fork 44
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
Implement global-to-global dash::copy based on #659 #660
base: development
Are you sure you want to change the base?
Conversation
dash/include/dash/algorithm/Copy.h
Outdated
class GlobInputIt, | ||
class GlobOutputIt, | ||
typename ValueType = typename GlobInputIt::value_type> | ||
GlobOutputIt copy_to( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not require the team of units involved in the global-to-global copy to be passed and identify the direction based on that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That would result in an API change for dash::copy
, right? Is this intended? It also will result in a runtime decision. But at least we could stick with dash::copy
instead of two new names. Not my decision.
Btw, should global-to-global also get an async variant?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would like to have a selection based on an template parameter, either true/false or an enum. That would retain the API and we have compile time selection.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right, the copy has to be collective over one of the two teams (either from the input or from the output iterators). There should be no default IMO because that may only be valid in 50% of the cases. A template parameter is fine with me, preferably an enum
(or struct
encapsulating the decision on what is local and what is remote).
Another note: global-to-global needs to have a barrier at the end to make sure that all data has been exchanged (including transfers into the unit's local memory).
Btw, should global-to-global also get an async variant?
I'd say yes. It would require a non-blocking barrier to facilitate the test/wait in the future though, something we don't have in DART atm (but which is easily added for dart-mpi, not sure about dart-gaspi. @dhinf ?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's put it this way. GASPI doesn't provide an IBarrier :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another note: global-to-global needs to have a barrier at the end to make sure that all data has been exchanged (including transfers into the unit's local memory).
They are already there and also on the function entry. What is the policy here in general?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd say yes. It would require a non-blocking barrier to facilitate the test/wait in the future though, something we don't have in DART atm (but which is easily added for dart-mpi, not sure about dart-gaspi. @dhinf ?)
I think we should postpone this then.
c150a41
to
07f640a
Compare
This way one can call copy_impl multiple times, before triggering local copies.
Active team selection is now done by tag struct argument.
Codecov Report
@@ Coverage Diff @@
## development #660 +/- ##
===============================================
+ Coverage 83.65% 84.04% +0.39%
===============================================
Files 336 336
Lines 24968 25063 +95
Branches 11354 11416 +62
===============================================
+ Hits 20887 21065 +178
- Misses 3692 3694 +2
+ Partials 389 304 -85
|
This is green now (though I'm note sure what this MatrixTest tried to achieved). Any more comments? Thanks. |
76a910b
to
0ecb39b
Compare
No description provided.