From 689d955a564a8e812359c15b0918dc0fdd7bd5d7 Mon Sep 17 00:00:00 2001 From: Jeremy Auguste <jeremy.auguste@lis-lab.fr> Date: Thu, 25 Oct 2018 16:11:09 +0200 Subject: [PATCH] Extra information on how to use the scripts --- README.org | 19 +++++++++++++++++++ oargen.py | 6 +++--- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/README.org b/README.org index 682ff15..8ada54b 100644 --- a/README.org +++ b/README.org @@ -5,3 +5,22 @@ This repository groups a set of tools to easily use OAR. + *oargen* requires python 2+ or 3+. + *batchoar* and *oarstats* require python 3+. The /pyyaml/ package is also required. +* Usage + +** OARGEN + +The basic usage of oargen is simply 'oargen.py -r /command/' where /command/ is the job +to execute on the cluster. + +Several options can be used: ++ *--run*: run the job on the cluster. ++ *--time /TIME/*: reservation walltime of your job. Accepted formats: /h/, /h:m/ or /h:m:s/. Defaults to 10 hours. ++ *--core /NB_CORES/*: number of cores required by your job. Defaults to 1. ++ *--interative*: launch job in interative mode instead of passive. ++ *--gpu*: request GPUs. ++ *--host /host1/ [/host2/.../hostn/]*: name of the hosts allowed to be used on the cluster. ++ *--ignore-host /host1/ [/host2/.../hostn/]*: name of the hosts forbidden to be used on the cluster. ++ *--anterior /ANTERIOR_ID/*: job will only be launched once the job with the specified ID is finished. ++ *--checkpoint /delay/*: enable the checkpoint signal with the given delay (in seconds). ++ *--name /name/*: name of the job. ++ *--directory /directory/*: directory in which will be stored the logs of the standard output and input. diff --git a/oargen.py b/oargen.py index 97b564f..450e973 100755 --- a/oargen.py +++ b/oargen.py @@ -18,15 +18,15 @@ def argparser(): parser.add_argument('-n', '--name', help="Name to give to the job") parser.add_argument('-d', '--directory', - help="Directory in which will be stores oarsub outputs") + help="Directory in which will be stored oarsub outputs") parser.add_argument('-b', '--besteffort', action="store_true", help="Launch job in besteffort mode") parser.add_argument('-t', '--time', default="10", - help="Estimated maximum duration of the job (format: h[:m[:s]])") + help="Estimated maximum duration of the job (format: h[:m[:s]]) (default: %(default)s)") parser.add_argument('-g', '--gpu', action="store_true", help="If True, reserves only cores with GPUs") parser.add_argument('-c', '--core', default=1, type=int, - help="Number of cores to reserve") + help="Number of cores to reserve. (default: %(default)s)") parser.add_argument('-H', '--host', nargs="+", default=[], help="Name of the hosts (SQL 'LIKE' syntax accepted)") parser.add_argument('-I', '--ignore-host', nargs="+", default=[], -- GitLab