smartdispatch
smartdispatch copied to clipboard
Refactor command line
This will allow us to add feature such as #10, #93 and more.
Status of a batch can be (Running, Done, Stopped)
Here an Idea of what the option tree should look like.
- batch
- info ({batchUID} | {status} | All)
- delete ({batchUID} | {status} | All)
- stop ({batchUID} | All)
- launch (-q QUEUENAME | -t WALLTIME | -L {qsub,msub} | -c CORESPERCOMMAND | -g GPUSPERCOMMAND | -l MODULES | -x | -p POOL) commands
- "python runStuff.py param1 [p01 p02] "
- -f COMMANDSFILE
- resume (-q QUEUENAME | -t WALLTIME | -L {qsub,msub} | -c CORESPERCOMMAND | -g GPUSPERCOMMAND | -l MODULES | -x | -p POOL) {batchUID}
- queue
- info (QNAME | All)
- add QNAME CORESPERNODE GPUSPERNODE RAMPERNODE MAXWALLTIME DEFAULTMODULES NODESINQ MINPPN
- delete QNAME
- default QNAME
Examples:
smart_dispatch.py batch delete 2HKJ13423FF14f23KK4
smart_dispatch.py queue info all
smart_dispatch.py batch launch -q qtest -t 1:00:00 commands "python run_experiment.py param1 [p1 p2]"
smart_dispatch.py batch launch -q qtest -t 1:00:00 commands -f commands_to_run.txt
They also should all have a short version for convenience.
smart_dispatch.py b d 2HKJ13423FF14f23KK4
smart_dispatch.py q i all
smart_dispatch.py b l -q qtest -t 1:00:00 c "python run_experiment.py param1 [p1 p2]"
smart_dispatch.py b l -q qtest -t 1:00:00 c -f commands_to_run.txt
We should also think to what would be the best "defaults". Line 2 and 3 listed above could become:
smart_dispatch.py queue info
smart_dispatch.py -q qtest -t 1:00:00 commands "python run_experiment.py param1 [p1 p2]"
List of possible defaults:
- batch
- info {status=Running}
- delete N/A
- stop All (All is more Running in this case)
- launch N/A
- resume N/A
- queue
- info All
- add N/A
- delete N/A
- default N/A
:+1: