Running an example job

Example PBS jobs for many of our programs can be found in /usr/local/apps/example_jobs. This page describes how to run one of those jobs in particular, but could be applied to any of them.

To get a list of all example jobs available on a system, run:
ls /usr/local/apps/example_jobs

If you find that an example job you need is not available, please contact the MCSR staff. We are always happy to help users get their projects going.

Run the command below to copy the example Python job to your home directory. Substitute the name of the system you are on for “maple.”
cp -r /usr/local/apps/example_jobs/python_maple_example/ ~

Change into the directory that you just copied over:
cd python_maple_example/

Have a quick look at the PBS script that you’re about to use:
cat prime.pbs

Then submit the PBS script:
qsub prime.pbs

You should receive a job ID number from the qsub command that will allow you to check the status of your job:
qstat your_number_goes_here

If you need more information about your job, use the -f option:
qstat -f your_number_goes_here

When qstat returns “Unknown Job Id,” you know that your job has finished. Run:
to look for output files. Output filenames generally look like job_name.ojob_id. For instance, the name of this job is (the name is defined in the PBS script). When I ran this example, my  job ID was 3220, so my output filename was The output file is a simple text file, so cat can be used to view it:

Don’t forget to substitute your job ID.

Some jobs also produce an error file, with an e instead of an o. This will contain any errors produced by the job. Some jobs (like the Python job above) combine standard output and error output into one file.