//! Get names or ids of hosts assigned to the job
string getAssignedHostnames (in long job_id) raises (SALOME::SALOME_Exception);
+ //! Copy all the in_files of the job to the work_directory.
+ void exportInputFiles(in long job_id) raises (SALOME::SALOME_Exception);
+
//! Copy the result files from the work directory of the job
//! to a local directory.
/*! The list of result files is given by the JobParameters::out_files parameter.
return assigned_hostnames;
}
+void
+Launcher_cpp::exportInputFiles(int job_id)
+{
+ LAUNCHER_MESSAGE("Copy in files");
+ // Check if job exists
+ Launcher::Job * job = findJob(job_id);
+
+ // Check job state (cannot launch a job already launched...)
+ if (job->getState() != "CREATED")
+ {
+ LAUNCHER_INFOS("Bad state of the job: " << job->getState());
+ throw LauncherException("Bad state of the job: " + job->getState());
+ }
+
+ Batch::BatchManager * bm = getBatchManager(job);
+
+ try {
+ bm->exportInputFiles(*(job->getBatchJob()));
+ }
+ catch(const Batch::GenericException &ex)
+ {
+ LAUNCHER_INFOS("Failed to copy in files: " << ex.message);
+ throw LauncherException(ex.message.c_str());
+ }
+ LAUNCHER_MESSAGE("Files copied");
+}
+
//=============================================================================
/*!
* Get Job result - the result directory could be changed
"(libBatch was not present at compilation time)");
}
+void
+Launcher_cpp::exportInputFiles(int job_id)
+{
+ LAUNCHER_INFOS("Launcher compiled without LIBBATCH - cannot copy the files!!!");
+ throw LauncherException("Method Launcher_cpp::exportInputFiles is not available "
+ "(libBatch was not present at compilation time)");
+}
+
void
Launcher_cpp::getJobResults(int job_id, std::string directory)
{
void launchJob(int job_id);
std::string getJobState(int job_id);
std::string getAssignedHostnames(int job_id); // Get names or ids of hosts assigned to the job
+ void exportInputFiles(int job_id);
void getJobResults(int job_id, std::string directory);
void clearJobWorkingDir(int job_id);
bool getJobDumpState(int job_id, std::string directory);
return CORBA::string_dup(result.c_str());
}
+void
+SALOME_Launcher::exportInputFiles(CORBA::Long job_id)
+{
+ try
+ {
+ _l.exportInputFiles(job_id);
+ }
+ catch(const LauncherException &ex)
+ {
+ INFOS(ex.msg.c_str());
+ THROW_SALOME_CORBA_EXCEPTION(ex.msg.c_str(),SALOME::BAD_PARAM);
+ }
+}
+
void
SALOME_Launcher::getJobResults(CORBA::Long job_id, const char * directory)
{
void launchJob (CORBA::Long job_id);
char * getJobState (CORBA::Long job_id);
char * getAssignedHostnames (CORBA::Long job_id); // Get names or ids of hosts assigned to the job
+ void exportInputFiles(CORBA::Long job_id);
void getJobResults(CORBA::Long job_id, const char * directory);
void clearJobWorkingDir(CORBA::Long job_id);
CORBA::Boolean getJobDumpState(CORBA::Long job_id, const char * directory);
void launchJob(int job_id);
std::string getJobState(int job_id);
std::string getAssignedHostnames(int job_id); // Get names or ids of hosts assigned to the job
+ void exportInputFiles(int job_id);
void getJobResults(int job_id, std::string directory);
void clearJobWorkingDir(int job_id);
bool getJobDumpState(int job_id, std::string directory);