Skip to content

Commit b354603

Browse files
committed
#2240: Fix compile issues on some compilers and runtime issue with passing proxy by reference
1 parent 62fcff5 commit b354603

File tree

4 files changed

+10
-7
lines changed

4 files changed

+10
-7
lines changed

src/vt/collective/reduce/allreduce/rabenseifner.impl.h

+8-4
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ Rabenseifner<DataT, Op, ObjT, finalHandler>::Rabenseifner(
7474
vrt_node_ = this_node_ - nprocs_rem_;
7575
}
7676

77+
vt_debug_print(terse, allreduce, "Rabenseifner constructor\n");
7778
initialize(generateNewId(), std::forward<Args>(data)...);
7879
}
7980

@@ -83,6 +84,8 @@ template <
8384
{
8485
auto& state = states_[id];
8586

87+
vt_debug_print(terse, allreduce, "Rabenseifner initializing state for ID = {}\n", id);
88+
8689
state.scatter_messages_.resize(num_steps_, nullptr);
8790
state.scatter_steps_recv_.resize(num_steps_, false);
8891
state.scatter_steps_reduced_.resize(num_steps_, false);
@@ -173,6 +176,7 @@ template <
173176
typename DataT, template <typename Arg> class Op, typename ObjT,
174177
auto finalHandler>
175178
void Rabenseifner<DataT, Op, ObjT, finalHandler>::allreduce(size_t id) {
179+
vt_debug_print(terse, allreduce, "Rabenseifner allreduce is_part_of_adjustment_group_ = {}\n", is_part_of_adjustment_group_);
176180
if (is_part_of_adjustment_group_) {
177181
adjustForPowerOfTwo(id);
178182
} else {
@@ -188,6 +192,10 @@ void Rabenseifner<DataT, Op, ObjT, finalHandler>::adjustForPowerOfTwo(size_t id)
188192
auto& state = states_.at(id);
189193
auto const partner = is_even_ ? this_node_ + 1 : this_node_ - 1;
190194

195+
vt_debug_print(
196+
terse, allreduce, "Rabenseifner (Send Part1): To Node {} ID = {}\n", partner, id
197+
);
198+
191199
if (is_even_) {
192200
proxy_[partner]
193201
.template send<&Rabenseifner::adjustForPowerOfTwoRightHalf>(
@@ -204,10 +212,6 @@ void Rabenseifner<DataT, Op, ObjT, finalHandler>::adjustForPowerOfTwo(size_t id)
204212
adjustForPowerOfTwoRightHalf(state.right_adjust_message_.get());
205213
}
206214
}
207-
208-
vt_debug_print(
209-
terse, allreduce, "Rabenseifner (Send Part1): To Node {} ID = {}\n", partner, id
210-
);
211215
}
212216
}
213217

src/vt/collective/reduce/allreduce/recursive_doubling.impl.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ void RecursiveDoubling<DataT, Op, ObjT, finalHandler>::tryReduce(size_t id, int3
241241

242242
vt_debug_print(
243243
terse, allreduce, "RecursiveDoubling Part2 (Reduce step {}): state.step_ = {} state.steps_reduced_[step] = {} state.steps_recv_[step] = {} all_msgs_received = {} ID = {} \n",
244-
step, state.step_, state.steps_reduced_[step], state.steps_recv_[step], all_msgs_received, id);
244+
step, state.step_, static_cast<bool>(state.steps_reduced_[step]), static_cast<bool>(state.steps_recv_[step]), all_msgs_received, id);
245245

246246
if (
247247
(step < state.step_) and not state.steps_reduced_[step] and

src/vt/objgroup/manager.impl.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ ObjGroupManager::PendingSendType ObjGroupManager::allreduce(
299299

300300
return PendingSendType{
301301
theTerm()->getEpoch(),
302-
[&] { grp_proxy[this_node].template invoke<&Reducer::allreduce>(id); }
302+
[=] { grp_proxy[this_node].template invoke<&Reducer::allreduce>(id); }
303303
};
304304
}
305305

tests/perf/allreduce.cc

-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@
5353
#include <vt/collective/reduce/allreduce/rabenseifner.h>
5454
#include <vt/collective/reduce/allreduce/recursive_doubling.h>
5555

56-
#include <fmt-vt/core.h>
5756
#ifdef MAGISTRATE_KOKKOS_ENABLED
5857
#include <Kokkos_Core.hpp>
5958
#endif

0 commit comments

Comments
 (0)