X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FLauncher%2FLauncher_Job_Command.cxx;h=fd193e5211feb7ff892b8e3cdfb6e1517d96d1e6;hb=d7e0fe4e0066bc657b5648bd27337167a4d62bff;hp=6f2fecebd12f2d2769d892b5718d45292d5631ab;hpb=d9904f7ff3e87d82347311c61b53d3127f587fe0;p=modules%2Fkernel.git diff --git a/src/Launcher/Launcher_Job_Command.cxx b/src/Launcher/Launcher_Job_Command.cxx index 6f2fecebd..fd193e521 100644 --- a/src/Launcher/Launcher_Job_Command.cxx +++ b/src/Launcher/Launcher_Job_Command.cxx @@ -1,9 +1,9 @@ -// Copyright (C) 2009-2012 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2009-2015 CEA/DEN, EDF R&D, OPEN CASCADE // // 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,10 +23,10 @@ #include "Basics_DirUtils.hxx" #ifdef WITH_LIBBATCH -#include +#include #endif -#ifdef WNT +#ifdef WIN32 #include #define _chmod chmod #endif @@ -41,7 +41,6 @@ Launcher::Job_Command::update_job() #ifdef WITH_LIBBATCH Batch::Parametre params = common_job_params(); params[Batch::EXECUTABLE] = buildCommandScript(params, _launch_date); - params[Batch::EXCLUSIVE] = false; _batch_job->setParametre(params); #endif } @@ -60,14 +59,14 @@ Launcher::Job_Command::buildCommandScript(Batch::Parametre params, std::string l launch_script_stream.open(launch_script.c_str(), std::ofstream::out); // Script - launch_script_stream << "#! /bin/bash -f" << std::endl; + launch_script_stream << "#!/bin/sh -f" << std::endl; launch_script_stream << "cd " << work_directory << std::endl; launch_script_stream << "export PYTHONPATH=" << work_directory << ":$PYTHONPATH" << std::endl; launch_script_stream << "export PATH=" << work_directory << ":$PATH" << std::endl; if (_env_file != "") { std::string::size_type last = _env_file.find_last_of("/"); - launch_script_stream << "source ./" << _env_file.substr(last+1) << std::endl; + launch_script_stream << ". ./" << _env_file.substr(last+1) << std::endl; } launch_script_stream << "./" << _job_file_name_complete << " > " << work_directory <<"/logs/command_" << launch_date << ".log 2>&1" << std::endl;