Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Be notified when the job starts, use the -m option eg be sent an email if the job is aborted, when it begins, and when it ends: #PBS -m abe

  • Give the job a name: To find your job in a long list give it a meaning name with the -N option: #PBS -N MyJob01

  • Merge the error file into the standard output file: #PBS -j oe

  • Overriding the email address: If you want to send the job notification email to another address, use the -M option, eg #PBS -M bob@bob.com

Another example

From the Introduction to the Unix Shell for HPC users course lets run the do-stats.sh script as a job.

First, change to the folder:

Code Block
cd ~/workshop/2024-2/shell-lesson-data/north-pacific-gyre

Code Block
#!/bin/bash -l
#PBS -N GooStatsRun01
#PBS -l select=1:ncpus=1:mem=2gb
#PBS -l walltime=00:30:00
#PBS -m abe
cd $PBS_O_WORKDIR

# Calculate stats for data files.
for datafile in NENE*A.txt NENE*B.txt
do
    echo $datafile
    bash goostats.sh $datafile stats-$datafile
done

Call this do-goostats.pbs

Now submit to the scheduler:

...