Salome HOME
Update copyrights 2014.
[modules/jobmanager.git] / src / engine / BL_Job.cxx
index b179ba6359e471a59e9892a7e48b0551e00656d0..487a39b34b494323ef389e7676cd7e7e921ab482 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2009-2013  CEA/DEN, EDF R&D
+// Copyright (C) 2009-2014  CEA/DEN, EDF R&D
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
 // License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -23,12 +23,15 @@ BL::Job::Job()
 {
   DEBTRACE("Creating BL::Job");
   _name = "";
+  _type = COMMAND;
   _job_file = "";
   _env_file = "";
   _batch_params.batch_directory = "";
   _batch_params.maximum_duration = "";
-  _batch_params.expected_memory = "";
+  _batch_params.mem_limit = 0;
+  _batch_params.mem_req_type = MEM_PER_NODE;
   _batch_params.nb_proc = 0;
+  _batch_params.exclusive = false;
   _files_params.result_directory = "";
   _resource_choosed = "";
   _batch_queue = "";
@@ -47,12 +50,15 @@ BL::Job::Job(const std::string & name)
 {
   DEBTRACE("Creating BL::Job with name : " << name);
   _name = name;
+  _type = COMMAND;
   _job_file = "";
   _env_file = "";
   _batch_params.batch_directory = "";
   _batch_params.maximum_duration = "";
-  _batch_params.expected_memory = "";
+  _batch_params.mem_limit = 0;
+  _batch_params.mem_req_type = MEM_PER_NODE;
   _batch_params.nb_proc = 0;
+  _batch_params.exclusive = false;
   _files_params.result_directory = "";
   _resource_choosed = "";
   _batch_queue = "";
@@ -148,19 +154,12 @@ BL::Job::getEnvFile()
 }
 
 void 
-BL::Job::setBatchParameters(BL::Job::BatchParam & param)
+BL::Job::setBatchParameters(const BL::Job::BatchParam & param)
 {
-  _batch_params.batch_directory = param.batch_directory;
-  _batch_params.maximum_duration = param.maximum_duration;
-  _batch_params.expected_memory = param.expected_memory;
-  _batch_params.nb_proc = param.nb_proc;
-
-  // Parameters for COORM
-  _batch_params.launcher_file = param.launcher_file;
-  _batch_params.launcher_args = param.launcher_args;
+  _batch_params = param;
 }
 
-BL::Job::BatchParam & 
+const BL::Job::BatchParam &
 BL::Job::getBatchParameters()
 {
   return _batch_params;