diff --git a/oargen.py b/oargen.py index 18204eec229762f1f0ffbee216e330232451db80..099ef07bd101d78bf04f9e8e17ef9d6b1111e8df 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"])