Skip to content

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

@HenrikBengtsson

Description

@HenrikBengtsson

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 = ", ")
)
)
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions