ACCRE Home

Enabling Researcher-Driven Innovation and Exploration


Vanderbilt Home
Sample Job Run Examples
For more help on this site, read also our FAQ and our job scheduler policies.

Sample job #1 script

#!/bin/bash
#PBS -l nodes=1:ppn=1
#PBS -l walltime=00:02:00
#PBS -l mem=2000mb
#PBS -j oe
#PBS -o job.out

echo `date`
echo `hostname`
sleep 240
echo Finished!
echo `date`

Sample job #1 output written to job.out

Warning: no access to tty (Bad file descriptor).
Thus no job control in this shell.
Fri Apr 27 10:17:48 CDT 2007
vmp371
=>> PBS: job killed: walltime 145 exceeded limit 120
Terminated

In this example the standard output and standard error are written to job.out in the directory from which the job was submitted because no location was specified. While the job is running, the output file is created and modified in a temporary directory on the compute node, then copied to your area on the global filesystem when the job stops (see also the qcat command).

Notice too, the scheduler prematurely killed this job because it ran beyond the requested walltime.


Sample job #2 script

#!/bin/bash
#PBS -l nodes=1:ppn=1
#PBS -l walltime=00:02:00
#PBS -l mem=2000mb
#PBS -j oe
#PBS -o job.out

echo `date` > /home/user/out.txt
echo `hostname` >> /home/user/out.txt
sleep 240
echo Finished!
echo `date`

Sample job output #2 written to job.out

Warning: no access to tty (Bad file descriptor).
Thus no job control in this shell.
=>> PBS: job killed: walltime 145 exceeded limit 120
Terminated

Sample job #2 output written to /home/user/out.txt

Fri Apr 27 10:17:48 CDT 2007
vmp371

In this example the user wants some of the results sent to a different data file, /home/user/out.txt. Unlike job.out, this file is written to while the job is running (although heavy network or home filesystem load would affect how quickly).

Note the timestamps on the output files:

ls -l  /home/user/out.txt  job.out
-rw-r--r-- 1 user group 36 Apr 27 10:17 /home/user/out.txt
-rw------- 1 user group 148 Apr 27 10:20 job.out


Please continue to checking the status of submitted jobs.