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.
sh_bench in NEMO/branches/2018/dev_r9759_HPC09_ESIWACE/tests/BENCH_12/EXPREF – NEMO

source: NEMO/branches/2018/dev_r9759_HPC09_ESIWACE/tests/BENCH_12/EXPREF/sh_bench @ 10136

Last change on this file since 10136 was 10136, checked in by dguibert, 6 years ago

bull: async/datatype

Experimental changes to enable/study/bench various mpi "optimisations":

  • BULL_ASYNC
  • BULL_DATATYPE_VECTOR/SUBARRAY

this has been applied to the nonosc subroutine (only for now).

File size: 2.1 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
7maxcore=${3:-0} # maximum number of core to be tested
8
9machine=$( hostname | sed -e "s/[0-9]*//g" )
10case $machine in
11    "beaufixlogin") ncore_node=40 ;;
12    "curie")        ncore_node=16 ;;
13    "irene")        ncore_node=48 ;;
14    *) echo "you must add your machine \"$machine\" with its number of cores per node" ; exit 1 ;;
15esac
16
17[ $mincore -eq 1 ] && targetnb=$ncore_node || targetnb=$mincore
18#
19# build the list of experiences:
20# must be a multiple of ncore_node and as close as possible of the targeted number of core
21#
22n1=0
23list=""
24
25# Prepare gnuplot data file
26dateref=$( date "+%Y%m%d-%Hh%Mm%Ss" )
27echo "# nb_proc    jpi    jpj" > gnuplot_tbc_${resolution}_${dateref}.dat
28nbl=$( cat best_jpni_jpnj_eorca${resolution} | wc -l )
29for ll in $( seq 1 $nbl )
30do
31    line=$( sed -n ${ll}p best_jpni_jpnj_eorca${resolution} )    # for each line
32    nn=$( echo $line | sed -e "s/.*nb_cores \([0-9]*\).*/\1/" )  # get the number of core
33    [ $maxcore -gt 1 -a $nn -gt $maxcore ] && break              # if below $maxcore (if specified)
34        if [ $(( $nn % $ncore_node )) -eq 0 ]                    # if it is a multiple of $ncore_node
35        then
36            if [ $nn -lt $targetnb ]
37            then
38                n1=$nn       # store the number of core
39                line1=$line  # store the line
40            else
41                [ $(( $targetnb - $n1 )) -le $(( $nn -$targetnb )) ] && line=$line1   # keep the previous line
42                echo $line
43                nb=$( echo $line | sed -e "s/[^(]*( \([0-9]*\) x \([0-9]*\) .*/\1*\2/" ) # get jpni*jpnj
44                list="${list} ${nb}"
45                targetnb=$(( $targetnb * 2 ))
46                subsize=$( echo $line | awk {'printf "%d   %d", $11, $13'})
47                corenb=$( echo $line | awk {'printf "%d", $2'})
48                echo "$corenb  $subsize" >> gnuplot_tbc_${resolution}.dat
49            fi
50        fi
51done
52echo $list
53
54for cores in $list
55do
56    ./submit_bench $cores $ncore_node ${resolution} ${dateref}
57done
58
Note: See TracBrowser for help on using the repository browser.