use of es.bsc.compss.types.fake.FakeWorker in project compss by bsc-wdc.
the class ResourceSchedulerTest method setUpClass.
@BeforeClass
public static void setUpClass() {
// 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);
}
use of es.bsc.compss.types.fake.FakeWorker in project compss by bsc-wdc.
the class AllocatableActionTest method setUpClass.
@BeforeClass
public static void setUpClass() {
ResourceManager.clear(rus);
// Method resource description and its slots
int maxSlots = 3;
Processor p = new Processor();
p.setComputingUnits(maxSlots);
description = new MethodResourceDescription();
description.addProcessor(p);
// Task Scheduler
ts = new TaskScheduler();
// Task Dispatcher
fao = new FakeActionOrchestrator(ts);
ts.setOrchestrator(fao);
// Resource Scheduler
rs = new FakeResourceScheduler(new FakeWorker(description, maxSlots), null, null);
}
Aggregations