]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
expected_during_time to maximum_during_time
authorribes <ribes>
Tue, 10 Nov 2009 10:12:27 +0000 (10:12 +0000)
committerribes <ribes>
Tue, 10 Nov 2009 10:12:27 +0000 (10:12 +0000)
idl/SALOME_ContainerManager.idl
src/Launcher/Launcher_Job.cxx
src/Launcher/Launcher_Job.hxx
src/Launcher/SALOME_Launcher.cxx

index 2dcff5b4decaa2c9ba9f7561b5f3b7cf3d8c95ef..f7d1869e6521f780ef5364d4703fdda4f090f551 100644 (file)
@@ -145,17 +145,14 @@ struct JobParameters
   string work_directory;
   string local_directory;
   string result_directory;
+
   /*! Time for the batch (has to be like this : hh:mm) - Could be empty, in
        this case, default value of the selected resource will be used.
   */
-  string expected_during_time; 
+  string maximum_during_time; 
   MachineParameters resource_required;
-  // This two values are defined into MachineParameters
-  // Memory is expressed in megabytes
-  //long proc_nb;
-  //! Minimum of memory needed (has to be like : 32gb or 512mb)
-  //string mem; 
-
+  // Memory is expressed in megabytes -> mem_mb
+  // Number of Processors -> nb_node
 };
 
 /*! \brief Interface of the %salomelauncher
index 4e596425e3ae7887c9aed9a2f410641fadc45174..532d7e8446fed521124ae831766936a273b8ad8c 100644 (file)
@@ -29,8 +29,8 @@ Launcher::Job::Job()
   _work_directory = "";
   _local_directory = "";
   _result_directory = "";
-  _expected_during_time = "";
-  _expected_during_time_in_second = -1;
+  _maximum_during_time = "";
+  _maximum_during_time_in_second = -1;
   _machine_required_params.hostname = "";
   _machine_required_params.OS = "";
   _machine_required_params.nb_node = -1;
@@ -142,11 +142,11 @@ Launcher::Job::add_out_file(const std::string & file)
 }
 
 void 
-Launcher::Job::setExpectedDuringTime(const std::string & expected_during_time)
+Launcher::Job::setMaximumDuringTime(const std::string & maximum_during_time)
 {
-  checkExpectedDuringTime(expected_during_time);
-  _expected_during_time_in_second = convertExpectedDuringTime(expected_during_time);
-  _expected_during_time = expected_during_time;
+  checkMaximumDuringTime(maximum_during_time);
+  _maximum_during_time_in_second = convertMaximumDuringTime(maximum_during_time);
+  _maximum_during_time = maximum_during_time;
 }
 
 void 
@@ -187,9 +187,9 @@ Launcher::Job::get_out_files()
 }
 
 std::string 
-Launcher::Job::getExpectedDuringTime()
+Launcher::Job::getMaximumDuringTime()
 {
-  return _expected_during_time;
+  return _maximum_during_time;
 }
 
 machineParams 
@@ -199,10 +199,10 @@ Launcher::Job::getMachineRequiredParams()
 }
 
 void 
-Launcher::Job::checkExpectedDuringTime(const std::string & expected_during_time)
+Launcher::Job::checkMaximumDuringTime(const std::string & maximum_during_time)
 {
   std::string result("");
-  std::string edt_value = expected_during_time;
+  std::string edt_value = maximum_during_time;
   if (edt_value != "") {
     std::string begin_edt_value = edt_value.substr(0, 2);
     std::string mid_edt_value = edt_value.substr(2, 1);
@@ -243,7 +243,7 @@ Launcher::Job::checkMachineRequiredParams(const machineParams & machine_required
 }
 
 long 
-Launcher::Job::convertExpectedDuringTime(const std::string & edt)
+Launcher::Job::convertMaximumDuringTime(const std::string & edt)
 {
   long hh, mm, ret;
 
@@ -375,8 +375,8 @@ Launcher::Job::common_job_params()
   }
 
   // Time
-  if (_expected_during_time_in_second != -1)
-    params[MAXWALLTIME] = _expected_during_time_in_second;
+  if (_maximum_during_time_in_second != -1)
+    params[MAXWALLTIME] = _maximum_during_time_in_second;
 
   return params;
 }
index f4b21a9add8ebf142b3f7c3633d71bb0f6bdb1a1..fb3005463b448767f10af9651aac2ee363fbbfc4 100644 (file)
@@ -64,7 +64,7 @@ namespace Launcher
       void setResultDirectory(const std::string & result_directory);
       void add_in_file(const std::string & file);
       void add_out_file(const std::string & file);
-      void setExpectedDuringTime(const std::string & expected_during_time);
+      void setMaximumDuringTime(const std::string & maximum_during_time);
       void setMachineRequiredParams(const machineParams & machine_required_params);
 
       std::string getWorkDirectory();
@@ -72,17 +72,17 @@ namespace Launcher
       std::string getResultDirectory();
       const std::list<std::string> & get_in_files();
       const std::list<std::string> & get_out_files();
-      std::string getExpectedDuringTime();
+      std::string getMaximumDuringTime();
       machineParams getMachineRequiredParams();
       
       std::string updateJobState();
 
       // Checks
-      void checkExpectedDuringTime(const std::string & expected_during_time);
+      void checkMaximumDuringTime(const std::string & maximum_during_time);
       void checkMachineRequiredParams(const machineParams & machine_required_params);
 
       // Helps
-      long convertExpectedDuringTime(const std::string & expected_during_time);
+      long convertMaximumDuringTime(const std::string & maximum_during_time);
 
       // Abstract class
       virtual void update_job() = 0;
@@ -99,8 +99,8 @@ namespace Launcher
       std::string _result_directory;
       std::list<std::string> _in_files;
       std::list<std::string> _out_files;
-      std::string _expected_during_time;
-      long _expected_during_time_in_second;
+      std::string _maximum_during_time;
+      long _maximum_during_time_in_second;
       machineParams _machine_required_params;
 
 #ifdef WITH_LIBBATCH
index 9387f20ca8fb7ed515e266002dafe539df903e75..924724b9d4cd1178d04cce0ea6aa0594eee45c83 100644 (file)
@@ -251,8 +251,8 @@ SALOME_Launcher::createJob(const Engines::JobParameters & job_parameters)
   // Expected During Time
   try
   {
-    std::string expected_during_time = job_parameters.expected_during_time.in();
-    new_job->setExpectedDuringTime(expected_during_time);
+    std::string maximum_during_time = job_parameters.maximum_during_time.in();
+    new_job->setMaximumDuringTime(maximum_during_time);
   }
   catch(const LauncherException &ex){
     INFOS(ex.msg.c_str());