diff options
author | Arun Isaac | 2024-10-09 23:35:10 +0100 |
---|---|---|
committer | Arun Isaac | 2024-10-10 01:56:57 +0100 |
commit | 552919ee626a0c8ca3d6c43f7e771803d475d0db (patch) | |
tree | 9b4ba779ba049ee48e411e6e4ac03b353ebe55d0 /bin | |
parent | be8611f5274c01832e1d43886eef434b239cd69e (diff) | |
download | ravanan-552919ee626a0c8ca3d6c43f7e771803d475d0db.tar.gz ravanan-552919ee626a0c8ca3d6c43f7e771803d475d0db.tar.lz ravanan-552919ee626a0c8ca3d6c43f7e771803d475d0db.zip |
slurm-api: Allow requesting for a nice adjustment.
* ravanan/batch-system.scm (<slurm-api-batch-system>)[nice]: Add
field.
* bin/ravanan (%options): Add slurm-nice.
(print-usage): Document it.
(main): Initialize nice field of <slurm-api-batch-system> object.
* ravanan/command-line-tool.scm (run-command-line-tool): Pass
#:nice argument to submit-job.
* ravanan/slurm-api.scm (submit-job): Accept #:nice argument.
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/ravanan | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/bin/ravanan b/bin/ravanan index 2bcf0db..eed7167 100755 --- a/bin/ravanan +++ b/bin/ravanan @@ -60,6 +60,10 @@ exec guile --no-auto-compile -e main -s "$0" "$@" (option (list "slurm-partition") #t #f (lambda (opt name arg result) (acons 'slurm-partition arg result))) + (option (list "slurm-nice") #t #f + (lambda (opt name arg result) + (acons 'slurm-nice (string->number arg) + result))) (option (list "help") #f #t (lambda (opt name arg result) (acons 'help #t result))))) @@ -89,6 +93,7 @@ Slurm API batch system options: --slurm-api-endpoint=SLURM-API-ENDPOINT slurm API endpoint to connect to --slurm-jwt=SLURM-JWT slurm JWT to authenticate with --slurm-partition=SLURM-PARTITION slurm partition to request + --slurm-nice=SLURM-NICE slurm job priority adjustment " program)) @@ -157,7 +162,8 @@ files that have the token in the @verbatim{SLURM_JWT=token} format." (assq-ref args 'slurm-api-endpoint) (and (assq-ref args 'slurm-jwt) (read-jwt (assq-ref args 'slurm-jwt))) - (assq-ref args 'slurm-partition)))) + (assq-ref args 'slurm-partition) + (assq-ref args 'slurm-nice)))) #:guix-daemon-socket (assq-ref args 'guix-daemon-socket)) (current-output-port) #:pretty #t) |