From e32c43f6ef7cc113a3321718b8ca239aca9c41f5 Mon Sep 17 00:00:00 2001 From: ribes Date: Tue, 17 Nov 2009 15:35:45 +0000 Subject: [PATCH] Get qsub error on submitJob and send it to LIBBATCH Client --- src/PBS/Batch_BatchManager_ePBS.cxx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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()); -- 2.39.2