aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorArun Isaac2024-10-09 22:50:24 +0100
committerArun Isaac2024-10-09 23:17:17 +0100
commit5d06ccc6b27dd213871ff8cede2d44aed2cae373 (patch)
treefc60cc018199076adfe338bc1d156b4a2051925a /bin
parent1f2b6aca9b85d4b41d10d75584a65345a4f2a57e (diff)
downloadravanan-5d06ccc6b27dd213871ff8cede2d44aed2cae373.tar.gz
ravanan-5d06ccc6b27dd213871ff8cede2d44aed2cae373.tar.lz
ravanan-5d06ccc6b27dd213871ff8cede2d44aed2cae373.zip
batch-system: Introduce <slurm-api-batch-system> record type.
A <slurm-api-batch-system> record type allows us an easy way to group and pass along parameters required by the slurm-api batch system. * ravanan/batch-system.scm: New file. * bin/ravanan: Import (ravanan batch-system). (main): Create <slurm-api-batch-system> object for batch-system argument. Do not pass #:slurm-api-endpoint and #:slurm-jwt arguments. * ravanan/command-line-tool.scm: Import (ravanan batch-system). (command-line-tool-supported-requirements): Check for slurm-api batch system using slurm-api-batch-system?. (run-command-line-tool): Check for slurm-api batch system using slurm-api-batch-system?. Do not accept #:slurm-api-endpoint and #:slurm-jwt arguments. * ravanan/workflow.scm: Import (ravanan batch-system). (workflow-scheduler): Do not accept #:slurm-api-endpoint and #:slurm-jwt arguments. Pass batch-system to job-state-status. (run-workflow): Check for slurm-api batch system using slurm-api-batch-system?. Do not accept #:slurm-api-endpoint and #:slurm-jwt arguments. * ravanan/job-state.scm: Import (ravanan batch-system). (job-state-status): Do not accept #:slurm-api-endpoint and #:slurm-jwt arguments. Accept batch-system argument.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/ravanan14
1 files changed, 9 insertions, 5 deletions
diff --git a/bin/ravanan b/bin/ravanan
index cc9005d..5807a8e 100755
--- a/bin/ravanan
+++ b/bin/ravanan
@@ -27,6 +27,7 @@ exec guile --no-auto-compile -e main -s "$0" "$@"
(ice-9 match)
(web uri)
(json)
+ (ravanan batch-system)
(ravanan reader)
(ravanan utils)
(ravanan workflow))
@@ -145,11 +146,14 @@ files that have the token in the @verbatim{SLURM_JWT=token} format."
(if (file-name-absolute? (assq-ref args 'store))
(assq-ref args 'store)
(canonicalize-path (assq-ref args 'store)))
- (assq-ref args 'batch-system)
- #:guix-daemon-socket (assq-ref args 'guix-daemon-socket)
- #:slurm-api-endpoint (assq-ref args 'slurm-api-endpoint)
- #:slurm-jwt (and (assq-ref args 'slurm-jwt)
- (read-jwt (assq-ref args 'slurm-jwt))))
+ (case (assq-ref args 'batch-system)
+ ((single-machine) 'single-machine)
+ ((slurm-api)
+ (slurm-api-batch-system
+ (assq-ref args 'slurm-api-endpoint)
+ (and (assq-ref args 'slurm-jwt)
+ (read-jwt (assq-ref args 'slurm-jwt))))))
+ #:guix-daemon-socket (assq-ref args 'guix-daemon-socket))
(current-output-port)
#:pretty #t)
(newline (current-output-port))))))))