From 05725c46cd33d72db60d5ea5954541f073163dec Mon Sep 17 00:00:00 2001 From: Matthijs van der Wild Date: Tue, 8 Jul 2025 16:12:51 -0400 Subject: Expose the batching system The queuing system was hard-coded to slurm. It may be, at times, convenient to be able to run workflows on the local node (or use a different queuing system altogether). The old behaviour is maintained by setting the batching system to slurm by default; the user can change the system by using --batch_system. --- pilot.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'pilot.sh') diff --git a/pilot.sh b/pilot.sh index 736f9a2..61e02af 100644 --- a/pilot.sh +++ b/pilot.sh @@ -1,7 +1,7 @@ #!/bin/sh -eu usage() { - echo "Usage: ${PROGRAM} [-r|--restart] [-h|--help] [-c|--container ] [--scratch ] [--outdir ] (-f ) (-p ) " + echo "Usage: ${PROGRAM} [-r|--restart] [-h|--help] [-c|--container ] [--scratch ] [--outdir ] [--batch_system ] (-f ) (-p ) " exit 0 } @@ -19,13 +19,14 @@ set_container() { fi } -opts=$(getopt -o rhf:c:p: --long restart,help,container:,scratch:,outdir: \ +opts=$(getopt -o rhf:c:p: --long restart,help,container:,scratch:,outdir:,batch_system: \ -n 'pilot' -- "$@") eval set -- "$opts" RESTART="" SCRATCH="" +BATCH_SYSTEM="slurm" while true; do case "$1" in -c | --container) set_container "${2}"; shift 2 ;; @@ -35,6 +36,7 @@ while true; do -r | --restart) RESTART="--restart"; shift ;; --scratch) SCRATCH="${2}"; shift 2 ;; --outdir) OUTDIR="${2}"; shift 2;; + --batch_system) BATCH_SYSTEM="${2}"; shift 2;; * ) shift; break ;; esac done @@ -99,7 +101,7 @@ TOIL_COMMAND="toil-cwl-runner ${RESTART} ${TMPDIR_PREFIX} \ --writeLogs ${JOB_LOG_DIR} \ --stats \ --clusterStats ${STATS_DIR} \ - --batchSystem slurm \ + --batchSystem ${BATCH_SYSTEM} \ --batchLogsDir ${BATCH_LOG_DIR} \ --tmp-outdir-prefix ${TMP_OUTDIR} \ --workDir ${WORK_DIR} \ -- cgit v1.2.3