schooner_resume_LST.sh 7.78 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140
#!/bin/bash
#
# schooner_resume_LST.sh
#
# This example batch script is intended for running pure MPI
# parallel programs only (not hybrid MPI/OpenMP or hybrid
# MPI/pthreads).
#
# last modified by OSCER 2016-06-08 10:40
#
# Also, please note that lines that begin with pound-SBATCH (#SBATCH)
# are batch scheduler directives, so they are absolutely crucial.
# DON'T REMOVE THE pound sign (#) from before the SBATCH!!!!
#
# Everywhere throughout this batch script file:
# * CHANGE yourusername to your username;
# * CHANGE youremailaddress@yourinstitution.edu to your e-mail address;
# * CHANGE directory_to_run_in to the directory you want to run in;
# * CHANGE jobname to your preferred name for this batch job.
#
# NOTE: If you create any file of human-readable text on a Windows PC,
# you *MUST* perform the following command on it:
#
# dos2unix filename
#
# where you replace "filename" with the name of the file; for example:
#
#   dos2unix /home/yourusername/input_directory/input_filename.txt
#
# This is because virtually all text editors in Windows embed hidden
# special characters in text files (for example, font information),
# and these hidden special characters cause Unix/Linux programs to
# choke.
#
# To submit a batch job:
#
#   sbatch jobname.sh
#
# Note that there is no "<" sign in the above command.
#
#
# To see what batch jobs you personally have in the scheduler:
#
#   squeue -u yourusername
#
# To see what batch jobs everyone has in your partitions:
#
#   squeue
#
# To kill a batch job (replace JOBID with the batch job ID number):
#
#   scancel JOBID
#
# but again replacing JOBID with the batch job identifer.
#
###
#
# The SBATCH directive below says the name of the partition to be used.
# In most cases, you should use the queue named normal.
#
#SBATCH --partition=normal
#
# The SBATCH directive below says to request exclusive access on the
# participating compute nodes, so that other batch jobs (for example,
# those submitted by other users) don't run on the same compute nodes
# as this batch job, and therefore don't interfere with it.
#
#SBATCH --exclusive
#
# Use 40 MPI processes at 20 MPI processes per node, which is to
# say 2 nodes in the case of the normal partition.
#
# Please use the following pattern for nodes in the normal partition:
# -- For ntasks <= 20, please use ntasks-per-node equal to n unless
#    you have a very good reason to do otherwise.
# -- For ntasks >= 20, please use ntasks-per-node equal to 20 unless
#    you have a very good reason to do otherwise.
#
# This is because each compute node has 2 chips and each chip
# has 10 cores, for a total of 20 cores per node. We recommend
# using the same number of MPI processes per node as cores,
# unless you've benchmarked your code's performance and found
# that you take fewer node hours by using fewer than 20 per node.
#
# NOTE: You are encouraged to change these to numbers that are
# appropriate for you.
#
#SBATCH --ntasks=20
#SBATCH --ntasks-per-node=10
#
# STDOUT is the output that normally would go to the terminal screen.
# STDERR is like STDOUT, except that it contains error messages instead
# of regular output.
#
# The SBATCH directive below says, send STDOUT and STDERR to the filenames
# listed below.
#
# Note that, in these filenames, %J will be replaced by the batch job ID
# number
#
# Everywhere throughout this batch script file:
# * CHANGE yourusername to your username;
# * CHANGE youremailaddress@yourinstitution.edu to your e-mail address;
# * CHANGE directory_to_run_in to the directory you want to run in;
# * CHANGE jobname to your preferred name for this batch job.
#
#SBATCH --output=/scratch/kasperone1/lbm/lbm2/lbm_scaff10/lbm.git/LST_resume_%J_stdout.txt
#SBATCH --error=/scratch/kasperone1/lbm/lbm2/lbm_scaff10/lbm.git/LST_resume_%J_stderr.txt
#
# The SBATCH directive below says to run for up to 12 hours (and zero
# minutes and zero seconds) of "wall clock" time (time experienced in
# real life).
# Currently, the maximum allowable wall clock time per batch job is
# 48:00 hours.
# Acceptable time formats include "minutes", "minutes:seconds",
# "hours:minutes:seconds", "days-hours", "days-hours:minutes" and
# "days-hours:minutes:seconds".
#
#SBATCH --time=06:00:00
#
# The SBATCH directive below says the name of the batch job, as it
# will appear in the batch partition when you do an squeue command.
#
# Everywhere throughout this batch script file:
# * CHANGE yourusername to your username;
# * CHANGE youremailaddress@yourinstitution.edu to your e-mail address;
# * CHANGE directory_to_run_in to the directory you want to run in;
# * CHANGE jobname to your preferred name for this batch job.
#
#SBATCH --job-name=LST_resume
#
# The SBATCH directive below says the e-mail address to send
# notifications to, which should be changed to your e-mail address.
#
# Everywhere throughout this batch script file:
# * CHANGE yourusername to your username;
# * CHANGE youremailaddress@yourinstitution.edu to your e-mail address;
# * CHANGE directory_to_run_in to the directory you want to run in;
# * CHANGE jobname to your preferred name for this batch job.
#
141
#SBATCH --mail-user=ms2286@njit.edu
142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212
#
# The SBATCH directive below says to e-mail a notification when the
# batch job either completes or fails.
#
# If you only want e-mails when when a batch job fails, then delete
# the SBATCH directive below.
#
#SBATCH --mail-type=ALL
#
# Change to the directory that you want to run in.
#
# Everywhere throughout this batch script file:
# * CHANGE yourusername to your username;
# * CHANGE youremailaddress@yourinstitution.edu to your e-mail address;
# * CHANGE directory_to_run_in to the directory you want to run in;
# * CHANGE jobname to your preferred name for this batch job.
#
#SBATCH --workdir=/scratch/kasperone1/lbm/lbm2/lbm_scaff10/lbm.git
#

