MIT Information Systems    Longjobs -- Quick Reference
Athena Owl    For full Longjobs documentation, see: Overview | Job Scripts | Running Jobs | Checking Job Status

Basic Commands

longjob -operation simple interface to common operations
qstat -q list queues
qstat view all jobs in system
qstat -u username view jobs for username only
qusage check quota
testjob check job script without actually submitting it
qsub -a account -q queue script_name submit job directly
qdel jobid cancel job

Basic procedure

  1. Setup

    athena% cd ~/submit_dir     (if not under homedir, see Defaults and Caveats)
    athena% add longjobs

  2. Prepare job script

    This is a text file with the commands to run your job. The first line below tells the system to set the job's working directory to the directory from which you submit the job (otherwise defaults to /mit/username). For more information and specialized templates, see the Job Scripts page.

    cd $PBS_O_WORKDIR
    add foo
    crunch_data > my_data
    

    If you are new to the system or want to use a different application than usual, it's a good idea to test your script before submitting it to make sure you haven't overlooked something that might keep it from running as expected; see the Testing section for details on using the testjob program.

  3. Submit the job

    There are two ways to submit a job:

    • through an interface (prompts and extra information):
    • or directly from the command line:
    athena% longjob -submit
    athena% qsub -a account -q queue script_name
The system will notify you by email (and zephyr if you are available) when your job begins and ends, or if it is aborted for any reason. Standard output/error files will be saved to the directory from which you submit the job, as script_name.ojobid and script_name.ejobid. For examples and more options, see the Running Jobs and Checking Job Status pages.

Answers to Common Questions: http://web.mit.edu/longjobs/www/faq.html


Last modified: Thu, Jan 2 2003