CommunicationProtocolType protocolType,
const char * mpiImpl,
int nb_proc_per_node)
- : BatchManager(parent, host),
- // Force SH protocol for Vishnu
- BatchManager_eClient(parent, host, username, SH, mpiImpl),
+ : // Force SH protocol for Vishnu
+ BatchManager(parent, host, username, SH, mpiImpl),
_nb_proc_per_node(nb_proc_per_node)
{
}
string output;
int status = Utils::getCommandOutput(command, output);
cout << output;
- if (status != 0) throw EmulationException("Can't submit job, error was: " + output);
+ if (status != 0) throw RunTimeException("Can't submit job, error was: " + output);
// find id of submitted job in output
string search = "Job Id : ";
string::size_type pos = output.find(search);
if (pos == string::npos)
- throw EmulationException("Error in the submission of the job on the remote host");
+ throw RunTimeException("Error in the submission of the job on the remote host");
pos += search.size();
string::size_type endl_pos = output.find('\n', pos);
string::size_type count = (endl_pos == string::npos)? string::npos : endl_pos - pos;
string jobref = output.substr(pos, count);
if (jobref.size() == 0)
- throw EmulationException("Error in the submission of the job on the remote host");
+ throw RunTimeException("Error in the submission of the job on the remote host");
JobId id(this, jobref);
return id;
int status = Utils::getCommandOutput(command, output);
cout << output;
if (status != 0)
- throw EmulationException("Can't copy input files, error was: " + output);
+ throw RunTimeException("Can't copy input files, error was: " + output);
}
/**
if (params.find(WORKDIR) != params.end())
workDir = params[WORKDIR].str();
else
- throw EmulationException("params[WORKDIR] is not defined. Please define it, cannot submit this job.");
+ throw RunTimeException("params[WORKDIR] is not defined. Please define it, cannot submit this job.");
if (params.find(EXECUTABLE) != params.end())
fileToExecute = params[EXECUTABLE].str();
else
- throw EmulationException("params[EXECUTABLE] is not defined. Please define it, cannot submit this job.");
+ throw RunTimeException("params[EXECUTABLE] is not defined. Please define it, cannot submit this job.");
string::size_type p1 = fileToExecute.find_last_of("/");
string::size_type p2 = fileToExecute.find_last_of(".");
// Create batch submit file
ofstream tempOutputFile;
- string tmpFileName = createAndOpenTemporaryFile("vishnu-script", tempOutputFile);
+ string tmpFileName = Utils::createAndOpenTemporaryFile("vishnu-script", tempOutputFile);
tempOutputFile << "#!/bin/sh" << endl;
tempOutputFile << "#% vishnu_output=" << workDir << "/logs/output.log." << rootNameToExecute << endl;
int status = system(command.c_str());
if (status)
- throw EmulationException("Can't delete job " + jobid.getReference());
+ throw RunTimeException("Can't delete job " + jobid.getReference());
cerr << "job " << jobid.getReference() << " killed" << endl;
}
string output;
int status = Utils::getCommandOutput(command, output);
if (status != 0)
- throw EmulationException("Can't query job " + jobid.getReference());
+ throw RunTimeException("Can't query job " + jobid.getReference());
JobInfo_eVishnu jobinfo = JobInfo_eVishnu(jobid.getReference(), output);
return jobinfo;
}
string absdir = (Utils::isAbsolutePath(directory))? directory : cwd + "/" + directory;
int status = CommunicationProtocol::getInstance(SH).makeDirectory(absdir, "", "");
if (status != 0) {
- throw EmulationException("Can't create result directory");
+ throw RunTimeException("Can't create result directory");
}
string subCommand = string("export OMNIORB_CONFIG=$VISHNU_CONFIG_FILE; ");
status = Utils::getCommandOutput(command, output);
cout << output;
if (status != 0)
- throw EmulationException("Can't import output files, error was: " + output);
+ throw RunTimeException("Can't import output files, error was: " + output);
}
}