Search in sources :

Example 1 with FakeWorker

use of es.bsc.compss.scheduler.types.fake.FakeWorker 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

FakeWorker (es.bsc.compss.scheduler.types.fake.FakeWorker)1 Implementation (es.bsc.compss.types.implementations.Implementation)1 MethodImplementation (es.bsc.compss.types.implementations.MethodImplementation)1 MethodResourceDescription (es.bsc.compss.types.resources.MethodResourceDescription)1 Processor (es.bsc.compss.types.resources.components.Processor)1 LinkedList (java.util.LinkedList)1 BeforeClass (org.junit.BeforeClass)1