use of edu.iu.dsc.tws.api.exceptions.TimeoutException in project twister2 by DSC-SPIDAL.
the class KeyedBenchWorker method execute.
@Override
public void execute(WorkerEnvironment workerEnvironment) {
this.workerEnv = workerEnvironment;
workerId = workerEnv.getWorkerId();
Config cfg = workerEnv.getConfig();
Timing.setDefaultTimingUnit(TimingUnit.NANO_SECONDS);
this.resultsRecorder = new BenchmarkResultsRecorder(cfg, workerId == 0);
// create the job parameters
this.jobParameters = JobParameters.build(cfg);
// lets create the task plan
this.logicalPlan = Utils.createStageLogicalPlan(workerEnv, jobParameters.getTaskStages());
this.inputDataArray = DataGenerator.generateIntData(jobParameters.getSize());
// collect experiment data
experimentData = new ExperimentData();
// now lets execute
compute(workerEnv);
// now progress
progress();
// wait for the sync
try {
workerEnv.getWorkerController().waitOnBarrier();
} catch (TimeoutException timeoutException) {
LOG.log(Level.SEVERE, timeoutException.getMessage(), timeoutException);
}
// let allows the specific example to close
close();
// lets terminate the communicator
workerEnv.close();
}
use of edu.iu.dsc.tws.api.exceptions.TimeoutException in project twister2 by DSC-SPIDAL.
the class BenchWorker method execute.
@Override
public void execute(WorkerEnvironment workerEnvironment) {
this.workerEnv = workerEnvironment;
workerId = workerEnv.getWorkerId();
Config cfg = workerEnv.getConfig();
Timing.setDefaultTimingUnit(TimingUnit.NANO_SECONDS);
// create the job parameters
this.jobParameters = JobParameters.build(cfg);
this.resultsRecorder = new BenchmarkResultsRecorder(cfg, workerId == 0);
// lets create the task plan
this.logicalPlan = Utils.createStageLogicalPlan(workerEnv, jobParameters.getTaskStages());
// todo collect experiment data : will be removed
experimentData = new ExperimentData();
if (jobParameters.isStream()) {
experimentData.setOperationMode(OperationMode.STREAMING);
} else {
experimentData.setOperationMode(OperationMode.BATCH);
}
// todo above will be removed
this.inputDataArray = generateData();
// todo below will be removed
experimentData.setInput(this.inputDataArray);
experimentData.setTaskStages(jobParameters.getTaskStages());
experimentData.setIterations(jobParameters.getIterations());
// todo above will be removed
// now lets execute
compute(workerEnv);
// now communicationProgress
progress();
// wait for the sync
try {
workerEnv.getWorkerController().waitOnBarrier();
} catch (TimeoutException timeoutException) {
LOG.log(Level.SEVERE, timeoutException, () -> timeoutException.getMessage());
}
// let allows the specific example to close
close();
// lets terminate the communicator
workerEnv.close();
}
Aggregations