Skip to content
Snippets Groups Projects
Commit db3a1236 authored by Jeremy Auguste's avatar Jeremy Auguste
Browse files

Added a way to change the name of the job

parent 97d1fe39
No related branches found
No related tags found
No related merge requests found
...@@ -15,6 +15,8 @@ def argparser(): ...@@ -15,6 +15,8 @@ def argparser():
help="Command to use for the job (in passive mode)") help="Command to use for the job (in passive mode)")
parser.add_argument('argument', nargs=argparse.REMAINDER, parser.add_argument('argument', nargs=argparse.REMAINDER,
help="Arguments of the command (in passive mode)") 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", parser.add_argument('-b', '--besteffort', action="store_true",
help="Launch job in besteffort mode") help="Launch job in besteffort mode")
parser.add_argument('-t', '--time', default=12, type=int, parser.add_argument('-t', '--time', default=12, type=int,
...@@ -63,6 +65,14 @@ def main(): ...@@ -63,6 +65,14 @@ def main():
ressources = "core={},walltime={}:00:00".format(args.core, args.time) ressources = "core={},walltime={}:00:00".format(args.core, args.time)
command.append(ressources) 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: if args.besteffort:
command.extend(["-t", "besteffort", "-t", "idempotent"]) command.extend(["-t", "besteffort", "-t", "idempotent"])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment