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, 5 years ago | |
---|---|
|
|
File size: 1.5 KB |
Line | |
---|---|
1 | #!/bin/bash |
2 | set -u |
3 | #set -xv |
4 | |
5 | resolution=${1:?"you must provide the resolution: 1 025 or 12"} |
6 | mincore=${2:-1} # minimum number of core to be tested |
7 | |
8 | machine=$( hostname | sed -e "s/[0-9]*//g" ) |
9 | case $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 ;; |
14 | esac |
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 | # |
21 | n1=0 |
22 | list="" |
23 | |
24 | nbl=$( cat best_jpni_jpnj_eorca${resolution} | wc -l ) |
25 | for ll in $( seq 1 $nbl ) |
26 | do |
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 | done |
44 | echo $list |
45 | |
46 | for cores in $list |
47 | do |
48 | ./submit_bench $cores $ncore_node ${resolution} |
49 | done |
50 |
Note: See TracBrowser
for help on using the repository browser.