Create SGE or SLURM launchers for Stampede and Lonestar
launcher_creator.py is a convenience utility that automates creating a launcher for TACC clusters based on parameters (and commands) you give it. It outputs a either a SLURM or SGE file that can be submitted to Stampede or Lonestar using
qsub. (It detects which machine it is being executed on, so the same code should work on either cluster.) It can run both Bash commands on a single node and/or a parametric list of commands to be dispatched to multiple nodes.
How To Use It
The name of the job.
The allocation you want to charge the run to.
The queue to submit to, like 'normal' or 'largemem', etc.
Optional The number of jobs in a job list you want to give to each node. (Default is 12 for Lonestar, 16 for Stampede.)
number of nodes
Optional Specifies a certain number of nodes to use. You probably don't need this option, as the launcher calculates how many nodes you need based on the job list (or Bash command string) you submit. It sometimes comes in handy when writing pipelines.
Time allotment for job, format must be hh:mm:ss.
Optional Your email address if you want to receive an email from Lonestar when your job starts and ends.
Optional Filename of the launcher. (Default is
Optional String of module management commands.
Optional String of Bash commands to execute.
Optional Filename of list of commands to be distributed to nodes.
Optional Setting this flag outputs the name of the launcher to stdout.
Note that while the "-b" and "-j" options are both optional, using neither would pass no work to Lonestar, so you want to use at least one of them!
-m option to load and swap modules for the script. Use the exact same syntax to load or swap module as you would at the command line.
-m "module load luatools"
To run several module commands in the launcher, just separate the commands with a semicolon, as you would in the shell.
-m "module swap intel gcc; module load bedtools"
Or you can use the shortcut
ml command to perform several module actions in one command.
-m "ml -intel gcc bedtools"
Run multi-line shell commands
-b option lets you insert shell commands into the launcher script. For a short number of commands, separating them with a semicolon may be convenient. For longer commands you may want to write the commands on several lines. To insert a multi-line bash script into a
launcher_creator.py command, you can use a heredoc like so:
Create and submit a launcher in one line using
-s option outputs the name of the launcher to STDOUT. With command substitution you can immediately submit the new launcher file.
Distributing Shrimp to four nodes
Make a list of the Shrimp commands to run. You can do this in a text editor, algorithmically with a Bash loop, whatever. Let's pretend this text is saved as
Generate a launcher using
Submit the newly-created launcher.