]> SALOME platform Git repositories - tools/libbatch.git/commitdiff
Salome HOME
- Use exportInputFiles in eSSH
authorribes <ribes>
Thu, 12 Nov 2009 13:34:49 +0000 (13:34 +0000)
committerribes <ribes>
Thu, 12 Nov 2009 13:34:49 +0000 (13:34 +0000)
- Add option "-r" by default on copy

src/Core/Batch_CommunicationProtocolRSH.cxx
src/Core/Batch_CommunicationProtocolSH.cxx
src/Core/Batch_CommunicationProtocolSSH.cxx
src/SSH/Batch_BatchManager_eSSH.cxx

index 5fabe63fe5a940260dc4d5641d9389d40182b620..e2927f4c54afef7e5fd0538ff77c5581096accfa 100644 (file)
@@ -102,6 +102,7 @@ namespace Batch {
     fullDestination += destinationPath;
 
     cmd.push_back(RCP_COMMAND);
+    cmd.push_back("-r");
     cmd.push_back(fullSource);
     cmd.push_back(fullDestination);
 
index 2c5bfd01472d1c3918584ad0a4949ae6f23b0bd6..b5193d6a308b1358934d70543cd8045a8ce50459 100644 (file)
@@ -75,6 +75,7 @@ namespace Batch {
   {
     vector<string> cmd;
     cmd.push_back(CP_COMMAND);
+    cmd.push_back("-r");
     cmd.push_back(fixPath(sourcePath));
     cmd.push_back(fixPath(destinationPath));
     return cmd;
index a9c65903e0ac2bd5a16be4e7534e3324aff69a4d..428bfc9a5975795b62064fc964d6bf1fdcdc87d4 100644 (file)
@@ -84,6 +84,7 @@ namespace Batch {
     // (particularly useful to keep scripts executable when copying them)
     cmd.push_back(SCP_COMMAND);
     cmd.push_back("-p");
+    cmd.push_back("-r");
     cmd.push_back(fullSource);
     cmd.push_back(fullDestination);
 
index 3e085d49a926680bb2e72f32cd714c9c50bf1315..30428b223b1965d6244367f3c1dd93b4efdcfba7 100644 (file)
@@ -70,37 +70,12 @@ namespace Batch {
     std::cerr << "BatchManager_eSSH::submitJob exportInputFiles" << std::endl;
     Parametre param = job.getParametre();
 
-    // Creates job repertories
-    if (string(param[TMPDIR]) != "")
-    {
-      string subCommand = string("mkdir -p ") + string(param[TMPDIR]);
-      string command = BatchManager_eClient::_protocol.getExecCommand(subCommand, _hostname, _username);
-      cerr << command.c_str() << endl;
-      int status = system(command.c_str());
-      if(status) {
-       std::ostringstream oss;
-       oss << status;
-       std::string ex_mess("Error of connection on remote host ! status = ");
-       ex_mess += oss.str();
-       throw EmulationException(ex_mess.c_str());
-      }
-    }
-    if (string(param[TMPDIR]) != "")
-    {
-      string subCommand = string("mkdir -p ") + string(param[WORKDIR]);
-      string command = BatchManager_eClient::_protocol.getExecCommand(subCommand, _hostname, _username);
-      cerr << command.c_str() << endl;
-      int status = system(command.c_str());
-      if(status) {
-       std::ostringstream oss;
-       oss << status;
-       std::string ex_mess("Error of connection on remote host ! status = ");
-       ex_mess += oss.str();
-       throw EmulationException(ex_mess.c_str());
-      }
-    }
+    // Input files copy
+    exportInputFiles(job);
 
+    // Launch job
     Parametre new_param(param);
+    new_param[INFILE].eraseAll(); // Patch until Local Manager is patched
     new_param[OUTFILE].eraseAll(); // Patch until Local Manager is patched
     Job * j = new Job(new_param);
     std::cerr << "BatchManager_eSSH::submitJob Local submitJob" << std::endl;