Example PBS Job Script

Audience: Faculty, Postdocs, Researchers, Staff and Students

This KB Article References: High Performance Computing
This Information is Intended for: Faculty, Postdocs, Researchers, Staff, Students
Last Updated: May 31, 2018

This is an example PBS bash script:

#PBS -l nodes=2:ppn=28,walltime=00:05:00
#PBS -N my_example_job
#PBS -q short

module load shared
module load mvapich2/gcc/64/2.2rc1

cd $HOME

mpirun ./myexec > /gpfs/home/<user>/output.txt

In this simple example, I want to run the executable called myexec. The output of myexec is captured in the file output.txt in the user’s home directory – this is decided by the program being run, which takes the first command line argument as the file to write to. The bash comments that begin as "#PBS" are PBS directives giving vital information to the batch scheduler.

The command

#PBS -l nodes=2:ppn=28,walltime=00:05:00

tells the batch scheduler that you are requesting 2 nodes (currently some SeaWulf nodes have 28 cores while others have 24), that you want to execute 28 MPI tasks on each node for 5 minutes. If your job exceeds the specified walltime (which is 5 minutes in this case), then your job will be killed.

The directive

#PBS -N my_example_job

gives the name "my_example_job" to your job.

The directive

#PBS -q short

indicates to the batch scheduler that you want to use the short queue.

You can see a list of other queues on SeaWulf.

Additional Information

There are no additional resources available for this article.

Getting Help

The Division of Information Technology provides support on all of our services. If you require assistance please submit a support ticket through the IT Service Management system.

Submit A Ticket

For More Information Contact

IACS Support System