Search in sources :

Example 21 with Processor

use of es.bsc.compss.types.resources.components.Processor in project compss by bsc-wdc.

the class MethodResourceDescription method multiply.

public MethodResourceDescription multiply(int amount) {
    MethodResourceDescription rd = new MethodResourceDescription();
    // Processors
    for (Processor p : this.processors) {
        Processor new_p = new Processor(p);
        new_p.multiply(amount);
        rd.addProcessor(new_p);
    }
    // Memory
    rd.memorySize = this.memorySize * amount;
    // Storage
    rd.storageSize = this.storageSize * amount;
    return rd;
}
Also used : Processor(es.bsc.compss.types.resources.components.Processor)

Example 22 with Processor

use of es.bsc.compss.types.resources.components.Processor in project compss by bsc-wdc.

the class MOResourceSchedulerTest method setUpClass.

@BeforeClass
public static void setUpClass() {
    LOGGER.info("Setup Class");
    // Method resource description and its slots
    Processor p = new Processor();
    p.setComputingUnits(4);
    MethodResourceDescription description = new MethodResourceDescription();
    description.addProcessor(p);
    worker = new FakeWorker(description, 4);
    int coreId = CoreManager.registerNewCoreElement("methodA");
    LinkedList<Implementation> impls = new LinkedList<>();
    LinkedList<String> signs = new LinkedList<>();
    Implementation impl = new MethodImplementation("ClassA", "methodA", coreId, 0, new MethodResourceDescription());
    impls.add(impl);
    signs.add("ClassA.methodA");
    impl = new MethodImplementation("ClassB", "methodA", coreId, 1, new MethodResourceDescription());
    impls.add(impl);
    signs.add("ClassB.methodA");
    CoreManager.registerNewImplementations(coreId, impls, signs);
    coreId = CoreManager.registerNewCoreElement("methodB");
    impls = new LinkedList<>();
    signs = new LinkedList<>();
    impl = new MethodImplementation("ClassA", "methodB", coreId, 0, new MethodResourceDescription());
    impls.add(impl);
    signs.add("ClassA.methodB");
    CoreManager.registerNewImplementations(coreId, impls, signs);
}
Also used : MethodImplementation(es.bsc.compss.types.implementations.MethodImplementation) Processor(es.bsc.compss.types.resources.components.Processor) MethodResourceDescription(es.bsc.compss.types.resources.MethodResourceDescription) FakeWorker(es.bsc.compss.scheduler.types.fake.FakeWorker) Implementation(es.bsc.compss.types.implementations.Implementation) MethodImplementation(es.bsc.compss.types.implementations.MethodImplementation) LinkedList(java.util.LinkedList) BeforeClass(org.junit.BeforeClass)

Aggregations

Processor (es.bsc.compss.types.resources.components.Processor)22 MethodImplementation (es.bsc.compss.types.implementations.MethodImplementation)4 MethodResourceDescription (es.bsc.compss.types.resources.MethodResourceDescription)4 Implementation (es.bsc.compss.types.implementations.Implementation)3 LinkedList (java.util.LinkedList)3 BeforeClass (org.junit.BeforeClass)3 Test (org.junit.Test)3 FakeWorker (es.bsc.compss.types.fake.FakeWorker)2 TaskScheduler (es.bsc.compss.components.impl.TaskScheduler)1 FakeWorker (es.bsc.compss.scheduler.types.fake.FakeWorker)1 FakeActionOrchestrator (es.bsc.compss.types.fake.FakeActionOrchestrator)1 FakeResourceScheduler (es.bsc.compss.types.fake.FakeResourceScheduler)1 ServiceImplementation (es.bsc.compss.types.implementations.ServiceImplementation)1 MethodWorker (es.bsc.compss.types.resources.MethodWorker)1 ServiceResourceDescription (es.bsc.compss.types.resources.ServiceResourceDescription)1 ServiceWorker (es.bsc.compss.types.resources.ServiceWorker)1 CloudMethodResourceDescription (es.bsc.compss.types.resources.description.CloudMethodResourceDescription)1 ArrayList (java.util.ArrayList)1 List (java.util.List)1