New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
submit_bench in NEMO/branches/2018/dev_r9759_HPC09_ESIWACE/tests/BENCH/EXPREF – NEMO

source: NEMO/branches/2018/dev_r9759_HPC09_ESIWACE/tests/BENCH/EXPREF/submit_bench @ 9856

Last change on this file since 9856 was 9851, checked in by smasson, 6 years ago

dev_r9759_HPC09_ESIWACE: update scripts for irene

  • Property svn:executable set to *
File size: 4.2 KB
Line 
1#!/bin/bash
2
3#  BENCH launching scripts for beaufix, Meteo-France
4#                          and curie, TGCC
5#  To be modified for other machines
6#
7set -u
8set -vx
9#
10cores=$1
11ncore_node=$2
12resolution=$3
13machine=$( hostname | sed -e "s/[0-9]*//g" )
14#
15# number of processes for each executable
16    nproc_exe1=$( echo $cores | bc )
17  (( nproc = $nproc_exe1 ))
18(( nnode = $nproc / $ncore_node ))
19[ $nnode -lt 1 ] && nnode=1
20
21nproc5=$( printf "%05d\n" ${nproc_exe1} )
22
23######################################################################
24### beaufixlogin
25######################################################################
26
27if [ "$machine" == "beaufixlogin" ]
28then
29   
30cat > Log/run_bench << EOF
31#!/bin/bash
32#SBATCH --time=00:1:00
33#SBATCH -p  normal64         # partition/queue
34#SBATCH --job-name=bench      # job name
35#SBATCH -N $nnode            # number of nodes
36#SBATCH -n $nproc            # number of procs
37#SBATCH -o /scratch/work/cglo315/ESIWACE/dev_r9759_HPC09_ESIWACE/tests/LBENCH_RN/EXP00/Log/job.out%j
38#SBATCH -e /scratch/work/cglo315/ESIWACE/dev_r9759_HPC09_ESIWACE/tests/LBENCH_RN/EXP00/Log/job.out%j
39#SBATCH --exclusive
40
41module unload intelmpi intel grib_api
42module load intel/16.1.150 intelmpi/5.1.2.150
43
44itac=0
45xpmpi=0
46
47if [ \$xpmpi == 1 ]; then
48  module load bullxde
49  module load xPMPI/1.1_intelmpi
50fi
51
52[ \$itac == 1 ] && module load itac/2017.2.028
53
54set -vx
55
56cd \${TMPDIR}
57cp /scratch/work/cglo315/ESIWACE/dev_r9759_HPC09_ESIWACE/tests/LBENCH_RN/EXP00/* .
58
59# Best decompositions BENCH-1
60jpni=${cores/\**/}
61jpnj=${cores/?*\*/}
62
63sed -e "s/jpni *=.*/jpni = \${jpni}/" -e "s/jpnj *=.*/jpnj = \${jpnj}/" namelist_cfg_orca${resolution}_like > namelist_cfg
64
65export OMP_NUM_THREADS=1
66ulimit -s unlimited
67#
68if [ \$itac == 1 ]; then
69  source /opt/softs/intel/2017/update_1/itac_latest/bin/itacvars.sh
70  time mpirun -ordered-output -prepend-rank -trace -np $nproc_exe1 ./nemo > jobout 2>joberr
71else
72  time mpirun -ordered-output -prepend-rank -np $nproc_exe1 ./nemo > jobout_${resolution}_${nproc5}
73fi
74/opt/softs/bin/ja
75
76if [ \$xpmpi == 1 ]; then
77  module unload xPMPI/1.1_intelmpi
78  module unload bullxde
79fi
80#
81EOF
82
83
84### 4. Execute the model
85
86    echo 'Submitting the job to queue using sbatch'
87    sbatch Log/run_bench
88    squeue -u cglo315
89
90echo 'is executed or submitted to queue.'
91
92
93fi
94
95######################################################################
96### curie or irene
97######################################################################
98
99if [[ ( "$machine" == "curie" ) || ( "$machine" == "irene" ) ]]
100then
101   
102    case ${resolution} in
103   "1")
104       if [ $nproc_exe1 -lt 50 ]
105       then
106      timejob=3600
107       elif [ $nproc_exe1 -lt 100 ]
108       then
109      timejob=1800
110       elif [ $nproc_exe1 -lt 200 ]
111       then
112      timejob=900
113       else
114      timejob=600
115       fi
116       ;;
117   "025")
118       if [ $nproc_exe1 -lt 50 ]
119       then
120      timejob=15000
121       elif [ $nproc_exe1 -lt 100 ]
122       then
123      timejob=7000
124       elif [ $nproc_exe1 -lt 200 ]
125       then
126      timejob=3600
127       elif [ $nproc_exe1 -lt 400 ]
128       then
129      timejob=2000
130       elif [ $nproc_exe1 -lt 800 ]
131       then
132      timejob=1000
133       else
134      timejob=600
135       fi
136       ;;
137   "12")
138       if [ $nproc_exe1 -lt 200 ]
139       then
140      timejob=30000
141       elif [ $nproc_exe1 -lt 400 ]
142       then
143      timejob=15000
144       elif [ $nproc_exe1 -lt 800 ]
145       then
146      timejob=8000
147       elif [ $nproc_exe1 -lt 1600 ]
148       then
149      timejob=5000
150       elif [ $nproc_exe1 -lt 3200 ]
151       then
152      timejob=2500
153       else
154      timejob=1200
155       fi
156   ;;
157    esac
158
159    [ "$machine" == "curie" ] && queuename=standard || queuename=skylake
160   
161    jobname=$HOME/binrun/jobbench
162    cat > $jobname << EOF
163#!/bin/bash
164#MSUB -r bench${nproc5}
165#MSUB -n ${nproc_exe1}
166#MSUB -T $timejob
167#MSUB -e bench_${resolution}_${nproc5}_%I.eo
168#MSUB -o bench_${resolution}_${nproc5}_%I.eo
169#MSUB -j oe
170#MSUB -x
171#MSUB -q ${queuename}
172#MSUB -A gen6895
173#==========================================
174set -u
175#
176
177cd \${BRIDGE_MSUB_PWD}/..
178
179rsync -av --exclude="*eo" EXPREF/ EXP_${resolution}_${nproc5}/
180rsync -av EXP00/nemo EXP_${resolution}_${nproc5}/nemo
181cd EXP_${resolution}_${nproc5}/
182
183jpni=${cores/\**/}
184jpnj=${cores/?*\*/}
185
186sed -e "s/jpni *=.*/jpni = \${jpni}/" -e "s/jpnj *=.*/jpnj = \${jpnj}/" namelist_cfg_orca${resolution}_like > namelist_cfg
187
188time ccc_mprun -n \${BRIDGE_MSUB_NPROC} ./nemo > jobout_${resolution}_${nproc5}
189
190EOF
191
192    ccc_msub $jobname
193
194fi
Note: See TracBrowser for help on using the repository browser.