-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
return state.c_str();
}
+//=============================================================================
+/*!
+ * Get job assigned hostnames
+ */
+//=============================================================================
+const char *
+Launcher_cpp::getAssignedHostnames(int job_id)
+{
+ LAUNCHER_MESSAGE("Get job assigned hostnames");
+
+ // Check if job exist
+ std::map<int, Launcher::Job *>::const_iterator it_job = _launcher_job_map.find(job_id);
+ if (it_job == _launcher_job_map.end())
+ {
+ LAUNCHER_INFOS("Cannot find the job, is it created ? job number: " << job_id);
+ throw LauncherException("Cannot find the job, is it created ?");
+ }
+
+ Launcher::Job * job = it_job->second;
+ std::string assigned_hostnames = job->getAssignedHostnames();
+
+ return assigned_hostnames.c_str();
+}
+
//=============================================================================
/*!
* Get Job result - the result directory could be changed
case vishnu:
bmType = "VISHNU";
break;
+ case oar:
+ bmType = "OAR";
+ break;
+ case coorm:
+ bmType = "COORM";
+ break;
default:
LAUNCHER_MESSAGE("Bad batch description of the resource: Batch = " << params.Batch);
throw LauncherException("No batchmanager for that cluster - Bad batch description of the resource");
"(libBatch was not present at compilation time)");
}
+const char *
+Launcher_cpp::getAssignedHostnames(int job_id)
+{
+ LAUNCHER_INFOS("Launcher compiled without LIBBATCH - cannot get job assigned hostnames!!!");
+ throw LauncherException("Method Launcher_cpp::getAssignedHostnames is not available "
+ "(libBatch was not present at compilation time)");
+}
+
void
Launcher_cpp::getJobResults(int job_id, std::string directory)
{