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) ...@@ -25,26 +25,21 @@ internalIndex=$(echo $files | tr -cd ' ' | wc -c)
index=$((0)) index=$((0))
for config_file in $files for config_file in $files
do do
# FIXME Tener en cuenta que puede ser más de un resize max_numP=-1
aux=$(grep "\[resize0\]" -n $config_file | cut -d ":" -f1) total_groups=$(grep Total_Resizes $config_file | cut -d '=' -f2)
ini=$(echo $aux | cut -d " " -f1) for ((j=0; j<total_groups; j++));
fin=$(echo $aux | cut -d " " -f2) do
diff=$(( fin - ini )) resize_info=$(grep "\[resize$j\]" -n $config_file | cut -d ":" -f1)
numP1=$(head -$fin $config_file | tail -$diff | cut -d ';' -f1 | grep Procs | cut -d '=' -f2) first_line=$(echo $resize_info | cut -d " " -f1)
last_line=$(echo $resize_info | cut -d " " -f2)
aux=$(grep "\[resize1\]" -n $config_file | cut -d ":" -f1) range_lines=$(( last_line - first_line ))
ini=$(echo $aux | cut -d " " -f1) numP=$(head -$last_line $config_file | tail -$range_lines | cut -d ';' -f1 | grep Procs | cut -d '=' -f2)
fin=$(echo $aux | cut -d " " -f2) if [ "$numP" -gt "$max_numP" ];
diff=$(( fin - ini )) then
numP2=$(head -$fin $config_file | tail -$diff | cut -d ';' -f1 | grep Procs | cut -d '=' -f2) max_numP=$numP
fi
echo "------------------------------------------run np=$numP1" done
if [ $numP1 -lt $numP2 ] node_qty=$(($max_numP / $cores))
then
numP1=$numP2
fi
node_qty=$(($numP1 / $cores))
if [ $node_qty -eq 0 ] if [ $node_qty -eq 0 ]
then then
node_qty=1 node_qty=1
......
...@@ -55,7 +55,7 @@ fi ...@@ -55,7 +55,7 @@ fi
#1 - Obtain maximum number of processes for the run #1 - Obtain maximum number of processes for the run
max_numP=-1 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++)); for ((j=0; j<total_groups; j++));
do do
resize_info=$(grep "\[resize$j\]" -n $config_file | cut -d ":" -f1) 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