From: ribes Date: Tue, 17 Nov 2009 15:35:45 +0000 (+0000) Subject: Get qsub error on submitJob and send it to LIBBATCH Client X-Git-Tag: new_launcher_alpha_091119~5 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=e32c43f6ef7cc113a3321718b8ca239aca9c41f5;p=tools%2Flibbatch.git Get qsub error on submitJob and send it to LIBBATCH Client --- diff --git a/src/PBS/Batch_BatchManager_ePBS.cxx b/src/PBS/Batch_BatchManager_ePBS.cxx index aa8a8d9..9d4d0ed 100644 --- a/src/PBS/Batch_BatchManager_ePBS.cxx +++ b/src/PBS/Batch_BatchManager_ePBS.cxx @@ -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());