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

Changed the input format for the time

parent bc5daae3
No related branches found
No related tags found
No related merge requests found
...@@ -19,8 +19,8 @@ def argparser(): ...@@ -19,8 +19,8 @@ def argparser():
help="Name to give to the job") 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, nargs="+", 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]])")
parser.add_argument('-g', '--gpu', action="store_true", parser.add_argument('-g', '--gpu', action="store_true",
help="If True, reserves only cores with GPUs") help="If True, reserves only cores with GPUs")
parser.add_argument('-c', '--core', default=1, type=int, parser.add_argument('-c', '--core', default=1, type=int,
...@@ -62,9 +62,10 @@ def main(): ...@@ -62,9 +62,10 @@ def main():
command.append(properties) command.append(properties)
command.append("-l") command.append("-l")
hour = args.time[0] time = args.time.split(':')
minutes = args.time[1] if len(args.time) >= 2 else 0 hour = time[0]
seconds = args.time[2] if len(args.time) >= 3 else 0 minutes = time[1] if len(time) >= 2 else "00"
seconds = time[2] if len(time) >= 3 else "00"
ressources = "core={},walltime={}:{}:{}".format(args.core, hour, minutes, seconds) ressources = "core={},walltime={}:{}:{}".format(args.core, hour, minutes, seconds)
command.append(ressources) command.append(ressources)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment