From: secher Date: Tue, 22 Feb 2011 10:37:39 +0000 (+0000) Subject: the dump state for batch of yacs file is optional X-Git-Tag: Start_BR_19998_21191~55 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=59a04742eacdc49770765d5180bd97032a9ccaee;p=modules%2Fkernel.git the dump state for batch of yacs file is optional --- diff --git a/src/Launcher/Launcher_Job_YACSFile.cxx b/src/Launcher/Launcher_Job_YACSFile.cxx index 1f420f1aa..31bd4fe14 100644 --- a/src/Launcher/Launcher_Job_YACSFile.cxx +++ b/src/Launcher/Launcher_Job_YACSFile.cxx @@ -22,7 +22,7 @@ #include "Launcher_Job_YACSFile.hxx" -Launcher::Job_YACSFile::Job_YACSFile() {_job_type = "yacs_file";} +Launcher::Job_YACSFile::Job_YACSFile() {_job_type = "yacs_file"; _dumpState=0;} Launcher::Job_YACSFile::~Job_YACSFile() {} @@ -35,5 +35,14 @@ Launcher::Job_YACSFile::setJobFile(const std::string & job_file) void Launcher::Job_YACSFile::addJobTypeSpecificScript(std::ofstream & launch_script_stream) { - launch_script_stream << _resource_definition.AppliPath << "/runSession -p $appli_port driver " << _job_file_name_complete << " --dump=30 > logs/yacs_" << _launch_date << ".log 2>&1" << std::endl; + launch_script_stream << _resource_definition.AppliPath << "/runSession -p $appli_port driver " << _job_file_name_complete; + if(_dumpState > 0) + launch_script_stream << " --dump=" << _dumpState; + launch_script_stream << " > logs/yacs_" << _launch_date << ".log 2>&1" << std::endl; +} + +void +Launcher::Job_YACSFile::setDumpState(const int dumpState) +{ + _dumpState = dumpState; } diff --git a/src/Launcher/Launcher_Job_YACSFile.hxx b/src/Launcher/Launcher_Job_YACSFile.hxx index 371726f20..e6226afcf 100644 --- a/src/Launcher/Launcher_Job_YACSFile.hxx +++ b/src/Launcher/Launcher_Job_YACSFile.hxx @@ -34,6 +34,9 @@ namespace Launcher virtual void setJobFile(const std::string & job_file); virtual void addJobTypeSpecificScript(std::ofstream & launch_script_stream); + virtual void setDumpState(const int dumpState); + protected: + int _dumpState; }; } diff --git a/src/Launcher/SALOME_Launcher.cxx b/src/Launcher/SALOME_Launcher.cxx index abf1e2389..379f681b7 100644 --- a/src/Launcher/SALOME_Launcher.cxx +++ b/src/Launcher/SALOME_Launcher.cxx @@ -170,6 +170,14 @@ SALOME_Launcher::createJob(const Engines::JobParameters & job_parameters) THROW_SALOME_CORBA_EXCEPTION(ex.msg.c_str(),SALOME::INTERNAL_ERROR); } + for(int i=0;i(new_job))->setDumpState(dumpState); + } + } + try { _l.createJob(new_job);