Versions Compared

Key

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

Both sample batch scripts for some popular software packages and sample batch scripts for general use on TRACE-HPC are available.
For more information on how to run a job on TRACE-HPC, what partitions are available, and how to submit a job, see the Running Jobs section of this user guide.

Sample batch scripts for popular software packages

Sample scripts for some popular software packages are available on TRACE-HPC in the directory /opt/packages/examples.  There is a subdirectory for each package, which includes the script along with input data that is required and typical output.
See the documentation for a particular package for more information on using it and how to test any sample scripts that may be available.

Sample batch scripts for common types of jobs

Sample TRACE-HPC batch scripts for common job types are given below.
Note that in each sample script:

  • The bash shell is used, indicated by the first line '!#/bin/bash'.  If you use a different shell some Unix commands will be different.
  • For username and groupname you must substitute your username and your appropriate Unix group.
  • The partition is either batch or your groupname

Sample batch script to submit a job in your group's batch queue

#!/bin/bash
#SBATCH -N 1
#SBATCH -p groupname
#SBATCH -t 5:00:00
#SBATCH --ntasks-per-node=128
# type 'man sbatch' for more information and options
# this job will ask for 1 full RM node (128 cores) for 5 hours
# this job would potentially charge 640 RM SUs
#echo commands to stdout
set -x
# move to working directory
# this job assumes:
# - all input data is stored in this directory
# - all output should be stored in this directory
# - please note that groupname should be replaced by your groupname
# - username should be replaced by your username
# - path-to-directory should be replaced by the path to your directory where the executable is
cd /ocean/projects/groupname/username/path-to-directory
# run a pre-compiled program which is already in your project space
./a.out