Changeset 9857
- Timestamp:
- 2018-06-29T08:15:45+02:00 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2018/dev_r9759_HPC09_ESIWACE/tests/BENCH/EXPREF/sh_bench
r9856 r9857 4 4 5 5 resolution=${1:?"you must provide the resolution: 1 025 or 12"} 6 mincore=${2:-1} # minimum number of core to be tested 6 7 7 8 machine=$( hostname | sed -e "s/[0-9]*//g" ) 8 9 9 case $machine in 10 10 "beaufixlogin") ncore_node=40 ;; 11 11 "curie") ncore_node=16 ;; 12 12 "irene") ncore_node=48 ;; 13 *) echo "you must add your machine \"$machine\" with its number of cores per node" ; exit 1 ;; 13 14 esac 14 15 15 case $ncore_node in 16 16) 17 case ${resolution} in 18 "1") list="4*4 8*4 8*8 8*16 24*10 24*22 40*24 45*48 72*66" ;; 19 "025")list="8*4 8*8 16*8 20*12 24*22 32*32 48*42 72*58 96*81 144*110 144*201" ;; 20 "12") list="16*16 32*16 40*26 80*26 80*51 96*85 160*102 216*150" ;; 21 esac 22 ;; 23 40) 24 case ${resolution} in 25 "1") list="8*5 8*10 10*16 20*16 20*30 40*33 40*66 60*66 120*55" ;; 26 "025")list="8*5 10*8 16*10 20*16 20*32 40*32 60*42 96*55 96*110 120*173" ;; 27 "12") list="20*14 20*26 40*26 60*34 80*51 96*85 160*102 240*137" ;; 28 esac 29 ;; 30 48) 31 case ${resolution} in 32 "1") list="8*6 12*8 24*10 24*16 24*30 30*48 40*66 72*66" ;; 33 "025")list="8*6 12*8 16*12 24*16 24*32 48*32 48*64 96*64 96*134 144*173 144*241" ;; 34 "12") list="16*15 24*22 48*22 48*42 80*51 96*85 160*102 240*137" ;; 35 esac 36 ;; 37 esac 16 [ $mincore -eq 1 ] && targetnb=$ncore_node || targetnb=$mincore 17 # 18 # build the list of experiences: 19 # must be a multiple of ncore_node and as close as possible of the targeted number of core 20 # 21 n1=0 22 list="" 38 23 39 for ii in $list 24 nbl=$( cat best_jpni_jpnj_eorca${resolution} | wc -l ) 25 for ll in $( seq 1 $nbl ) 40 26 do 41 grep "( ${ii/\*/ x } ), " best_jpni_jpnj_eorca${resolution} 42 echo "$ii = $ncore_node * $( echo "scale=3 ; $ii/${ncore_node}" | bc ) = $( echo $ii | bc )" 27 line=$( sed -n ${ll}p best_jpni_jpnj_eorca${resolution} ) # for each line 28 nn=$( echo $line | sed -e "s/.*nb_cores \([0-9]*\).*/\1/" ) # get the number of core 29 if [ $(( $nn % $ncore_node )) -eq 0 ] # if it is a multiple of $ncore_node 30 then 31 if [ $nn -lt $targetnb ] 32 then 33 n1=$nn # store the number of core 34 line1=$line # store the line 35 else 36 [ $(( $targetnb - $n1 )) -le $(( $nn -$targetnb )) ] && line=$line1 # keep the previous line 37 echo $line 38 nb=$( echo $line | sed -e "s/[^(]*( \([0-9]*\) x \([0-9]*\) .*/\1*\2/" ) # get jpni*jpnj 39 list="${list} ${nb}" 40 targetnb=$(( $targetnb * 2 )) 41 fi 42 fi 43 43 done 44 echo $list 44 45 45 46 for cores in $list
Note: See TracChangeset
for help on using the changeset viewer.