Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BiocParallel:::.batchtoolsClusterAvailable() mistakes Torque for SGE #128

Open
HenrikBengtsson opened this issue Nov 25, 2020 · 0 comments

Comments

@HenrikBengtsson
Copy link
Contributor

Not sure whether or not false positives are expected or not, but on a Torque/PBS cluster, BiocParallel:::.batchtoolsClusterAvailable("sge") returns TRUE (with BiocParallel 1.25.1):

> sapply(c("sge", "slurm", "lsf", "openlava", "torque"), BiocParallel:::.batchtoolsClusterAvailable)
     sge    slurm      lsf openlava   torque 
    TRUE    FALSE    FALSE    FALSE     TRUE 

Vice versa, on an SGE cluster, BiocParallel:::.batchtoolsClusterAvailable("torque") returns TRUE:

> sapply(c("sge", "slurm", "lsf", "openlava", "torque"), BiocParallel:::.batchtoolsClusterAvailable)
     sge    slurm      lsf openlava   torque 
    TRUE    FALSE    FALSE    FALSE     TRUE 

The problem seems to be that both SGE and Torque got qstat and qselect commands;

.batchtoolsClusterAvailable <-
function(cluster)
{
switch(
cluster,
socket = TRUE,
multicore = .Platform$OS.type != "windows",
interactive = TRUE,
sge = suppressWarnings(system2("qstat", stderr=NULL, stdout=NULL) != 127L),
slurm = suppressWarnings(system2("squeue", stderr=NULL, stdout=NULL) != 127L),
lsf = suppressWarnings(system2("bjobs", stderr=NULL, stdout=NULL) != 127L),
openlava = suppressWarnings(system2("bjobs", stderr=NULL, stdout=NULL) != 127L),
torque = suppressWarnings(system2("qselect", stderr=NULL, stdout=NULL) != 127L),
.stop(
"unsupported cluster type '", cluster, "'; ",
"supported types (when available):\n",
" ", paste0("'", .BATCHTOOLS_CLUSTERS, "'", collapse = ", ")
)
)
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant