Salome HOME
add function to get dump state xml file
authorsecher <secher>
Tue, 25 Jan 2011 15:10:28 +0000 (15:10 +0000)
committersecher <secher>
Tue, 25 Jan 2011 15:10:28 +0000 (15:10 +0000)
src/Core/Batch_BatchManager_eClient.cxx
src/Core/Batch_BatchManager_eClient.hxx

index 6b998ed9a06d5149755c3e2d776b5de637c039e6..b4344717cd280c3d5342875db1492ea3339d052e 100644 (file)
@@ -188,6 +188,33 @@ namespace Batch {
 
   }
 
+  void BatchManager_eClient::importDumpStateFile( const Job & job, const string directory )
+  {
+    Parametre params = job.getParametre();
+
+    // Create local result directory
+    int status = CommunicationProtocol::getInstance(SH).makeDirectory(directory, "", "");
+    if (status) {
+      string mess("Directory creation failed. Status is :");
+      ostringstream status_str;
+      status_str << status;
+      mess += status_str.str();
+      cerr << mess << endl;
+    }
+
+    status = _protocol.copyFile(string(params[TMPDIR]) + string("/dumpState*.xml"), _hostname, _username,
+                                directory, "", "");
+    if (status) {
+      // Try to get what we can (logs files)
+      // throw BatchException("Error of connection on remote host");
+      std::string mess("Copy command failed ! status is :");
+      ostringstream status_str;
+      status_str << status;
+      mess += status_str.str();
+      cerr << mess << endl;
+    }
+  }
+
   MpiImpl *BatchManager_eClient::FactoryMpiImpl(string mpiImpl)
   {
     if(mpiImpl == "lam")
index d46319e24827e4ab28b7c6b80b25f5c28d74c7d4..55f299acd7e435b2fca560dc55e02fd896eee2d5 100644 (file)
@@ -53,6 +53,7 @@ namespace Batch {
                          CommunicationProtocolType protocolType = SSH, const char* mpiImpl="mpich1");
     virtual ~BatchManager_eClient();
     void importOutputFiles( const Job & job, const std::string directory );
+    void importDumpStateFile( const Job & job, const std::string directory );
 
   protected:
     const CommunicationProtocol & _protocol; // protocol to access _hostname