-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmain.sge
More file actions
49 lines (45 loc) · 1.67 KB
/
Copy pathmain.sge
File metadata and controls
49 lines (45 loc) · 1.67 KB
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
#!/bin/bash
#$ -cwd -V
#
# This is a template submission script for MPI batch jobs on ness,
# called "mpibatch.sge". The batch system is Sun Grid Engine (SGE).
#
# ** You do not need to change the contents of this file. **
# ** You must simply ensure that it has the correct name. **
# ** You can delete lines beginning '#' EXCEPT the first two lines. **
#
# To submit an executable called "program" you should take a copy
# of this file and call the copy "program.sge", ie type:
#
# cp mpibatch.sge program.sge
#
# To run, for example, using 4 processes you should then type:
#
# qsub -pe mpi 4 program.sge
#
# The executable "program" will then be run on 4 processes, and all
# relevant output will be send to a file called "program.sge.oXXXXX"
# where XXXXX is the job identifier assigned by SGE. There will be
# three other files (extensions .e, .po and .pe) which you can ignore.
#
# Flags:
# -pe mpi n: This is an MPI job requiring n processes, so run
# it under the "mpi" Programming Environment (PE).
#
# Timing information from the unix "time" command will also be appended.
# Most important is the "real" time which is the elapsed wallclock time.
#
# In order for this to work properly you MUST have loaded the MPI
# environment prior to submission via: module load mpich
#
MPIEXE=`basename $REQUEST .sge`
echo "--------------------------------------------------"
echo "Running MPI program <$MPIEXE> on" $NSLOTS "processes"
echo "--------------------------------------------------"
echo
(time mpiexec -n $NSLOTS ./$MPIEXE) 2>&1
echo
echo "--------------------"
echo "Finished MPI program"
echo "--------------------"
echo