Skip to content
Snippets Groups Projects

Use MPI_Comm_dup to separate ArborX comm context from user's

Merged Arndt, Daniel requested to merge github/fork/aprokop/use_comm_dup into master
1 file
+ 7
2
Compare changes
  • Side-by-side
  • Inline
@@ -40,6 +40,8 @@ public:
template <typename Primitives>
DistributedSearchTree(MPI_Comm comm, Primitives const &primitives);
~DistributedSearchTree() { MPI_Comm_free(&_comm); }
/** Returns the smallest axis-aligned box able to contain all the objects
* stored in the tree or an invalid box if the tree is empty.
*/
@@ -105,9 +107,12 @@ template <typename DeviceType>
template <typename Primitives>
DistributedSearchTree<DeviceType>::DistributedSearchTree(
MPI_Comm comm, Primitives const &primitives)
: _comm(comm)
, _bottom_tree(primitives)
: _bottom_tree(primitives)
{
// Create new context for the library to isolate library's communication from
// user's
MPI_Comm_dup(comm, &_comm);
int comm_rank;
MPI_Comm_rank(_comm, &comm_rank);
int comm_size;
Loading