Snippet:Job submission on Hypatia

From HUES Platform Wiki
Description Clusters work by submitting jobs to queues, which are then run when resources are available.

You can submit a job to the queue using variants the following script (saved to pbs_script). The script needs permissions set to allow execution (right click, properties, tick Owner X). To submit the job, run the following at the Hypatia command line: qsub pbs_script

Author(s) Ralph Evins
Language Bash
Tags Hypatia
Snippet code #!/bin/bash
  1. Job name
  2. PBS -N test_eplus
  3. Job will run for maximum of 30 min
  4. PBS -l walltime=00:30:00
  5. 1 nodes and 16 cores per node
  6. PBS -l nodes=1:ppn=16
  7. 4GB of RAM (total across all nodes)
  8. PBS -l vmem=4gb
  9. Request email at the start and end of the job
  10. PBS -m abe
  11. Email address to use
  12. PBS -M
  13. Set the working directory
  14. PBS -d /mnt/project/evr/eplus
  15. Select a queue (see qstat)
  16. PBS -q short
  17. Actual command(s) to run

runenergyplus House3 GBRLondonGatwick

Notes Multiple jobs may be submitted by using a script to call qsub (${myjob} goes in pbs_script):
  1. !/bin/bash

for i in {1..2} do

  qsub -v myjob=$i pbs_script
  sleep 3


If there are clashes with file access, you may need to copy files to a unique subfolder, e.g.:

  1. Make a directory for this job and copy files to it

mkdir /mnt/project/usr/eplus/$inidf cp /mnt/project/usr/eplus/$inidf.idf /mnt/project/usr/eplus/$inidf cp /mnt/project/usr/eplus/input_files/*.* /mnt/project/usr/eplus/$inidf

You may also need a cleanup script to move files to a common location and delete job details etc.

  1. !/bin/bash

inpath="/mnt/project/usr/eplus" for i in {1..55} do cp House3v5_$i/Output/*.* House3_v5 rm -rf House3v5_$i done rm test_eplus_batch.*