use of es.bsc.compss.types.resources.Worker in project compss by bsc-wdc.
the class TestCompatible method resourceManagerTest.
/*
* **********************************************************************************************************
* RESOURCE MANAGER TEST IMPLEMENTATION
* **********************************************************************************************************
*/
private static void resourceManagerTest() {
coreCount = CoreManager.getCoreCount();
ActionOrchestrator orchestrator = COMPSsRuntimeImpl.getOrchestrator();
// Check for each implementation the correctness of its resources
System.out.println("[LOG] Number of cores = " + coreCount);
for (int coreId = 0; coreId < coreCount; coreId++) {
System.out.println("[LOG] Checking Core" + coreId);
Action a = new Action(orchestrator, coreId);
Map<Worker<?>, List<Implementation>> m = a.findAvailableWorkers();
// For the test construction, all implementations can be run. Check it
if (m.size() == 0) {
System.err.println("[ERROR] CoreId " + coreId + " cannot be run");
List<Implementation> impls = CoreManager.getCoreImplementations(coreId);
for (Implementation impl : impls) {
System.out.println("-- Impl: " + impl.getRequirements().toString());
}
System.exit(-1);
}
// Check that all assigned resources are really valid
checkCoreResources(coreId, m);
}
}
Aggregations