CoBrALab / qbatch

The Unlicense
27 stars 13 forks source link

Position of '-' argument matters #176

Closed bcdarwin closed 5 years ago

bcdarwin commented 5 years ago

Maybe this is an ArgParse issue, but documenting it here (may have mentioned it already somewhere?). Arguments after '-' seem to be ignored:

$ echo 'echo hello' | qbatch - --mem=8G
$ squeue
9698525 bcdarwin rrg-jlerch-a          STDIN   R 2018-12-03T12:27      59:57     1    1 (null)    256M gra289 (None)
$ echo 'echo hello' | qbatch --mem=8G -
$ squeue
9698532 bcdarwin rrg-jlerch-a          STDIN   R 2018-12-03T12:28      59:59     1    1 (null)      8G gra289 (Prolog)
gdevenyi commented 5 years ago

Yeah, pretty sure that's an argparse issue.

I think the same thing would happen if you used a job file. Its due to command_file being the only positional argument.

It looks like maybe I could access those arguments with https://docs.python.org/3/library/argparse.html#intermixed-parsing but that's a brand-new feature.

gdevenyi commented 5 years ago

Going to close this as the intermixed parser for argparse is not fully featured.