From: rnv Date: Mon, 8 Oct 2012 08:45:23 +0000 (+0000) Subject: Patrial fix of the issue 21727: [CEA 584] sending a Yacs graph from Windows to a... X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2FV6_5_BR;p=modules%2Fkernel.git Patrial fix of the issue 21727: [CEA 584] sending a Yacs graph from Windows to a cluster --- diff --git a/src/Launcher/Launcher_Job.cxx b/src/Launcher/Launcher_Job.cxx index ae7d4814e..1307fbf22 100644 --- a/src/Launcher/Launcher_Job.cxx +++ b/src/Launcher/Launcher_Job.cxx @@ -502,7 +502,11 @@ Launcher::Job::common_job_params() if (file.substr(0, 1) == std::string("/")) local_file = file; else +#ifndef WIN32 local_file = _local_directory + "/" + file; +#else + local_file = file; +#endif // remote file -> get only file name from in_files size_t found = file.find_last_of("/"); diff --git a/src/Launcher/Launcher_Job_Command.cxx b/src/Launcher/Launcher_Job_Command.cxx index f325898ed..6f2fecebd 100644 --- a/src/Launcher/Launcher_Job_Command.cxx +++ b/src/Launcher/Launcher_Job_Command.cxx @@ -20,6 +20,7 @@ // Author: André RIBES - EDF R&D // #include "Launcher_Job_Command.hxx" +#include "Basics_DirUtils.hxx" #ifdef WITH_LIBBATCH #include @@ -54,7 +55,7 @@ Launcher::Job_Command::buildCommandScript(Batch::Parametre params, std::string l // File name std::string launch_date_port_file = launch_date; - std::string launch_script = "/tmp/runCommand_" + _job_file_name + "_" + launch_date + ".sh"; + std::string launch_script = Kernel_Utils::GetTmpDir() + "runCommand_" + _job_file_name + "_" + launch_date + ".sh"; std::ofstream launch_script_stream; launch_script_stream.open(launch_script.c_str(), std::ofstream::out); diff --git a/src/Launcher/Launcher_Job_SALOME.cxx b/src/Launcher/Launcher_Job_SALOME.cxx index 5e80649d0..85f6e1015 100644 --- a/src/Launcher/Launcher_Job_SALOME.cxx +++ b/src/Launcher/Launcher_Job_SALOME.cxx @@ -20,6 +20,7 @@ // Author: André RIBES - EDF R&D // #include "Launcher_Job_SALOME.hxx" +#include "Basics_DirUtils.hxx" #ifdef WITH_LIBBATCH #include @@ -64,9 +65,14 @@ Launcher::Job_SALOME::buildSalomeScript(Batch::Parametre params) // parameters std::string work_directory = params[Batch::WORKDIR].str(); - std::string launch_script = "/tmp/runSalome_" + _job_file_name + "_" + _launch_date + ".sh"; + std::string launch_script = Kernel_Utils::GetTmpDir() + "runSalome_" + _job_file_name + "_" + _launch_date + ".sh"; std::ofstream launch_script_stream; - launch_script_stream.open(launch_script.c_str(), std::ofstream::out); + launch_script_stream.open(launch_script.c_str(), + std::ofstream::out +#ifdef WIN32 + | std::ofstream::binary //rnv: to avoid CL+RF end of line on windows +#endif + ); // Begin of script launch_script_stream << "#!/bin/sh -f" << std::endl;