use of es.bsc.compss.scheduler.multiobjective.MOSchedulingInformation in project compss by bsc-wdc.
the class LocalOptimizationState method progressOnTime.
public void progressOnTime(long time) {
while (readyActions.size() > 0) {
AllocatableAction top = readyActions.peek();
MOSchedulingInformation topDSI = (MOSchedulingInformation) top.getSchedulingInfo();
long start = topDSI.getExpectedStart();
if (start > time) {
break;
}
readyActions.poll();
selectableActions.offer(top);
}
}
use of es.bsc.compss.scheduler.multiobjective.MOSchedulingInformation in project compss by bsc-wdc.
the class LocalOptimizationState method updateConsumptions.
// CONSUMPTIONS
public void updateConsumptions(AllocatableAction action) {
Implementation impl = action.getAssignedImplementation();
MOProfile p = (MOProfile) worker.getProfile(impl);
if (p != null) {
MOSchedulingInformation dsi = (MOSchedulingInformation) action.getSchedulingInfo();
long length = dsi.getExpectedEnd() - (dsi.getExpectedStart() < 0 ? 0 : dsi.getExpectedStart());
implementationCount[impl.getCoreId()][impl.getImplementationId()]++;
totalEnergy += p.getPower() * length;
totalCost += p.getPrice() * length;
}
}
use of es.bsc.compss.scheduler.multiobjective.MOSchedulingInformation in project compss by bsc-wdc.
the class LocalOptimizationState method blockDataSuccessors.
public void blockDataSuccessors(MOSchedulingInformation dsi) {
List<AllocatableAction> successors = dsi.getOptimizingSuccessors();
for (AllocatableAction successor : successors) {
MOSchedulingInformation sucDSI = (MOSchedulingInformation) successor.getSchedulingInfo();
sucDSI.lock();
if (sucDSI.isOnOptimization()) {
sucDSI.clearPredecessors();
sucDSI.clearSuccessors();
dataBlockedAction(successor);
blockDataSuccessors(sucDSI);
sucDSI.setExpectedStart(Long.MAX_VALUE);
sucDSI.setExpectedEnd(Long.MAX_VALUE);
sucDSI.setOnOptimization(false);
}
sucDSI.unlock();
}
}
use of es.bsc.compss.scheduler.multiobjective.MOSchedulingInformation in project compss by bsc-wdc.
the class LocalOptimizationState method addTmpGap.
public void addTmpGap(Gap g) {
AllocatableAction gapAction = g.getOrigin();
MOSchedulingInformation gapDSI = (MOSchedulingInformation) gapAction.getSchedulingInfo();
gapDSI.addGap();
}
use of es.bsc.compss.scheduler.multiobjective.MOSchedulingInformation in project compss by bsc-wdc.
the class LocalOptimizationState method dataBlockedAction.
public void dataBlockedAction(AllocatableAction action) {
MOSchedulingInformation aDSI = (MOSchedulingInformation) action.getSchedulingInfo();
MOSchedulingInformation dbaDSI = (MOSchedulingInformation) dataBlockingAction.getSchedulingInfo();
dbaDSI.lock();
dbaDSI.addSuccessor(action);
Gap opActionGap = new Gap(0, 0, dataBlockingAction, action.getAssignedImplementation().getRequirements().copy(), 0);
aDSI.addPredecessor(opActionGap);
dbaDSI.unlock();
updateConsumptions(action);
}
Aggregations