-
Notifications
You must be signed in to change notification settings - Fork 0
/
comp.sbatch
240 lines (233 loc) · 8.06 KB
/
comp.sbatch
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
141
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
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
#!/bin/bash
#
##################################################################
#
# GENERAL INFORMATION ABOUT THE SLURM BATCH SYSTEM ON SCHOONER
#
# greetings.sbatch
#
# last modified by Henry Neeman 2017-01-17
#
# PLEASE DON'T REMOVE THESE COMMENTS EVER!!!
# They will always be important and may save you lots of grief.
#
# 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 vbvg2008 to your username;
# * CHANGE [email protected] to your e-mail address.
#
# 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/vbvg2008/SIPE/Greetings/C/greetings_input.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 greetings.sbatch
#
# Note that there is no "<" sign in the above command.
#
# To see what batch jobs you personally have in the scheduler:
#
# squeue -u vbvg2008
#
# 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.
#
# Below is the output of squeue.
#
# JOBID PARTITION NAME USER ST TIME NODES NODELIST(REASON)
#505994 normal HERV_Gag nsloat PD 0:00 16 (Resources)
#506260 normal wrf_No3 jdduda PD 0:00 10 (Resources)
#507599 normal may29-qn dphoenix PD 0:00 22 (Resources)
#507621 normal wrf-cbmz dphoenix PD 0:00 30 (Resources)
#511078 normal glb6x4-o scrowell PD 0:00 1 (Resources)
#511079 normal glb6x4-o scrowell PD 0:00 1 (Resources)
#511080 normal glb6x4-o scrowell PD 0:00 1 (Resources)
#512000 normal RUN5 pattar PD 0:00 1 (Resources)
#512031 normal RUN10 pattar PD 0:00 1 (Resources)
#513543 normal 48_prime soumya PD 0:00 2 (Resources)
#513743 normal pigz lreames PD 0:00 1 (Resources)
#514814 normal Fa2Tre1 jtcooper PD 0:00 1 (Resources)
#515761 normal ctrl jlabriol PD 0:00 24 (Resources)
#515762 normal shape jlabriol PD 0:00 24 (Resources)
#515764 normal shapeXL jlabriol PD 0:00 24 (Resources)
#516026 normal maxvg_di yinmeg PD 0:00 1 (Resources)
#529957 normal f2 gongfeng PD 0:00 2 (Resources)
#529962 normal f3 gongfeng PD 0:00 2 (Resources)
#531099 ieg sbatch_s tianrm PD 0:00 1 (ReqNodeNotAvail...)
#531108 ieg sbatch_s tianrm PD 0:00 10 (ReqNodeNotAvail...)
#531123 ieg sbatch_s tianrm PD 0:00 1 (ReqNodeNotAvail...)
#...
#
# Note that the ST column has the status of each batch job.
#
# Specifically, PD means PENDING (sitting in the batch queue
# waiting for that batch job's turn to begin running), R means RUN
# and CG means COMPLETING (the executable has finished running, so
# the SLURM batch system is cleaning up and preparing to shut down
# the batch job.
#
##################################################################
#
# SLURM BATCH DIRECTIVES
#
# The SBATCH directive below says the name of the partition (batch
# queue) to be used. In most cases, you should use the queue named
# normal. (For some instances of this exercise, we've created a
# special queue named sipe, but that's not currently active.)
#
#SBATCH --partition=normal # sipe
#
# The SBATCH directive below says to allow only this job to run on
# this job's compute node(s), so no other jobs, even by this user,
# can run on those nodes at the same time. DON'T CHANGE THIS.
#
#SBATCH --exclusive
#
# The SBATCH directive below says to use 40 CPU cores of one CPU chip
# on one compute node, meaning that this batch jobs is non-parallel
# (serial).
#
#SBATCH --ntasks=128
#
# The SBATCH directive below says to use 20 CPU cores (on two CPU
# chips) on each of the job's compute nodes, meaning that this batch
# jobs is parallel.
#
#SBATCH --ntasks-per-node=20
#
# The SBATCH directive below says, the working directory for
# this batch job will be the directory listed after the
# equals sign.
#
# This accomplishes the equivalent of doing a cd ("change
# directory") command into that directory, except that, by
# using the directive below, then the SLURM batch system
# will know the working directory, which can be helpful in
# properly managing your batch job.
#
#SBATCH --workdir=/home/vbvg2008/HPC/MatrixCondensation
#
# Standard output (stdout) is the output that normally would go to
# the terminal screen.
#
# Standard error (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 vbvg2008 to your username;
# * CHANGE [email protected] to your e-mail address.
#
#SBATCH --output=/home/vbvg2008/HPC/MatrixCondensation/output/%J_stdout.txt
#SBATCH --error=/home/vbvg2008/HPC/MatrixCondensation/output/%J_stderr.txt
#
# The SBATCH directive below says to run for up to 30 minutes
# (that is, zero hours plus 30 minutes plus zero seconds) of
# "wall clock" time (time experienced in real life).
#
# Currently, the maximum allowable wall clock time per batch job
# is 48 hours (48:00:00).
#
# Acceptable time formats include:
# minutes
# example: 30 means 30 minutes
# minutes:seconds
# example: 24:30 means 24 minutes plus 30 seconds
# hours:minutes:seconds
# example: 47:30:22 means 47 hours plus 30 minutes plus 22 seconds
# days-hours
# example: 1-12 means 1 day plus 12 hours
# days-hours:minutes
# example: 1-12:30 means 1 day plus 12 hours plus 30 minutes
# days-hours:minutes:seconds
# example: 1-12:30:18 means 1 day plus 12 hours plus 30 minutes
# plus 18 seconds
#
#SBATCH --time=01:00:00
#
# The SBATCH directive below says the name of the batch job, as it
# will appear in the batch partition listing when you do an squeue
# command.
#
# Everywhere throughout this batch script file:
# * CHANGE vbvg2008 to your username;
# * CHANGE [email protected] to your e-mail address.
#
#SBATCH --job-name=ge_p
#
# 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 vbvg2008 to your username;
# * CHANGE [email protected] to your e-mail address.
#
#SBATCH [email protected]
#
# 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 in the
# SBATCH directive below, change ALL to FAIL.
#
#SBATCH --mail-type=FAIL
#
# Set upper memory limit per node, in MB
#SBATCH --mem 512
#
##################################################################
#
# UNIX SHELL COMMANDS
# Output the working directory, as a sanity check.
echo "Working directory:"
pwd
echo ""
# Set the runtime environment to match the compile environment.
module load OpenMPI
# 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.
#
# Everywhere throughout this batch script file:
# * CHANGE vbvg2008 to your username;
# * CHANGE [email protected] to your e-mail address.
N_PROC=128
BIN_NAME=ge_p
echo $BIN_NAME
for x in 1000 2000 3000 4000 5000 6000 7000 8000; do
for i in 1 2 3 4 5; do
echo "Input size $x test:$i"
mpirun -n $N_PROC $BIN_NAME $x input/m${x}x${x}.bin
done
done