From b60794e23adc1071d7bfd43850b35e150a287c06 Mon Sep 17 00:00:00 2001 From: ribes Date: Tue, 10 Nov 2009 10:12:27 +0000 Subject: [PATCH] expected_during_time to maximum_during_time --- idl/SALOME_ContainerManager.idl | 11 ++++------- src/Launcher/Launcher_Job.cxx | 26 +++++++++++++------------- src/Launcher/Launcher_Job.hxx | 12 ++++++------ src/Launcher/SALOME_Launcher.cxx | 4 ++-- 4 files changed, 25 insertions(+), 28 deletions(-) diff --git a/idl/SALOME_ContainerManager.idl b/idl/SALOME_ContainerManager.idl index 2dcff5b4d..f7d1869e6 100644 --- a/idl/SALOME_ContainerManager.idl +++ b/idl/SALOME_ContainerManager.idl @@ -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 diff --git a/src/Launcher/Launcher_Job.cxx b/src/Launcher/Launcher_Job.cxx index 4e596425e..532d7e844 100644 --- a/src/Launcher/Launcher_Job.cxx +++ b/src/Launcher/Launcher_Job.cxx @@ -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; } diff --git a/src/Launcher/Launcher_Job.hxx b/src/Launcher/Launcher_Job.hxx index f4b21a9ad..fb3005463 100644 --- a/src/Launcher/Launcher_Job.hxx +++ b/src/Launcher/Launcher_Job.hxx @@ -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 & get_in_files(); const std::list & 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 _in_files; std::list _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 diff --git a/src/Launcher/SALOME_Launcher.cxx b/src/Launcher/SALOME_Launcher.cxx index 9387f20ca..924724b9d 100644 --- a/src/Launcher/SALOME_Launcher.cxx +++ b/src/Launcher/SALOME_Launcher.cxx @@ -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()); -- 2.39.2