#include "BatchManager_Vishnu.hxx"
#include "JobInfo_Vishnu.hxx"
+#include "Log.hxx"
using namespace std;
subCommand += "vishnu_close";
string command = _protocol.getExecCommand(subCommand, _hostname, _username);
command += " 2>&1";
- cerr << command.c_str() << endl;
+ LOG(command);
// submit job
string output;
int status = Utils::getCommandOutput(command, output);
- cout << output;
+ LOG(output);
if (status != 0) throw RunTimeException("Can't submit job, error was: " + output);
// find id of submitted job in output
// Execute command
string command = _protocol.getExecCommand(subCommand, _hostname, _username);
command += " 2>&1";
- cerr << command.c_str() << endl;
+ LOG(command);
string output;
int status = Utils::getCommandOutput(command, output);
- cout << output;
+ LOG(output);
if (status != 0)
throw RunTimeException("Can't copy input files, error was: " + output);
}
tempOutputFile.flush();
tempOutputFile.close();
- cerr << "Batch script file generated is: " << tmpFileName << endl;
+ LOG("Batch script file generated is: " << tmpFileName);
return tmpFileName;
}
subCommand += "vishnu_cancel_job " + _hostname + " " + jobid.getReference() + " && ";
subCommand += "vishnu_close";
string command = _protocol.getExecCommand(subCommand, _hostname, _username);
- cerr << command.c_str() << endl;
+ LOG(command);
int status = system(command.c_str());
if (status)
throw RunTimeException("Can't delete job " + jobid.getReference());
- cerr << "job " << jobid.getReference() << " killed" << endl;
+ LOG("job " << jobid.getReference() << " killed");
}
JobInfo BatchManager_Vishnu::queryJob(const JobId & jobid)
subCommand += "vishnu_get_job_info " + _hostname + " " + jobid.getReference() + " && ";
subCommand += "vishnu_close";
string command = _protocol.getExecCommand(subCommand, _hostname, _username);
- cerr << command.c_str() << endl;
+ LOG(command);
string output;
int status = Utils::getCommandOutput(command, output);
// Execute command
string command = _protocol.getExecCommand(subCommand, _hostname, _username);
command += " 2>&1";
- cerr << command.c_str() << endl;
+ LOG(command);
string output;
status = Utils::getCommandOutput(command, output);
- cout << output;
+ LOG(output);
if (status != 0)
throw RunTimeException("Can't import output files, error was: " + output);
}