Cross-platform super lightweight one file qsub replacement

Useful for people running their jobs on UNIX clusters, who for some reason need from time to time to launch them on Windows with business logic similar to original qsub command.

It works like this: starts an HTTP server which is running 8 worker threads (adjust to the max number of processes you want to run in parallel). Whenever /submit?script=/path/to/script&secret=xxxxx URL is requested, the HTTP server adds it to the queue for one of the free workers to grab. The worker then executes it using os.system() (it waits for the script to finish). The secret value is generated by the server and then read back by the client. It’s a similar security model as X11. The secret file is 0600.

All of this was written within 1h and is very rudimentary but should help those who have scripts based on qsub.

Usage: C:Python27python.exe qsub.py myscript.bat

Enjoy: qsub.zip

For Python 3: qsub1.zip

Leave a Reply

Your email address will not be published. Required fields are marked *