Search in sources :

Example 6 with MOSchedulingInformation

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);
    }
}
Also used : MOSchedulingInformation(es.bsc.compss.scheduler.multiobjective.MOSchedulingInformation) AllocatableAction(es.bsc.compss.scheduler.types.AllocatableAction)

Example 7 with MOSchedulingInformation

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;
    }
}
Also used : MOSchedulingInformation(es.bsc.compss.scheduler.multiobjective.MOSchedulingInformation) Implementation(es.bsc.compss.types.implementations.Implementation)

Example 8 with MOSchedulingInformation

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();
    }
}
Also used : MOSchedulingInformation(es.bsc.compss.scheduler.multiobjective.MOSchedulingInformation) AllocatableAction(es.bsc.compss.scheduler.types.AllocatableAction)

Example 9 with MOSchedulingInformation

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();
}
Also used : MOSchedulingInformation(es.bsc.compss.scheduler.multiobjective.MOSchedulingInformation) AllocatableAction(es.bsc.compss.scheduler.types.AllocatableAction)

Example 10 with MOSchedulingInformation

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);
}
Also used : MOSchedulingInformation(es.bsc.compss.scheduler.multiobjective.MOSchedulingInformation)

Aggregations

MOSchedulingInformation (es.bsc.compss.scheduler.multiobjective.MOSchedulingInformation)15 AllocatableAction (es.bsc.compss.scheduler.types.AllocatableAction)11 Implementation (es.bsc.compss.types.implementations.Implementation)2 ResourceDescription (es.bsc.compss.types.resources.ResourceDescription)2 WorkerResourceDescription (es.bsc.compss.types.resources.WorkerResourceDescription)2 PriorityQueue (java.util.PriorityQueue)2 Profile (es.bsc.compss.scheduler.types.Profile)1 ConcurrentModificationException (java.util.ConcurrentModificationException)1