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

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

dev_r9759_HPC09_ESIWACE: update namelists and jobscripts

  • Property svn:executable set to *
File size: 3.2 KB
Line 
1#!/bin/bash
2
3#  BENCH launching scripts for beaufix, Meteo-France
4#  To be modified for other machines
5#
6set -u
7set -vx
8#
9cores=$1
10ncore_node=$2
11resolution=$3
12machine=$( hostname | sed -e "s/[0-9]*//g" )
13######################################################################
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
23if [ "$machine" == "beaufix" ]
24then
25   
26cat > Log/run_bench << EOF
27#!/bin/bash
28#SBATCH --time=00:1:00
29#SBATCH -p  normal64         # partition/queue
30#SBATCH --job-name=bench      # job name
31#SBATCH -N $nnode            # number of nodes
32#SBATCH -n $nproc            # number of procs
33#SBATCH -o /scratch/work/cglo315/ESIWACE/dev_r9759_HPC09_ESIWACE/tests/LBENCH_RN/EXP00/Log/job.out%j
34#SBATCH -e /scratch/work/cglo315/ESIWACE/dev_r9759_HPC09_ESIWACE/tests/LBENCH_RN/EXP00/Log/job.out%j
35#SBATCH --exclusive
36
37module unload intelmpi intel grib_api
38module load intel/16.1.150 intelmpi/5.1.2.150
39
40itac=0
41xpmpi=0
42
43if [ \$xpmpi == 1 ]; then
44  module load bullxde
45  module load xPMPI/1.1_intelmpi
46fi
47
48[ \$itac == 1 ] && module load itac/2017.2.028
49
50set -vx
51
52cd \${TMPDIR}
53cp /scratch/work/cglo315/ESIWACE/dev_r9759_HPC09_ESIWACE/tests/LBENCH_RN/EXP00/* .
54
55# Best decompositions BENCH-1
56jpni=${cores/\**/}
57jpni=${cores/?*\*/}
58
59sed -e "s/jpni *=.*/jpni = \${jpni}/" -e "s/jpnj *=.*/jpnj = \${jpnj}/" namelist_cfg_orca${resolution}_like > namelist_cfg
60
61export OMP_NUM_THREADS=1
62ulimit -s unlimited
63#
64if [ \$itac == 1 ]; then
65  source /opt/softs/intel/2017/update_1/itac_latest/bin/itacvars.sh
66  time mpirun -ordered-output -prepend-rank -trace -np $nproc_exe1 ./nemo > jobout 2>joberr
67else
68  time mpirun -ordered-output -prepend-rank -np $nproc_exe1 ./nemo > jobout_${resolution}_${nproc5}
69fi
70/opt/softs/bin/ja
71
72if [ \$xpmpi == 1 ]; then
73  module unload xPMPI/1.1_intelmpi
74  module unload bullxde
75fi
76#
77EOF
78
79
80######################################################################
81###
82### 4. Execute the model
83
84    echo 'Submitting the job to queue using sbatch'
85    sbatch Log/run_bench
86    squeue -u cglo315
87
88echo 'is executed or submitted to queue.'
89
90######################################################################
91
92fi
93
94if [ "$machine" == "curie" ]
95then
96
97    if [ $nproc_exe1 -lt 256 ]
98    then
99   timejob=10000
100    else
101   timejob=1800
102    fi
103   
104    jobname=$HOME/binrun/jobbench
105    cat > $jobname << EOF
106#!/bin/bash
107#MSUB -r jobbench${nproc5}
108#MSUB -n ${nproc_exe1}
109#MSUB -T $timejob
110#MSUB -e bench_${resolution}_${nproc5}_%I.eo
111#MSUB -o bench_${resolution}_${nproc5}_%I.eo
112#MSUB -j oe
113#MSUB -x
114#MSUB -q standard
115#MSUB -A gen6895
116#==========================================
117set -u
118#
119
120cd \${BRIDGE_MSUB_PWD}/..
121
122rsync -av --exclude="*eo" EXPREF/ EXP_${resolution}_${nproc5}/
123rsync -av EXP00/nemo EXP_${resolution}_${nproc5}/nemo
124cd EXP_${resolution}_${nproc5}/
125
126jpni=${cores/\**/}
127jpnj=${cores/?*\*/}
128
129sed -e "s/jpni *=.*/jpni = \${jpni}/" -e "s/jpnj *=.*/jpnj = \${jpnj}/" namelist_cfg_orca${resolution}_like > namelist_cfg
130
131time ccc_mprun -n \${BRIDGE_MSUB_NPROC} ./nemo > jobout_${resolution}_${nproc5}
132
133EOF
134
135    ccc_msub $jobname
136
137fi
Note: See TracBrowser for help on using the repository browser.