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;
}
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);
}
Aggregations