source: NEMO/branches/2018/dev_r9759_HPC09_ESIWACE/tests/BENCH/EXPREF/sh_bench @ 9857

Last change on this file since 9857 was 9857, checked in by smasson, 3 years ago

dev_r9759_HPC09_ESIWACE: update bench job scripts

  • Property svn:executable set to *
File size: 1.5 KB
Line 
1#!/bin/bash
2set -u
3#set -xv
4
5resolution=${1:?"you must provide the resolution: 1 025 or 12"}
6mincore=${2:-1} # minimum number of core to be tested
7
8machine=$( hostname | sed -e "s/[0-9]*//g" )
9case $machine in
10    "beaufixlogin") ncore_node=40 ;;
11    "curie")        ncore_node=16 ;;
12    "irene")        ncore_node=48 ;;
13    *) echo "you must add your machine \"$machine\" with its number of cores per node" ; exit 1 ;;
14esac
15
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=""
23
24nbl=$( cat best_jpni_jpnj_eorca${resolution} | wc -l )
25for ll in $( seq 1 $nbl )
26do
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
43done
44echo $list
45
46for cores in $list
47do
48    ./submit_bench $cores $ncore_node ${resolution}
49done
50
Note: See TracBrowser for help on using the repository browser.