]> SALOME platform Git repositories - tools/libbatch.git/commitdiff
Salome HOME
Get qsub error on submitJob and send it to LIBBATCH Client
authorribes <ribes>
Tue, 17 Nov 2009 15:35:45 +0000 (15:35 +0000)
committerribes <ribes>
Tue, 17 Nov 2009 15:35:45 +0000 (15:35 +0000)
src/PBS/Batch_BatchManager_ePBS.cxx

index aa8a8d9781749f690462414d26cdfff961fa2847..9d4d0ed49391af081d27d09a424c3e6f02ef6c3c 100644 (file)
@@ -95,10 +95,19 @@ namespace Batch {
     string command = _protocol.getExecCommand(subCommand, _hostname, _username);
     command += " > ";
     command += logFile;
+    command += " 2>&1";
     cerr << command.c_str() << endl;
     status = system(command.c_str());
     if(status)
-      throw EmulationException("Error of connection on remote host");
+    {
+      ifstream error_message(logFile.c_str());
+      std::string mess;
+      std::string temp;
+      while(std::getline(error_message, temp))
+       mess += temp;
+      error_message.close();
+      throw EmulationException("Error of connection on remote host, error was: " + mess);
+    }
 
     // read id of submitted job in log file
     ifstream idfile(logFile.c_str());