X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2Fengine%2FBL_Job.cxx;h=487a39b34b494323ef389e7676cd7e7e921ab482;hb=fafdcee64180ce59122b48b01f869eb35f681b34;hp=231ee19477126eade73e92b29fc8d4b273dc3c19;hpb=70c432982839980de6c1f8efe3a8ee0130e09c73;p=modules%2Fjobmanager.git diff --git a/src/engine/BL_Job.cxx b/src/engine/BL_Job.cxx index 231ee19..487a39b 100644 --- a/src/engine/BL_Job.cxx +++ b/src/engine/BL_Job.cxx @@ -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 = ""; @@ -37,18 +40,25 @@ BL::Job::Job() _salome_launcher_id = -1; _dump_yacs_state = 0; _ll_jobtype = ""; + + // Parameters for COORM + _batch_params.launcher_file = ""; + _batch_params.launcher_args = ""; } 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 = ""; @@ -57,6 +67,10 @@ BL::Job::Job(const std::string & name) _salome_launcher_id = -1; _dump_yacs_state = 0; _ll_jobtype = ""; + + // Parameters for COORM + _batch_params.launcher_file = ""; + _batch_params.launcher_args = ""; } BL::Job::~Job() @@ -140,15 +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; + _batch_params = param; } -BL::Job::BatchParam & +const BL::Job::BatchParam & BL::Job::getBatchParameters() { return _batch_params;