use of edu.iu.dsc.tws.rsched.worker.MPIWorkerManager in project twister2 by DSC-SPIDAL.
the class MPIWorkerStarter method startWorker.
/**
* start the Worker class specified in conf files
*/
public static boolean startWorker(IWorkerController workerController, IPersistentVolume pv, String podName) {
IWorker worker = JobUtils.initializeIWorker(job);
K8sVolatileVolume volatileVolume = null;
if (computeResource.getDiskGigaBytes() > 0) {
volatileVolume = new K8sVolatileVolume(jobID, workerID);
}
MPIWorkerManager mpiWorkerManager = new MPIWorkerManager();
return mpiWorkerManager.execute(config, job, workerController, pv, volatileVolume, worker);
}
use of edu.iu.dsc.tws.rsched.worker.MPIWorkerManager in project twister2 by DSC-SPIDAL.
the class NomadWorkerStarter method startWorker.
private void startWorker() {
LOG.log(Level.INFO, "A worker process is starting...");
// lets create the resource plan
this.workerController = createWorkerController();
JobMasterAPI.WorkerInfo workerNetworkInfo = workerController.getWorkerInfo();
try {
LOG.log(Level.INFO, "Worker IP..:" + Inet4Address.getLocalHost().getHostAddress());
} catch (UnknownHostException e) {
e.printStackTrace();
}
try {
List<JobMasterAPI.WorkerInfo> workerInfos = workerController.getAllWorkers();
} catch (TimeoutException timeoutException) {
LOG.log(Level.SEVERE, timeoutException.getMessage(), timeoutException);
return;
}
IWorker worker = JobUtils.initializeIWorker(job);
MPIWorkerManager workerManager = new MPIWorkerManager();
workerManager.execute(config, job, workerController, null, null, worker);
}
use of edu.iu.dsc.tws.rsched.worker.MPIWorkerManager in project twister2 by DSC-SPIDAL.
the class MPIWorkerStarter method startWorker.
/**
* Start the worker
*
* @param intracomm communication
*/
private void startWorker(Intracomm intracomm) {
try {
// initialize the logger
initWorkerLogger(config, intracomm.getRank());
// now create the worker
IWorkerController wc = WorkerRuntime.getWorkerController();
IPersistentVolume persistentVolume = initPersistenceVolume(config, globalRank);
MPIContext.addRuntimeObject("comm", intracomm);
IWorker worker = JobUtils.initializeIWorker(job);
MPIWorkerManager workerManager = new MPIWorkerManager();
workerManager.execute(config, job, wc, persistentVolume, null, worker);
} catch (MPIException e) {
LOG.log(Level.SEVERE, "Failed to synchronize the workers at the start");
throw new RuntimeException(e);
}
}
Aggregations