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.
Changeset 9857 – NEMO

Changeset 9857


Ignore:
Timestamp:
2018-06-29T08:15:45+02:00 (6 years ago)
Author:
smasson
Message:

dev_r9759_HPC09_ESIWACE: update bench job scripts

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2018/dev_r9759_HPC09_ESIWACE/tests/BENCH/EXPREF/sh_bench

    r9856 r9857  
    44 
    55resolution=${1:?"you must provide the resolution: 1 025 or 12"} 
     6mincore=${2:-1} # minimum number of core to be tested 
    67 
    78machine=$( hostname | sed -e "s/[0-9]*//g" ) 
    8  
    99case $machine in  
    1010    "beaufixlogin") ncore_node=40 ;; 
    1111    "curie")        ncore_node=16 ;; 
    1212    "irene")        ncore_node=48 ;; 
     13    *) echo "you must add your machine \"$machine\" with its number of cores per node" ; exit 1 ;; 
    1314esac 
    1415 
    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# 
     21n1=0 
     22list="" 
    3823 
    39 for ii in $list 
     24nbl=$( cat best_jpni_jpnj_eorca${resolution} | wc -l ) 
     25for ll in $( seq 1 $nbl ) 
    4026do 
    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 
    4343done 
     44echo $list 
    4445 
    4546for cores in $list 
Note: See TracChangeset for help on using the changeset viewer.