Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,8 @@ RETURN_STATUS run_bsp_scheduler(const ConfigParser &parser, const boost::propert
if (status != RETURN_STATUS::OSP_SUCCESS && status != RETURN_STATUS::BEST_FOUND) {
throw std::invalid_argument("Error while computing initial solution.\n");
}
scheduler.setInitialSolutionFromBspSchedule(initial_schedule);
BspScheduleCS<Graph_t> initial_schedule_cs(initial_schedule);
scheduler.setInitialSolutionFromBspSchedule(initial_schedule_cs);
}

// intermediate solutions
Expand Down
4 changes: 2 additions & 2 deletions include/osp/bsp/model/BspScheduleCS.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ class BspScheduleCS : public BspSchedule<Graph_t> {
const std::map<KeyTriple, unsigned int> &comm_)
: BspSchedule<Graph_t>(inst, processor_assignment_, superstep_assignment_), commSchedule(comm_) {}

BspScheduleCS(BspSchedule<Graph_t> &&schedule) : BspSchedule<Graph_t>(std::move(schedule)) {
explicit BspScheduleCS(BspSchedule<Graph_t> &&schedule) : BspSchedule<Graph_t>(std::move(schedule)) {
setAutoCommunicationSchedule();
}

Expand All @@ -124,7 +124,7 @@ class BspScheduleCS : public BspSchedule<Graph_t> {
comm_.clear();
}

BspScheduleCS(const BspSchedule<Graph_t> &schedule) : BspSchedule<Graph_t>(schedule) {
explicit BspScheduleCS(const BspSchedule<Graph_t> &schedule) : BspSchedule<Graph_t>(schedule) {
setAutoCommunicationSchedule();
}

Expand Down
4 changes: 2 additions & 2 deletions tests/ilp_bsp_scheduler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -174,13 +174,13 @@ BOOST_AUTO_TEST_CASE(test_full) {
MaxBspScheduleCS<graph> schedule_max(instance);
scheduler_max.setTimeLimitSeconds(10);
const auto result_max = scheduler_max.computeMaxBspScheduleCS(schedule_max);
BOOST_CHECK_EQUAL(RETURN_STATUS::BEST_FOUND, result_max);
BOOST_CHECK(result_max == RETURN_STATUS::OSP_SUCCESS || result_max == RETURN_STATUS::BEST_FOUND);
BOOST_CHECK(schedule_max.satisfiesPrecedenceConstraints());
BOOST_CHECK(schedule_max.hasValidCommSchedule());

scheduler_max.setInitialSolutionFromBspSchedule(schedule_max);
const auto result_max2 = scheduler_max.computeMaxBspScheduleCS(schedule_max);
BOOST_CHECK_EQUAL(RETURN_STATUS::BEST_FOUND, result_max2);
BOOST_CHECK(result_max2 == RETURN_STATUS::OSP_SUCCESS || result_max2 == RETURN_STATUS::BEST_FOUND);
BOOST_CHECK(schedule_max.satisfiesPrecedenceConstraints());
BOOST_CHECK(schedule_max.hasValidCommSchedule());

Expand Down