]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
- YACSFile jobs and PythonSALOME jobs can choose their files extensions
authorribes <ribes>
Thu, 3 Dec 2009 16:02:40 +0000 (16:02 +0000)
committerribes <ribes>
Thu, 3 Dec 2009 16:02:40 +0000 (16:02 +0000)
src/Launcher/Launcher_Job.cxx
src/Launcher/Launcher_Job.hxx
src/Launcher/Launcher_Job_Command.cxx
src/Launcher/Launcher_Job_PythonSALOME.cxx
src/Launcher/Launcher_Job_YACSFile.cxx

index 69f2bd32d9411c256814be4da37022fbac66ef6c..7c03ec64800f4d316ba2b828ded8875d24b1c3c6 100644 (file)
@@ -30,6 +30,7 @@ Launcher::Job::Job()
   _env_file = "";
   _job_file = "";
   _job_file_name = "";
+  _job_file_name_complete = "";
   _work_directory = "";
   _local_directory = "";
   _result_directory = "";
@@ -146,7 +147,9 @@ Launcher::Job::setJobFile(const std::string & job_file)
   _job_file = job_file;
   std::string::size_type p1 = _job_file.find_last_of("/");
   std::string::size_type p2 = _job_file.find_last_of(".");
+  _job_file_name_complete = _job_file.substr(p1+1);
   _job_file_name = _job_file.substr(p1+1,p2-p1-1);
+
   if (_job_file != "")
     add_in_file(_job_file);
 }
index 12686a5beb8ab82804eed60e94a7c2eabbfc195a..ee949ea9b09cfcb30a5b870128031130f46b8a8e 100644 (file)
@@ -108,6 +108,8 @@ namespace Launcher
 
       std::string _job_file;
       std::string _job_file_name;
+      std::string _job_file_name_complete;
+
       std::string _work_directory;
       std::string _local_directory;
       std::string _result_directory;
index 38a5330e22e516e23e896674ef984e4229213104..313a0b02655c4e66846effa1c43d940c1511c6b3 100644 (file)
@@ -43,7 +43,6 @@ Launcher::Job_Command::buildCommandScript(Batch::Parametre params, std::string l
 
   // File name
   std::string::size_type p1 = _job_file.find_last_of("/");
-  std::string command_file_name = _job_file.substr(p1+1);
   
   std::string launch_date_port_file = launch_date;
   std::string launch_script = "/tmp/runCommand_" + _job_file_name + "_" + launch_date + ".sh";
@@ -58,7 +57,7 @@ Launcher::Job_Command::buildCommandScript(Batch::Parametre params, std::string l
     std::string::size_type last = _env_file.find_last_of("/");
     launch_script_stream << "source ./" << _env_file.substr(last+1) << std::endl;
   }
-  launch_script_stream << "./" << command_file_name << " > " << work_directory <<"/logs/command_" << launch_date << ".log 2>&1" << std::endl;
+  launch_script_stream << "./" << _job_file_name_complete << " > " << work_directory <<"/logs/command_" << launch_date << ".log 2>&1" << std::endl;
 
   // Return
   launch_script_stream.flush();
index 219bfd70ade544c518eae65eb55bba6c4305aa1a..6fcffb68d91efcb721e0a38bb810be04a96a5f96 100644 (file)
@@ -35,7 +35,7 @@ Launcher::Job_PythonSALOME::setJobFile(const std::string & job_file)
 void
 Launcher::Job_PythonSALOME::addJobTypeSpecificScript(std::ofstream & launch_script_stream)
 {
-  launch_script_stream << _machine_definition.AppliPath << "/runSession -p $appli_port python " << _job_file_name << ".py > logs/python_" << _launch_date << ".log 2>&1" << std::endl;
+  launch_script_stream << _machine_definition.AppliPath << "/runSession -p $appli_port python " << _job_file_name_complete << " > logs/python_" << _launch_date << ".log 2>&1" << std::endl;
 }
 #endif
 
index 42cbf9a21e8e50338bc0863522ca0c07e252aecf..daf6b331e310a77c7cfb77e676a6656718ee924c 100644 (file)
@@ -34,5 +34,5 @@ Launcher::Job_YACSFile::setJobFile(const std::string & job_file)
 void
 Launcher::Job_YACSFile::addJobTypeSpecificScript(std::ofstream & launch_script_stream)
 {
-  launch_script_stream << _machine_definition.AppliPath << "/runSession -p $appli_port driver " << _job_file_name << ".xml > logs/yacs_" << _launch_date << ".log 2>&1" << std::endl;
+  launch_script_stream << _machine_definition.AppliPath << "/runSession -p $appli_port driver " << _job_file_name_complete << " > logs/yacs_" << _launch_date << ".log 2>&1" << std::endl;
 }