Indiana University

 

Indiana University Cyberinfrastructure News

A convenient script for submitting parallel jobs

To submit a batch job that runs a parallel program on Big Red, one usually creates a small text file that defines the job and then runs the llsubmit command to submit the job. You can submit jobs directly from the command line by using a script named paralleljob.

The script was designed to submit parallel jobs using a command that is very similar to that you would use to run a non-parallel (serial) version of the program. Indeed, if you are willing to accept all the defaults of paralleljob, you need only to prefix the usual command with paralleljob.

For example, suppose that a parallel program named bigcalc is on your path and takes an argument that is the name of a file to be processed. To submit a job with default values (4 processes for up to 2 hours in the MED queue of Big Red), you would run the command

paralleljob bigcalc mydata.dat

In response, you'll receive a message that indicates that your job has been submitted, and you will receive mail when your job finishes.

To launch more processes, use the -CPUS option. For example, to launch 32 processes, run the command

paralleljob bigcalc mydata.dat -CPUS 32

To request more time, use the -wallhours option. For example, to launch 32 processes for 5 days, run the command

paralleljob bigcalc mydata.dat -CPUS 32 -wallhours 120

To request that the job be sent to a queue other than the MED queue, use the -queue option. For example, suppose that you wish to use the FAST queue to be sure that everything is correct before running a larger job and wish to specify 16 processes in the FAST queue for two hours. (Both 16 processes and 2 hours are the limits on the queue). The command would be

paralleljob bigcalc smalldata.dat -CPUS 16 -queue FAST

More information about paralleljob on Big Red is available at http://rc.uits.indiana.edu/hpc/working_on_bigred/paralleljob.shtml and on its manual page (on Big Red, type "man paralleljob" and press return).