-// Copyright (C) 2007-2019 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2021 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 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
new_job->setWorkDirectory(job_params.MachinesList[clusterName].WorkDirectory);
new_job->setEnvFile(job_params.MachinesList[clusterName].EnvFile);
- for(int i=0; i < job_params.InputFile.size(); i++)
+ for(size_t i=0; i < job_params.InputFile.size(); i++)
new_job->add_in_file(job_params.InputFile[i]);
- for(int i=0; i < job_params.OutputFile.size();i++)
+ for(size_t i=0; i < job_params.OutputFile.size();i++)
new_job->add_out_file(job_params.OutputFile[i]);
resourceParams p;
"(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)
{
return 0;
}
+JobParameters_cpp
+Launcher_cpp::getJobParameters(int job_id)
+{
+ throw LauncherException("Method Launcher_cpp::getJobParamaters is not available "
+ "(libBatch was not present at compilation time)");
+}
+
#endif
ParserLauncherType