getMaxNodesNeeded.sh 741 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/bash

dir="/home/martini/malleability_benchmark" #FIXME Obtain from another way

# Runs in a given current directory all .ini files
# Parameter 1(Optional) - Amount of executions per file. Must be a positive number
#====== Do not modify these values =======

codeDir="/Codes/build"
execDir="/Exec"
ResultsDir="/Results"

config_file=$1
cores=$2

max_numP=-1
total_resizes=$(grep Total_Resizes $config_file | cut -d '=' -f2)
total_groups=$(($total_resizes + 1))
for ((j=0; j<total_groups; j++));
do
  numP=$(bash $dir$execDir/BashScripts/getNumPNeeded.sh $config_file $j)
  if [ "$numP" -gt "$max_numP" ];
  then
    max_numP=$numP
  fi
done
node_qty=$(($max_numP / $cores))
if [ $node_qty -eq 0 ]
then
  node_qty=1
fi

echo $node_qty