You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#' \item{clusters:}{Resource used for Slurm to select the set of clusters to run \code{sbatch}/\code{squeue}/\code{scancel} on.}
The problem:
if this resource / getClusters is NULL, there's no cluster specified and functions like findRunning() etc. will return an empty table despite jobs are running.
For months I was wondering why my queued Slurm jobs where listed as expired and I assumed I was doing something wrong or my template was outdated.
Took me a moment to figure out that I was accidentally correctly misspecifying clusters in my resources = list(...) call 🥴
EDIT: Oh, and the template I'm using relies on resources$clusters.
Suggested fix
I'm not sure. I was about to prepare a PR when I realized that I don't want to
change the internal getClusters function to look for clusters instead of cluster because that will silently break peoples existing batchtools configs and they might not notice.
change the docs for submitJobs to (wrongly?) suggest that the resource should be named cluster, implying that multiple clusters can not be specified (which I never tried)
At the very least I thought about introducing an assertion on provided resources to shield against this sort of thing, but I'm not sure how to go about that yet.
The text was updated successfully, but these errors were encountered:
jemus42
changed the title
Slurm resource name clusters misspecified either in docs or internally
Slurm resource named clusters in docs, and cluster in getClustersOct 18, 2023
I can't quite decide which way it is.
In
clusterFunctionsSlurm.R
, thegetClusters
function is defined which looks for a resource namedcluster
(singular).batchtools/R/clusterFunctionsSlurm.R
Lines 38 to 42 in 1196047
The documentation of
submitJobs
refers toclusters
(plural):batchtools/R/submitJobs.R
Line 25 in 1196047
The problem:
if this resource /
getClusters
isNULL
, there's no cluster specified and functions likefindRunning()
etc. will return an empty table despite jobs are running.For months I was wondering why my queued Slurm jobs where listed as expired and I assumed I was doing something wrong or my template was outdated.
Took me a moment to figure out that I was accidentally correctly misspecifying
clusters
in myresources = list(...)
call 🥴EDIT: Oh, and the template I'm using relies on
resources$clusters
.Suggested fix
I'm not sure. I was about to prepare a PR when I realized that I don't want to
getClusters
function to look forclusters
instead ofcluster
because that will silently break peoples existing batchtools configs and they might not notice.submitJobs
to (wrongly?) suggest that the resource should be namedcluster
, implying that multiple clusters can not be specified (which I never tried)At the very least I thought about introducing an assertion on provided
resources
to shield against this sort of thing, but I'm not sure how to go about that yet.The text was updated successfully, but these errors were encountered: