On Quarry at IU, how do I use the serialjob script to submit jobs?
A serialjob script provides a convenient method for
submitting serial (single-processor) programs to the TORQUE
batching and queuing system (also called PBS). (If your program will
take more than 20 minutes to run, you need to use this system.) For
complete documentation, enter man serialjob on
Quarry.
On this page:
Accessing serialjob
serialjob should be on your path by default, and its
manual page (the best source of information about
serialjob) should be on your MANPATH by default.
serialjob options
When you submit a job with serialjob, you may specify how
long the job should be allowed to run. The default is to launch one
process for up to two hours on Quarry without claiming the name of the
queue. The general form of the command is:
Items in brackets are optional. Replace the example text above as follows:
- For
program, substitute the name of the program to submit. - For
program-options, substitute the command-line options you want to pass to the program. -
--is required to separate the program options from the other options. - You need to specify the
softkeyoption if you are using certain packages. For example, if you are usingmeme-4.1.0, the softkey is+meme-4.1.0. - For
wallclocklimit, use thehh:mm:ssformat to specify the number of hours the job should be allowed to run. - For
notify, you can choose to get email when the job begins (b), aborts (a), or ends (e), or to get no email (n). - For
jobname, specify a name for your job.
No queue option is needed for the serialjob command on
Quarry, because TORQUE automatically selects a queue based on the
hours you request to run the job. For details, see Quarry usage policies.
Using serialjob
For example, suppose you've written a program called speedster that takes options that specify speed and the name of the file to be processed. To run the program for up to two hours, you would enter:
serialjob speedster -speed super mydata.datTo run for up to 48 hours, you would enter:
serialjob speedster -speed super mydata.dat -- -wallclocklimit 48:00:00
To use the IMa program in the IM package, which has a softkey of
+IM-4-21-2008, and run for up to 10 hours, you would
enter:
If the program that you wish to run is not in your default path, be
sure to use the fully qualified path name of the program. When your
job runs, the current working directory of your program is the
directory from which you ran the serialjob command.
Limits of serialjob
- The
serialjobscript works only for serial applications. -
serialjobwill not work for programs that use a--(double-dash) argument, becauseserialjobuses that argument to separate options to your program from options to TORQUE. - If you need to quote arguments,
serialjobhandles only double quotes. It cannot provide the protection that is usually afforded by single quotes because the Bourne shell provides no mechanism for escaping characters within strings in single quotes. Thus,serialjobtreats single quotes as double quotes.
Last modified on April 01, 2009.







