#include <Batch/Batch_FactBatchManager_eSSH.hxx>
#endif
+#include "Basics_Utils.hxx"
+#include "Basics_DirUtils.hxx"
#include "SALOME_Launcher_Handler.hxx"
#include "Launcher.hxx"
#include "Launcher_Job_Command.hxx"
// Creating a new job
Launcher::Job_Command * new_job = new Launcher::Job_Command();
- new_job->setJobFile(job_params.Command);
+
+ string cmdFile = Kernel_Utils::GetTmpFileName();
+#ifndef WIN32
+ cmdFile += ".sh";
+#else
+ cmdFile += ".bat";
+#endif
+ ofstream os;
+ os.open(cmdFile.c_str(), ofstream::out );
+ os << "#! /bin/sh" << endl;
+ os << job_params.Command;
+ os.close();
+
+ new_job->setJobFile(cmdFile);
new_job->setLocalDirectory(job_params.RefDirectory);
new_job->setWorkDirectory(job_params.MachinesList[clusterName].WorkDirectory);
new_job->setEnvFile(job_params.MachinesList[clusterName].EnvFile);
resourceParams p;
p.hostname = clusterName;
+ p.name = "";
+ p.OS = "";
p.nb_proc = job_params.NbOfProcesses;
+ p.nb_node = 0;
+ p.nb_proc_per_node = 0;
+ p.cpu_clock = 0;
+ p.mem_mb = 0;
new_job->setResourceRequiredParams(p);
createJob(new_job);