Skip to content

Commit 9241d1d

Browse files
committed
ilp tests, removed run-clang-tidy
1 parent beff76c commit 9241d1d

File tree

4 files changed

+17
-340
lines changed

4 files changed

+17
-340
lines changed

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -885,9 +885,7 @@ class CoptFullScheduler : public Scheduler<GraphT> {
885885
};
886886

887887
virtual void ComputeScheduleBase(const BspScheduleRecomp<GraphT> &schedule, Model &model) {
888-
if (timeLimitSeconds_ > 0) {
889-
model.SetDblParam(COPT_DBLPARAM_TIMELIMIT, timeLimitSeconds_);
890-
}
888+
model.SetDblParam(COPT_DBLPARAM_TIMELIMIT, timeLimitSeconds_);
891889
model.SetIntParam(COPT_INTPARAM_THREADS, 128);
892890

893891
model.SetIntParam(COPT_INTPARAM_STRONGBRANCHING, 1);

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,7 @@ void CoptPartialScheduler<GraphT>::SetupVertexMaps(const BspScheduleCS<GraphT> &
660660
fixedCommSteps_.clear();
661661
sourcePresentBefore_.clear();
662662

663-
std::vector<std::vector<unsigned>> firstAt = schedule.getFirstPresence();
663+
std::vector<std::vector<unsigned>> firstAt = schedule.GetFirstPresence();
664664

665665
maxNumberSupersteps_ = endSuperstep_ - startSuperstep_ + 3;
666666

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

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -445,13 +445,17 @@ class TotalCommunicationScheduler : public Scheduler<GraphT> {
445445
Expr expr1, expr2;
446446
assert(maxNumberSupersteps_ <= std::numeric_limits<int>::max());
447447
for (unsigned step = 0; step < maxNumberSupersteps_; step++) {
448-
expr1 += nodeToProcessorSuperstepVar_[ep.source][p1][static_cast<int>(step)];
449-
expr2 += nodeToProcessorSuperstepVar_[ep.target][p2][static_cast<int>(step)];
448+
expr1 += nodeToProcessorSuperstepVar_[Source(ep, instance.GetComputationalDag())][p1]
449+
[static_cast<int>(step)];
450+
expr2 += nodeToProcessorSuperstepVar_[Target(ep, instance.GetComputationalDag())][p2]
451+
[static_cast<int>(step)];
450452
}
451453
model_.AddConstr(edgeVars_[p1][p2][edgeId] >= expr1 + expr2 - 1.001);
452454

453-
totalEdgesCut += edgeVars_[p1][p2][edgeId] * instance.GetComputationalDag().VertexCommWeight(ep.source)
454-
* instance.SendCosts(p1, p2);
455+
totalEdgesCut
456+
+= edgeVars_[p1][p2][edgeId]
457+
* instance.GetComputationalDag().VertexCommWeight(Source(ep, instance.GetComputationalDag()))
458+
* instance.SendCosts(p1, p2);
455459

456460
edgeId++;
457461
}
@@ -469,20 +473,23 @@ class TotalCommunicationScheduler : public Scheduler<GraphT> {
469473
for (unsigned p1 = 0; p1 < instance.NumberOfProcessors(); p1++) {
470474
Expr expr1, expr2;
471475
for (unsigned step = 0; step < maxNumberSupersteps_; step++) {
472-
expr1 += nodeToProcessorSuperstepVar_[ep.source][p1][static_cast<int>(step)];
476+
expr1
477+
+= nodeToProcessorSuperstepVar_[Source(ep, instance.GetComputationalDag())][p1][static_cast<int>(step)];
473478
}
474479

475480
for (unsigned p2 = 0; p2 < instance.NumberOfProcessors(); p2++) {
476481
if (p1 != p2) {
477482
for (unsigned step = 0; step < maxNumberSupersteps_; step++) {
478-
expr2 += nodeToProcessorSuperstepVar_[ep.target][p2][static_cast<int>(step)];
483+
expr2 += nodeToProcessorSuperstepVar_[Target(ep, instance.GetComputationalDag())][p2]
484+
[static_cast<int>(step)];
479485
}
480486
}
481487
}
482488
model_.AddConstr(edgeVars_[0][0][edgeId] >= expr1 + expr2 - 1.001);
483489
}
484490

485-
totalEdgesCut += instance.GetComputationalDag().VertexCommWeight(ep.source) * edgeVars_[0][0][edgeId];
491+
totalEdgesCut += instance.GetComputationalDag().VertexCommWeight(Source(ep, instance.GetComputationalDag()))
492+
* edgeVars_[0][0][edgeId];
486493

487494
edgeId++;
488495
}
@@ -606,6 +613,7 @@ class TotalCommunicationScheduler : public Scheduler<GraphT> {
606613
LoadInitialSchedule();
607614
}
608615

616+
model_.SetDblParam(COPT_DBLPARAM_TIMELIMIT, timeLimitSeconds_);
609617
model_.SetIntParam(COPT_INTPARAM_THREADS, 128);
610618
model_.SetIntParam(COPT_INTPARAM_STRONGBRANCHING, 1);
611619
model_.SetIntParam(COPT_INTPARAM_LPMETHOD, 1);

0 commit comments

Comments
 (0)