-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlaunch
executable file
·94 lines (74 loc) · 3.16 KB
/
launch
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
#!/bin/bash
number_of_nodes=1
number_of_tasks=8
sourdir=/scratch/05518/oasselin/storm/bt_fn21h610_wn20h60/source/
datadir=/scratch/05518/oasselin/storm/bt_fn21h610_wn20h60/output/
mkdir -p $sourdir
mkdir -p $datadir
cd $sourdir
cat > EXEC_STEP << EXEC
#!/bin/sh
#----------------------------------------------------
# Sample Slurm job script
# for TACC Stampede2 KNL nodes
#
# *** MPI Job on Normal Queue ***
#
# Last revised: 20 Oct 2017
#
# Notes:
#
# -- Launch this script by executing
# "sbatch knl.mpi.slurm" on Stampede2 login node.
#
# -- Use ibrun to launch MPI codes on TACC systems.
# Do not use mpirun or mpiexec.
#
# -- Max recommended MPI tasks per KNL node: 64-68
# (start small, increase gradually).
#
# -- If you're running out of memory, try running
# fewer tasks per node to give each task more memory.
#
#----------------------------------------------------
#SBATCH -J test_eady # Job name
#SBATCH -o $HOME/monitor/test_eady.o%j # Name of stdout output file
#SBATCH -e $HOME/monitor/test_eady.e%j # Name of stderr error file
##SBATCH -p normal # Queue (partition) name
#SBATCH -p development # Queue (partition) name
#SBATCH -N $number_of_nodes # Total # of nodes
#SBATCH -n $number_of_tasks # Total # of mpi tasks
#SBATCH -t 01:00:00 # Run time (hh:mm:ss)
#SBATCH [email protected]
##SBATCH --mail-type=all # Send email at begin and end of job
#SBATCH -A TG-OCE180004 # Allocation name (req'd if you have more than 1)
################ EXECUTE #######################
cd $datadir
cp $sourdir/exec_qg $datadir
ibrun ./exec_qg
EXEC
#
#--- Compile ---#
#
cat > COMPILE_STEP << COMPILE
#!/bin/bash
cd $sourdir
cp $HOME/eady/*.f90 .
PARA=parameters.f90
MAIN=main_waqg.f90
FFT=fft.f90
MPI=mpi.f90
INIT=init.f90
DERI=derivatives.f90
FILE=files.f90
DIAG=diagnostics.f90
ELLI=elliptic.f90
SPEC=special.f90
#Compile with MPIf90
mpif90 -mkl parameters.f90 mpi.f90 fft.f90 files.f90 derivatives.f90 elliptic.f90 special.f90 diagnostics.f90 init.f90 main_waqg.f90 -o exec_qg
COMPILE
chmod 755 COMPILE_STEP
./COMPILE_STEP
##chmod 755 EXEC_STEP
sbatch EXEC_STEP
##./EXEC_STEP