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 @ 9848

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

dev_r9759_HPC09_ESIWACE: update scripts and namelist_cfg_orca12_like

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