-
Notifications
You must be signed in to change notification settings - Fork 0
/
submit_nemo.pbs
executable file
·61 lines (54 loc) · 1.72 KB
/
submit_nemo.pbs
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
#!/bin/bash
# ---------------------------
#===============================================================
# CLUSTER BITS
#===============================================================
#PBS -N AMM60_SB
#PBS -l select=100
#PBS -l walltime=00:20:00
#PBS -A n01-Shelf
#PBS -j oe
#PBS -r n
# Make sure any symbolic links are resolved to absolute path
export PBS_O_WORKDIR=$(readlink -f $PBS_O_WORKDIR)
# Change to the direcotry that the job was submitted from
cd $PBS_O_WORKDIR
# Set the number of threads to 1
# This prevents any system libraries from automatically
# using threading.
export OMP_NUM_THREADS=1
module load stat
echo jelt: TMPDIR = $TMPDIR
export TMPDIR=$WDIR
echo jelt: TMPDIR = $TMPDIR
# Change to the directory that the job was submitted from
ulimit -s unlimited
#===============================================================
# SET SCRIPT VARIABLES
#===============================================================
echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
echo JOBDIR = $JOBDIR
echo RESTARTDIR = $RESTARTDIR
echo $WDIR
cd $WDIR
echo WORKDIR `pwd`
echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export NEMOproc=2000
export XIOSproc=80
#===============================================================
# LAUNCH JOB
#===============================================================
echo `date` : Launch Job
echo EXEC = `ls $EXEC`
#touch stdouterr
#aprun -N 32 -n 224 ./$EXEC >& stdouterr
#aprun -n 2000 ./$EXEC >& stdouterr
#aprun -b -N 5 -n $XIOSproc ./xios_server.exe >&stdouterr_xios : -n $NEMOproc -N 24 ./$EXEC >& stdouterr_nemo
aprun -b -n $NEMOproc -N 24 ./$EXEC : -N 5 -n $XIOSproc ./xios_server.exe >&stdouterr
if grep -q 'E R R O R' $WDIR/ocean.output* ; then
exit
else
$JOBDIR/finish_nemo.sh
$JOBDIR/run_nemo
exit
fi