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
155 stars 44 forks source link

DART API calls with DART_UNDEFINED_UNIT_ID #617

Open rkowalewski opened 5 years ago

rkowalewski commented 5 years ago

All DART API calls validate the unitId arguments (source and destination) to be in the range 0 <= unitId < team_size. Unfortunately, this prohibits the possibility to pass DART_UNEFINED_UNIT_ID as an equivalent to MPI_PROC_NULL which is a valid parameter in MPI communication routines. This greatly simplifies code and leaves possible optimizations to MPI. We do not have a notion of DART_UNIT_ID_NULL or something similar. That is something we certainly need. At least I need it in dash::sort to provide a very simple ring-communication based on dart_sendrecv.

rkowalewski commented 5 years ago

So I did a small fix for me and mapped DART_UNDEFINED_UNIT_ID to MPI_PROC_NULL, see this code. But we need a more general solution there since it affects all communication routines.

devreal commented 5 years ago

Interesting use-case, didn't think we'd need that. Introducing that globally should be straight-forward (afaics, it's only relevant for put/get/send/recv/sendrecv, right?). Except for sendrecv, we can short-cut and avoid a call to MPI alltogether...

rkowalewski commented 5 years ago

You may be right. It is not really urgent since I have a "fix" for my use case, so prioritize more critical stuff for you.