Changeset 11536 for NEMO/trunk/tests/BENCH/EXPREF/submit_bench
- Timestamp:
- 2019-09-11T15:54:18+02:00 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/trunk/tests/BENCH/EXPREF/submit_bench
r9870 r11536 6 6 # 7 7 set -u 8 set -vx8 #set -vx 9 9 # 10 10 cores=$1 … … 15 15 # 16 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 17 nproc_exe1=$( echo $cores | bc ) 18 nproc=$nproc_exe1 19 nnode=$(( ( $nproc + $ncore_node - 1 ) / $ncore_node )) 21 20 22 21 nproc5=$( printf "%05d\n" ${nproc_exe1} ) 22 23 case ${resolution} in 24 "1") 25 if [ $nproc_exe1 -lt 50 ] 26 then 27 timejob=3600 28 elif [ $nproc_exe1 -lt 100 ] 29 then 30 timejob=1800 31 elif [ $nproc_exe1 -lt 200 ] 32 then 33 timejob=900 34 else 35 timejob=600 36 fi 37 ;; 38 "025") 39 if [ $nproc_exe1 -lt 50 ] 40 then 41 timejob=15000 42 elif [ $nproc_exe1 -lt 100 ] 43 then 44 timejob=7000 45 elif [ $nproc_exe1 -lt 200 ] 46 then 47 timejob=3600 48 elif [ $nproc_exe1 -lt 400 ] 49 then 50 timejob=2000 51 elif [ $nproc_exe1 -lt 800 ] 52 then 53 timejob=1000 54 else 55 timejob=600 56 fi 57 ;; 58 "12") 59 if [ $nproc_exe1 -lt 200 ] 60 then 61 timejob=30000 62 elif [ $nproc_exe1 -lt 400 ] 63 then 64 timejob=15000 65 elif [ $nproc_exe1 -lt 800 ] 66 then 67 timejob=20000 68 elif [ $nproc_exe1 -lt 1600 ] 69 then 70 timejob=15000 71 elif [ $nproc_exe1 -lt 3200 ] 72 then 73 timejob=7500 74 elif [ $nproc_exe1 -lt 10000 ] 75 then 76 timejob=5000 77 elif [ $nproc_exe1 -lt 20000 ] 78 then 79 timejob=2500 80 else 81 timejob=1200 82 fi 83 ;; 84 esac 85 23 86 24 87 ###################################################################### … … 100 163 if [[ ( "$machine" == "curie" ) || ( "$machine" == "irene" ) ]] 101 164 then 102 103 case ${resolution} in104 "1")105 if [ $nproc_exe1 -lt 50 ]106 then107 timejob=3600108 elif [ $nproc_exe1 -lt 100 ]109 then110 timejob=1800111 elif [ $nproc_exe1 -lt 200 ]112 then113 timejob=900114 else115 timejob=600116 fi117 ;;118 "025")119 if [ $nproc_exe1 -lt 50 ]120 then121 timejob=15000122 elif [ $nproc_exe1 -lt 100 ]123 then124 timejob=7000125 elif [ $nproc_exe1 -lt 200 ]126 then127 timejob=3600128 elif [ $nproc_exe1 -lt 400 ]129 then130 timejob=2000131 elif [ $nproc_exe1 -lt 800 ]132 then133 timejob=1000134 else135 timejob=600136 fi137 ;;138 "12")139 if [ $nproc_exe1 -lt 200 ]140 then141 timejob=30000142 elif [ $nproc_exe1 -lt 400 ]143 then144 timejob=15000145 elif [ $nproc_exe1 -lt 800 ]146 then147 timejob=8000148 elif [ $nproc_exe1 -lt 1600 ]149 then150 timejob=5000151 elif [ $nproc_exe1 -lt 3200 ]152 then153 timejob=2500154 else155 timejob=1200156 fi157 ;;158 esac159 165 160 166 [ "$machine" == "curie" ] && queuename=standard || queuename=skylake 161 167 162 jobname=$HOME/binrun/jobbench 168 EXPjob=../EXP_${resolution}_${nproc5}_${dateref} 169 mkdir -p ${EXPjob} 170 cd ${EXPjob} 171 jobname=jobbench 163 172 cat > $jobname << EOF 164 173 #!/bin/bash … … 176 185 # 177 186 178 cd \${BRIDGE_MSUB_PWD}/.. 179 180 181 EXPjob=EXP_${resolution}_${nproc5}_${dateref} 182 rsync -av --exclude="*eo" EXPREF/ \${EXPjob}/ 183 rsync -av EXP00/nemo \${EXPjob}/nemo 184 cd \${EXPjob} 187 cd \${BRIDGE_MSUB_PWD} 188 189 for ff in \${BRIDGE_MSUB_PWD}/../EXPREF/namelist_*cfg \${BRIDGE_MSUB_PWD}/../EXPREF/namelist_*ref \${BRIDGE_MSUB_PWD}/../BLD/bin/nemo.exe 190 do 191 cp \$ff . 192 done 185 193 186 194 jpni=${cores/\**/} 187 195 jpnj=${cores/?*\*/} 188 196 189 sed -e "s/jpni *=.*/jpni = \${jpni}/" -e "s/jpnj *=.*/jpnj = \${jpnj}/" namelist_cfg_orca${resolution}_like > namelist_cfg 190 191 time ccc_mprun -n \${BRIDGE_MSUB_NPROC} ./nemo > jobout_${resolution}_${nproc5}_${dateref} 197 sed -e "s/jpni *=.*/jpni = \${jpni}/" \ 198 -e "s/jpnj *=.*/jpnj = \${jpnj}/"\ 199 -e "s/ln_timing *= *.false./ln_timing = .true./" \ 200 \${BRIDGE_MSUB_PWD}/../EXPREF/namelist_cfg_orca${resolution}_like > namelist_cfg 201 202 time ccc_mprun -n \${BRIDGE_MSUB_NPROC} ./nemo.exe > jobout_${resolution}_${nproc5}_${dateref} 2>&1 192 203 193 204 EOF … … 196 207 197 208 fi 209 210 ###################################################################### 211 ### Jean-Zay 212 ###################################################################### 213 214 if [ "$machine" == "jean-zay" ] 215 then 216 hh=$( printf "%02d\n" $(( ${timejob} / 3600 )) ) 217 mm=$( printf "%02d\n" $(( ( ${timejob} % 3600 ) / 60 )) ) 218 ss=$( printf "%02d\n" $(( ( ${timejob} % 3600 ) % 60 )) ) 219 220 EXPjob=../EXP_${resolution}_${nproc5}_${dateref} 221 mkdir -p ${EXPjob} 222 cd ${EXPjob} 223 jobname=jobbench 224 cat > $jobname << EOF 225 #!/bin/bash 226 #SBATCH --job-name=Seq # nom du job 227 #SBATCH --partition=cpu_gct3 # demande d'allocation sur la partition CPU 228 #SBATCH --nodes=${nnode} # nombre de noeuds 229 #SBATCH --ntasks-per-node=${ncore_node} # nombre de taches MPI par noeud 230 #SBATCH --ntasks-per-core=1 # 1 processus MPI par coeur physique (pas d'hyperthreading) 231 #SBATCH --time=${hh}:${mm}:${ss} # temps d execution maximum demande (HH:MM:SS) 232 #SBATCH --output=bench_${resolution}_${nproc5}_%j.eo # nom du fichier de sortie 233 #SBATCH --error=bench_${resolution}_${nproc5}_%j.eo # nom du fichier d'erreur (ici en commun avec la sortie) 234 #========================================== 235 set -u 236 #set -xv 237 # 238 #cd \${SLURM_SUBMIT_DIR} 239 cd \${JOBSCRATCH} 240 pwd 241 242 for ff in \${SLURM_SUBMIT_DIR}/../EXPREF/namelist_*cfg \${SLURM_SUBMIT_DIR}/../EXPREF/namelist_*ref \${SLURM_SUBMIT_DIR}/../BLD/bin/nemo.exe 243 do 244 cp \$ff . 245 done 246 247 jpni=${cores/\**/} 248 jpnj=${cores/?*\*/} 249 250 sed -e "s/jpni *=.*/jpni = \${jpni}/" \ 251 -e "s/jpnj *=.*/jpnj = \${jpnj}/" \ 252 -e "s/ln_timing *= *.false./ln_timing = .true./" \ 253 \${SLURM_SUBMIT_DIR}/../EXPREF/namelist_cfg_orca${resolution}_like > namelist_cfg 254 255 ls -l 256 257 echo 258 echo 259 echo " =========== start the model ===========" 260 echo 261 echo 262 263 time srun --mpi=pmi2 --cpu-bind=cores -K1 -n ${nproc} ./nemo.exe > jobout_${resolution}_${nproc5}_${dateref} 2>&1 264 265 ls -l 266 267 if [ "\$( pwd )" != "\${SLURM_SUBMIT_DIR}" ] 268 then 269 rsync -av namelist_cfg time.step ocean.output jobout_${resolution}_${nproc5}_${dateref} communication_report.txt layout.dat timing.output output.namelist* \${SLURM_SUBMIT_DIR} 270 fi 271 272 EOF 273 274 sbatch $jobname 275 276 fi
Note: See TracChangeset
for help on using the changeset viewer.