dash-project / dash

DASH, the C++ Template Library for Distributed Data Structures with Support for Hierarchical Locality for HPC and Data-Driven Science
http://www.dash-project.org/
Other
153 stars 44 forks source link

Fix multi-node copy operations #401

Closed devreal closed 7 years ago

devreal commented 7 years ago

dash::copy is broken for copy operations spanning more than the current node and its neighbors.

Example:

dash::Array<int> arr(dash::size());
std::vector<int> vec(dash::size());

dash::copy(vec.begin(), vec.end(), arr.begin());

with dash::size() > 3.

Related: #386 for dash::transform

fuchsto commented 7 years ago

It's the local-to-global variants only, right? Global-to-local copying has been evaluated and benchmarked in lots of use cases, I would expect it's fine, Local-to-global has just been implemented for a single scenario and didn't get any love, yet. And, yes, that's annoying ... as you wrote yesterday, it's crucial to document "restricted" implementations like this one

The n-dim ranges and views can solve the underlying partitioning problem. So I prioritize documentation of views first and then power-wash the algorithms section.

devreal commented 7 years ago

It's the local-to-global variants only, right? Global-to-local copying has been evaluated and benchmarked in lots of use cases, I would expect it's fine, Local-to-global has just been implemented for a single scenario and didn't get any love, yet.

Yes, you're right. I seem to have missed the while loop in the global-to-local overload of copy_impl that iterates over the source units.

The n-dim ranges and views can solve the underlying partitioning problem. So I prioritize documentation of views first and then power-wash the algorithms section.

Sounds good to me :+1:

devreal commented 7 years ago

Closing this as a duplicate of #346