Skip to content

Commit

Permalink
allow LSF commands via ssh
Browse files Browse the repository at this point in the history
  • Loading branch information
reikoch committed Nov 17, 2021
1 parent 63a6f81 commit e5c085b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions R/clusterFunctionsLSF.R
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#' @return [\code{\link{ClusterFunctions}}].
#' @family ClusterFunctions
#' @export
makeClusterFunctionsLSF = function(template = "lsf", scheduler.latency = 1, fs.latency = 65) { # nocov start
makeClusterFunctionsLSF = function(template = "lsf-simple", nodename = "localhost", scheduler.latency = 1, fs.latency = 65) { # nocov start
template = findTemplateFile(template)
if (testScalarNA(template))
stopf("Argument 'template' (=\"%s\") must point to a readable template file or contain the template itself as string (containing at least one newline)", template)
Expand All @@ -38,7 +38,7 @@ makeClusterFunctionsLSF = function(template = "lsf", scheduler.latency = 1, fs.l
assertRegistry(reg, writeable = TRUE)
assertClass(jc, "JobCollection")
outfile = cfBrewTemplate(reg, template, jc)
res = runOSCommand("bsub", stdin = outfile)
res = runOSCommand("bsub", stdin = outfile, nodename = nodename)

if (res$exit.code > 0L) {
cfHandleUnknownSubmitError("bsub", res$exit.code, res$output)
Expand All @@ -50,7 +50,7 @@ makeClusterFunctionsLSF = function(template = "lsf", scheduler.latency = 1, fs.l

listJobs = function(reg, args) {
assertRegistry(reg, writeable = FALSE)
res = runOSCommand("bjobs", args)
res = runOSCommand("bjobs", args, nodename = nodename)
if (res$exit.code > 0L) {
if (res$exit.code == 255L || any(stri_detect_regex(res$output, "No (unfinished|pending|running) job found")))
return(character(0L))
Expand Down

0 comments on commit e5c085b

Please sign in to comment.