Skip to content

Commit cec2f74

Browse files
committed
Better error catching for command-line arguments
1 parent 43a9613 commit cec2f74

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

bin/wfbench

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -612,6 +612,9 @@ def main():
612612
if not args.time_limit and (not args.cpu_work and not args.gpu_work):
613613
log_error("At least one of --time-limit, --cpu-work, or --gpu-work should be provided.")
614614
sys.exit(1)
615+
if args.time_limit and (not args.cpu_work and not args.gpu_work):
616+
log_error("In addition to --time-limit, at least one of --cpu-work or --gpu-work must be provided (to specify which kind of work should be done).")
617+
sys.exit(1)
615618

616619
run(**vars(args))
617620

0 commit comments

Comments
 (0)