// Let sim config query any parameters that need to be given by the master
// server (e.g., available DB hosts, etc.)
// TODO uncomment this method call when the method is actually working!
// config.getResourcesFromMasterServer(this, simname);
InitializedComputationTask initSim = null;
try {
List<ISimulationHost> bookedResources =
bookResources(
runConfig,
runConfig.getComputationTaskID(),
((SimulationRunConfiguration) runConfig)
.getSimResourceAllocator().estimateRequiredResources(
(SimulationRunConfiguration) runConfig, resources));
host = bookedResources.remove(0);
// System.out.println("Try to execute on host: " + host);
// remember configuration / sim id mapping
simulationManagement.addConfig((SimulationRunConfiguration) runConfig);
// initialize the simulation on the remote host
RunInformation rInfo =
((ISimulationServer) host).initializeSimulationRun(
(SimulationRunConfiguration) runConfig, simname,
bookedResources.isEmpty() ? null : bookedResources);
// create a new initialized simulation object, linking the dummy
// simulation and the run information
// FIXME jh194: The sequential task runner expects a non null value here,
// the parallel seems to ignore it.
initSim = new InitializedComputationTask(null, rInfo);
if (((SimulationRunConfiguration) runConfig).isResilient()) {
startResilience(runConfig.getComputationTaskID());
}