-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsbatch_wrf.sh
More file actions
78 lines (60 loc) · 1.88 KB
/
sbatch_wrf.sh
File metadata and controls
78 lines (60 loc) · 1.88 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
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
#!/bin/bash
set -xv
#-------------------------------
# setting options for SLURM
#-------------------------------
# source: ecmwf user support
#SBATCH --job-name=wrfda # Job name
# Assigns the specified name to the request
# Specifies the name and location of STDERR where %N is the
# node where the job runs and %j the job-id. The file will be
# written in the workdir directory if it is a relative path.
# If not specified, STDERR will be written to the output file
# defined above, or otherwise to slurm-%j.out in the workdir.
# it is also used for the log output
##SBATCH --nodes=4
##SBATCH --ntasks-per-node=8
#SBATCH --ntasks=6
#SBATCH --cpus-per-task=8
# Define, how many nodes you need. Here, we ask for 1 node.
# in theory you can ask for more but it is not recommended
# note that slurm is configured that it can run only one job on a node
# and each node has 8 CPU
#SBATCH --distribution=cyclic
#SBATCH --partition normal
# Define the partition on which the job shall run.
# there is only one partition, but this could change (e.g. priority, normal)
#SBATCH --mail-type=END,FAIL # Mail events (NONE, BEGIN, END, FAIL, ALL)
#SBATCH --mail-user=stephen.tjemkes@hotmail.com # Where to send mail (does not work)
#SBATCH --time=01:59:00 # Time limit hrs:min:sec
#-------------------------------
# setting environment variables
#-------------------------------
while [[ "$1" != "" ]]; do
case "$1" in
-s | --skeb )
shift
skeb=$1
;;
-p| --physpack )
shift
physpack=$1
;;
-w | --workdir )
shift
WRKDIR=$1
;;
-v | --verbose )
shift
verbose=$1
;;
esac
shift
done
export PATH=$PATH:.
# The next is to capture the options when the
# script is activated
. /home/stephen/.muprc
cd ${WRKDIR}
time mpiexec.hydra -bootstrap slurm -n 8 ./real.exe
time mpiexec.hydra -bootstrap slurm -n 8 ./wrf.exe