#################################################

# If you like, you may uncomment the following line
# to display your working directory in your output,
# to make sure that you're in the correct directory.
# pwd
pwd
# If your job requires any "module load" commands,
# then please insert them here, without a pound sign (#).
# Typically, if your program required a
# module to compile it, then include the same module
# here to run your program. In particular, if you do not
# already load an application module that includes an mpi
# toolchain, then explicitly load an mpi toolchain here.
# For example:
# module load mpi/intel
#module load pgi/16.1
module load intel/2016a
# Run the executable, redirecting input from the given file.
# The date commands and the time command help track runtime
# and performance.
#
# NOTE: The line with a "<" sign, immediately before the
# second date command, redirects standard input
# (typically a user typing at the keyboard) from a file of
# human readable text.
# If your program uses no input, or if for all input your program
# explicitly opens its files inside the program (for example, via
# an OPEN statement in Fortran or an fopen command in C), then you
# don't need that line, so DELETE IT.
#
# Everywhere throughout this batch script file:
# * CHANGE yourusername to your username;
# * CHANGE youremailaddress@yourinstitution.edu to your e-mail address;
# * CHANGE directory_to_run_in to the directory you want to run in;
# * CHANGE jobname to your preferred name for this batch job.
#
# Here, also CHANGE executable_directory to the directory where your
# executable resides, CHANGE executable_filename to the name of the
# executable file, CHANGE input_directory to the directory where your
# standard input file resides, and CHANGE input_filename.txt to the
# name of your standard input file (that is, the file that you want
# to use for standard input, instead of a user typing live at the
# keyboard, which isn't possible for a batch job).

date
time \
  mpirun \
  /scratch/kasperone1/lbm/lbm2/lbm_scaff10/lbm.git/lbm \
      < /scratch/kasperone1/lbm/lbm2/lbm_scaff10/lbm.git/input.txt \
  && date