Commit d8f1ea5e authored by iker_martin's avatar iker_martin
Browse files

Minor errors fixed

parent a74ee030
#!/bin/bash
dir="/home/martini/malleability_benchmark"
codeDir="/Codes/build"
export EXTRAE_CONFIG_FILE=extrae.xml
export LD_PRELOAD=$EXTRAE_HOME/lib/libmpitrace.so
$dir$codeDir/./a.out
......@@ -25,26 +25,21 @@ internalIndex=$(echo $files | tr -cd ' ' | wc -c)
index=$((0))
for config_file in $files
do
# FIXME Tener en cuenta que puede ser más de un resize
aux=$(grep "\[resize0\]" -n $config_file | cut -d ":" -f1)
ini=$(echo $aux | cut -d " " -f1)
fin=$(echo $aux | cut -d " " -f2)
diff=$(( fin - ini ))
numP1=$(head -$fin $config_file | tail -$diff | cut -d ';' -f1 | grep Procs | cut -d '=' -f2)
aux=$(grep "\[resize1\]" -n $config_file | cut -d ":" -f1)
ini=$(echo $aux | cut -d " " -f1)
fin=$(echo $aux | cut -d " " -f2)
diff=$(( fin - ini ))
numP2=$(head -$fin $config_file | tail -$diff | cut -d ';' -f1 | grep Procs | cut -d '=' -f2)
echo "------------------------------------------run np=$numP1"
if [ $numP1 -lt $numP2 ]
max_numP=-1
total_groups=$(grep Total_Resizes $config_file | cut -d '=' -f2)
for ((j=0; j<total_groups; j++));
do
resize_info=$(grep "\[resize$j\]" -n $config_file | cut -d ":" -f1)
first_line=$(echo $resize_info | cut -d " " -f1)
last_line=$(echo $resize_info | cut -d " " -f2)
range_lines=$(( last_line - first_line ))
numP=$(head -$last_line $config_file | tail -$range_lines | cut -d ';' -f1 | grep Procs | cut -d '=' -f2)
if [ "$numP" -gt "$max_numP" ];
then
numP1=$numP2
max_numP=$numP
fi
node_qty=$(($numP1 / $cores))
done
node_qty=$(($max_numP / $cores))
if [ $node_qty -eq 0 ]
then
node_qty=1
......
......@@ -55,7 +55,7 @@ fi
#1 - Obtain maximum number of processes for the run
max_numP=-1
total_groups=$(grep Total_Resizes config2.ini | cut -d '=' -f2)
total_groups=$(grep Total_Resizes $config_file | cut -d '=' -f2)
for ((j=0; j<total_groups; j++));
do
resize_info=$(grep "\[resize$j\]" -n $config_file | cut -d ":" -f1)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment