I wanted to specify the earliest time my job would run (11:00 today) by passing "-a 1100" to qsub via the -a argument to case.submit.
I tried many combinations of quoting the 2 word argument, but could not find one that case.submit would accept.
I'm using a maint-5.8 cime (`git describe --tags` yields to-acme-2019-03-12-3420-gca503666c),
but I think these issues persisted into cesm2_3_beta17.
The command + error combinations included:
-a "-a 1100"
case.submit: error: argument -a/--batch-args: expected one argument
(It looks like one to naive users...)
Also, this error message should maybe report --batch_args instead of --batch-args.
There's more inconsistency with the long form of the argument:
`case.submit --help` yields "--batch_args BATCH_ARGS BATCH_ARGS",
but
--batch_args '-a 1100'
error: unrecognized arguments: --batch_args
The "expected one argument" led to me adding ' nargs=2,' to the case.submit: parser.add_argument("-a" command.
That helped, but caused
-a ' -a' 1100 and
--batch_args ' -a' 1100
env_batch.py (line 659): submitargs += " " + batch_args
TypeError: can only concatenate str (not "list") to str
This led me to replace line 659 with
args_list = [submitargs] + batch_args
submitargs = " ".join(args_list)
This appears to work, but is probably not the preferred solution, especially because of the hard-coding of nargs=2.
But I don't have the python+cime chops to propose a robust fix.
I'm guessing that this is not a high priority, but I want to bring it up in case other people run into it.
Kevin
I tried many combinations of quoting the 2 word argument, but could not find one that case.submit would accept.
I'm using a maint-5.8 cime (`git describe --tags` yields to-acme-2019-03-12-3420-gca503666c),
but I think these issues persisted into cesm2_3_beta17.
The command + error combinations included:
-a "-a 1100"
case.submit: error: argument -a/--batch-args: expected one argument
(It looks like one to naive users...)
Also, this error message should maybe report --batch_args instead of --batch-args.
There's more inconsistency with the long form of the argument:
`case.submit --help` yields "--batch_args BATCH_ARGS BATCH_ARGS",
but
--batch_args '-a 1100'
error: unrecognized arguments: --batch_args
The "expected one argument" led to me adding ' nargs=2,' to the case.submit: parser.add_argument("-a" command.
That helped, but caused
-a ' -a' 1100 and
--batch_args ' -a' 1100
env_batch.py (line 659): submitargs += " " + batch_args
TypeError: can only concatenate str (not "list") to str
This led me to replace line 659 with
args_list = [submitargs] + batch_args
submitargs = " ".join(args_list)
This appears to work, but is probably not the preferred solution, especially because of the hard-coding of nargs=2.
But I don't have the python+cime chops to propose a robust fix.
I'm guessing that this is not a high priority, but I want to bring it up in case other people run into it.
Kevin