From: barate Date: Tue, 30 Nov 2010 14:39:26 +0000 (+0000) Subject: Added deleteJob method for LoadLeveler X-Git-Tag: V1_3_0rc1~15 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=59e360535330e27f3371f8654b42fb7bcd404595;p=tools%2Flibbatch.git Added deleteJob method for LoadLeveler --- diff --git a/src/LoadLeveler/Batch_BatchManager_eLL.cxx b/src/LoadLeveler/Batch_BatchManager_eLL.cxx index fc84e50..28ed73c 100644 --- a/src/LoadLeveler/Batch_BatchManager_eLL.cxx +++ b/src/LoadLeveler/Batch_BatchManager_eLL.cxx @@ -192,7 +192,16 @@ namespace Batch { void BatchManager_eLL::deleteJob(const JobId & jobid) { - throw NotYetImplementedException("BatchManager_eLL::deleteJob"); + // define command to delete job + string subCommand = "llcancel " + jobid.getReference(); + string command = _protocol.getExecCommand(subCommand, _hostname, _username); + cerr << command.c_str() << endl; + + int status = system(command.c_str()); + if (status) + throw EmulationException("Can't delete job " + jobid.getReference()); + + cerr << "job " << jobid.getReference() << " killed" << endl; } void BatchManager_eLL::holdJob(const JobId & jobid)