+ compTaskConfig.getComputationTaskID());
return new RunInformation(false);
}
IComputationTask currentComputationTask = task.getComputationTask();
ExecutionMeasurements execMeasures =
new ExecutionMeasurements(task.getRunInfo());
// Execute the computation task
execMeasures.startComputationTask();
try {
// TODO: check whether this works...
if (compTaskConfig.isInteractive() && (interactiveConsole != null)
&& currentComputationTask instanceof SimulationRun) {
interactiveConsole.setSimulation(currentComputationTask);
}
// If there is a master server defined by the parameters, start the
// simulation there
if (compTaskConfig.useMasterServer()) {
RemoteComputationTaskRunnerRef remoteSimRunnerRef = null;
try {
remoteSimRunnerRef = new RemoteComputationTaskRunnerRef(taskRunner);
} catch (RemoteException t) {
SimSystem.report(t);
task.getRunInfo().storeFailure("Remote computation failed.", t);
}
compTaskConfig.getMasterServer().execute(
task.getRunInfo().getComputationTaskID(), remoteSimRunnerRef);
// Otherwise start the simulation locally
} else {
if (currentComputationTask == null) {
return task.getRunInfo();
}
currentComputationTask.start();
}
} catch (RemoteException t) {
String msg =
"Computation of task " + compTaskConfig.toString() + " FAILED !!! ";
SimSystem.report(Level.SEVERE, msg, t);
attemptDetailedErrorReporting(compTaskConfig);
task.getRunInfo().storeFailure(msg, t);
return task.getRunInfo();
} finally {
execMeasures.stopComputationTask();
}
compTaskConfig.getSetup().cleanUp(compTaskConfig, task.getRunInfo());
return task.getRunInfo();