From db3a123685745706a7e3a2126344641c43ff34fe Mon Sep 17 00:00:00 2001 From: Jeremy Auguste <jeremy.auguste@dhcp-154.lidil.univ-mrs.fr> Date: Thu, 18 Jan 2018 12:04:21 +0100 Subject: [PATCH] Added a way to change the name of the job --- oargen.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/oargen.py b/oargen.py index 18204ee..099ef07 100755 --- a/oargen.py +++ b/oargen.py @@ -15,6 +15,8 @@ def argparser(): help="Command to use for the job (in passive mode)") parser.add_argument('argument', nargs=argparse.REMAINDER, help="Arguments of the command (in passive mode)") + parser.add_argument('-n', '--name', + help="Name to give to the job") parser.add_argument('-b', '--besteffort', action="store_true", help="Launch job in besteffort mode") parser.add_argument('-t', '--time', default=12, type=int, @@ -63,6 +65,14 @@ def main(): ressources = "core={},walltime={}:00:00".format(args.core, args.time) command.append(ressources) + if args.name is not None: + command.append("-n") + command.append(args.name) + command.append("-O") + command.append(f"{args.name}.%jobid%.stdout") + command.append("-E") + command.append(f"{args.name}.%jobid%.stderr") + if args.besteffort: command.extend(["-t", "besteffort", "-t", "idempotent"]) -- GitLab