Skip to content

Commit 8b556ea

Browse files
various small bugfixes (#22)
1 parent 811f6f6 commit 8b556ea

File tree

4 files changed

+10
-5
lines changed

4 files changed

+10
-5
lines changed

include/osp/auxiliary/io/hdag_graph_file_reader.hpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,12 +252,17 @@ bool readComputationalDagHyperdagFormatDB(std::ifstream& infile, Graph_t& graph)
252252
graph.set_vertex_comm_weight(static_cast<vertex_idx_t<Graph_t>>(node), hyperedge_comm_weights[edgeIdx]);
253253
graph.set_vertex_mem_weight(static_cast<vertex_idx_t<Graph_t>>(node), hyperedge_mem_weights[edgeIdx]);
254254
} else {
255-
auto edge = graph.add_edge(static_cast<vertex_idx_t<Graph_t>>(edgeSource[edgeIdx]),
255+
if constexpr (is_modifiable_cdag_comm_edge_v<Graph_t>) {
256+
257+
auto edge = graph.add_edge(static_cast<vertex_idx_t<Graph_t>>(edgeSource[edgeIdx]),
256258
static_cast<vertex_idx_t<Graph_t>>(nodeIdx));
257259

258-
if constexpr (is_modifiable_cdag_comm_edge_v<Graph_t>) {
259260
graph.set_edge_comm_weight(edge.first,
260261
static_cast<e_commw_t<Graph_t>>(hyperedge_comm_weights[edgeIdx]));
262+
263+
} else {
264+
graph.add_edge(static_cast<vertex_idx_t<Graph_t>>(edgeSource[edgeIdx]),
265+
static_cast<vertex_idx_t<Graph_t>>(nodeIdx));
261266
}
262267
}
263268
}

include/osp/bsp/scheduler/IlpSchedulers/TotalCommunicationScheduler.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ class TotalCommunicationScheduler : public Scheduler<Graph_t> {
7676

7777
auto sched = constructBspScheduleFromCallback();
7878
DotFileWriter sched_writer;
79-
sched_writer.write_dot(write_solutions_path_cb + "intmed_sol_" + solution_file_prefix_cb + "_" +
79+
sched_writer.write_schedule(write_solutions_path_cb + "intmed_sol_" + solution_file_prefix_cb + "_" +
8080
std::to_string(counter) + "_schedule.dot",
8181
sched);
8282
counter++;

include/osp/pebbling/pebblers/pebblingILP/partialILP/AcyclicDagDivider.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ std::vector<unsigned> AcyclicDagDivider<Graph_t>::computePartitioning(const BspI
151151
partitioner.setNumberOfParts(2); // note - if set to more than 2, ILP is MUCH more inefficient
152152
BspInstance partial_instance(dag, instance.getArchitecture(), instance.getNodeProcessorCompatibilityMatrix());
153153
RETURN_STATUS status = partitioner.computePartitioning(partial_instance, ILP_assignment);
154-
if(status == SUCCESS || status == RETURN_STATUS::BEST_FOUND)
154+
if(status == RETURN_STATUS::OSP_SUCCESS || status == RETURN_STATUS::BEST_FOUND)
155155
ILPCost = getSplitCost(dag, ILP_assignment);
156156

157157
std::vector<unsigned> assignment = ILPCost < heuristicCost ? ILP_assignment : heuristic_assignment;

tests/ilp_pebbling_scheduler.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ BOOST_AUTO_TEST_CASE(test_full) {
5656

5757
GreedyBspScheduler<graph> greedy;
5858
BspSchedule<graph> bsp_initial(instance);
59-
BOOST_CHECK_EQUAL(SUCCESS, greedy.computeSchedule(bsp_initial));
59+
BOOST_CHECK_EQUAL(RETURN_STATUS::OSP_SUCCESS, greedy.computeSchedule(bsp_initial));
6060

6161
std::vector<v_memw_t<graph> > minimum_memory_required_vector = PebblingSchedule<graph>::minimumMemoryRequiredPerNodeType(instance);
6262
v_memw_t<graph> max_required = *std::max_element(minimum_memory_required_vector.begin(), minimum_memory_required_vector.end());

0 commit comments

Comments
 (0)