Versions Compared

Key

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

...

#!/bin/bash

#PBS -c s
#PBS -j oeo $PBS_O_WORKDIR/$PBS_JOBNAME.o$PBS_O_JOBID
#PBS -m aej oe
#PBS -N ML_analysis
#PBS -l pmem=5gb
#PBS -l walltime=500:00:00
#PBS -m ae
#PBS -M your.name@jcu.edu.au

ncpu=`wc -l $PBS_NODEFILE | awk '{print $1}'`
echo "------------------------------------------------------"
echo " This job is allocated "$ncpu" CPU cores on "
cat $PBS_NODEFILE | uniq
echo "------------------------------------------------------"
echo "PBS: Submitted to $PBS_QUEUE@$PBS_O_HOST"
echo "PBS: Working directory is $PBS_O_WORKDIR"
echo "PBS: Job identifier is $PBS_JOBID"
echo "PBS: Job name is $PBS_JOBNAME"
echo "------------------------------------------------------"
 
cd $PBS_O_WORKDIR
source /etc/profile.d/modules.sh
module load paup
paup -n ML_analysis.nex

...

  1. The very first line of the script file is the Shebang line and must be on the first line.
  2. The second section contains the PBS directives. For more information on PBS directives please see the HPRC PBS script files page.The fourth section containf the commands
  3. The third section outputs information about the job, and is only included as an example of what can be done.
  4. PBS Directive 
    #PBS -c sCheckpointing is to be done on a job at pbs_mom shutdown.
    #PBS -j oe
    Merge standard output and standard error streams into the named file.
    #PBS -N ML_analysis 
    #PBS -l pmem=5gb
     
    #PBS -l walltime=500:00:00
     
    #PBS -m ae
    #PBS -M your.name@jcu.edu.au

     
     

     

  5. The third section outputs information about the job, and is only included as an example of what can be done.
  6. The fourth section containf the commands that are actually run in the job. In this case we are using a bash shell.

...

No Format
-bash-4.1$ qstat 148122.jobmgr.hpc.jcu.edu.au
Job ID                    Name             User            Time Use S Queue
------------------------- ---------------- --------------- -------- - -----
148122.jobmgr              ML_analysis      jcxxxxx               0 R normal
Expand
titleMore qstat examples

More qstat examples

You can display all of the jobs you are running

No Format
-bash-4.1$ qstat -u jcxxxxx -1n
jobmgr.hpc.jcu.edu.au:
                                                                                  Req'd    Req'd       Elap
Job ID                  Username    Queue    Jobname          SessID  NDS   TSK   Memory   Time    S   Time
----------------------- ----------- -------- ---------------- ------ ----- ------ ------ --------- - ---------
148185.jobmgr.hpc.jcu.  jcxxxxx     normal   ML_analysis           0     1      1    5gb 500:00:00 R  00:00:17   n026/19

 

Deleting a job - qdel

If you need to your job you can use the qdel command

...