Commit 7a64506d authored by iker_martin's avatar iker_martin
Browse files

Updated Exec files to consider the new env variables in the configuration when executing

parent 6d368caa
#!/bin/bash #!/bin/bash
# Runs in a given current directory all .ini files # Gets the first nodelist that will be used during the emulation
# Parameter 1(Optional) - Amount of executions per file. Must be a positive number # Parameter 1(Optional) - Amount of executions per file. Must be a positive number
#====== Do not modify these values ======= #====== Do not modify these values =======
codeDir="/Codes/build"
execDir="/Exec"
ResultsDir="/Results"
numP=$1 numP=$1
cores=$2 cores=$2
nodelist=$3 nodelist=$3
......
...@@ -2,31 +2,27 @@ ...@@ -2,31 +2,27 @@
# Obtains for a given configuration file how many nodes will be needed # Obtains for a given configuration file how many nodes will be needed
# Parameter 1 - Configuration file name for the emulation. # Parameter 1 - Configuration file name for the emulation.
# Parameter 2 - Base directory of the malleability benchmark # Parameter 2 - Number of cores in the machines. The machines must be homogenous. Must be a positive number.
# Parameter 3 - Number of cores in the machines. The machines must be homogenous. Must be a positive number.
#====== Do not modify these values ======= #====== Do not modify these values =======
codeDir="/Codes/build"
execDir="/Exec" execDir="/Exec"
ResultsDir="/Results"
if [ "$#" -lt "3" ] if [ "$#" -lt "2" ]
then then
echo "Not enough arguments" echo "Not enough arguments"
echo "Usage -> bash getMaxNodesNeeded.sh Configuration.ini BaseDirectory NumCores" echo "Usage -> bash getMaxNodesNeeded.sh Configuration.ini NumCores"
exit -1 exit -1
fi fi
config_file=$1 config_file=$1
dir=$2 cores=$2
cores=$3
max_numP=-1 max_numP=-1
total_resizes=$(grep Total_Resizes $config_file | cut -d '=' -f2) total_resizes=$(grep Total_Resizes $config_file | cut -d '=' -f2)
total_groups=$(($total_resizes + 1)) total_groups=$(($total_resizes + 1))
for ((j=0; j<total_groups; j++)); for ((j=0; j<total_groups; j++));
do do
numP=$(bash $dir$execDir/BashScripts/getNumPNeeded.sh $config_file $j) numP=$(bash $PROTEO_HOME$execDir/BashScripts/getNumPNeeded.sh $config_file $j)
if [ "$numP" -gt "$max_numP" ]; if [ "$numP" -gt "$max_numP" ];
then then
max_numP=$numP max_numP=$numP
......
...@@ -3,11 +3,6 @@ ...@@ -3,11 +3,6 @@
# Runs in a given current directory all .ini files # Runs in a given current directory all .ini files
# Parameter 1(Optional) - Amount of executions per file. Must be a positive number # Parameter 1(Optional) - Amount of executions per file. Must be a positive number
#====== Do not modify these values ======= #====== Do not modify these values =======
codeDir="/Codes/build"
execDir="/Exec"
ResultsDir="/Results"
config_file=$1 config_file=$1
group_index=$2 group_index=$2
......
...@@ -19,10 +19,7 @@ partition="P1" ...@@ -19,10 +19,7 @@ partition="P1"
scriptDir="$(dirname "$0")" scriptDir="$(dirname "$0")"
source $scriptDir/../Codes/build/config.txt source $scriptDir/../Codes/build/config.txt
codeDir="/Codes/" cores=$(bash $PROTEO_HOME$execDir/BashScripts/getCores.sh $partition)
execDir="/Exec/"
ResultsDir="/Results/"
cores=$(bash $dir$execDir/BashScripts/getCores.sh $partition)
if [ "$#" -lt "6" ] if [ "$#" -lt "6" ]
then then
...@@ -195,10 +192,10 @@ do ...@@ -195,10 +192,10 @@ do
#2 - Obtain number of nodes needed #2 - Obtain number of nodes needed
config_file="$common_name$run.ini" config_file="$common_name$run.ini"
node_qty=$(bash $dir$execDir/BashScripts/getMaxNodesNeeded.sh $config_file $dir $cores) node_qty=$(bash $PROTEO_HOME$execDir/BashScripts/getMaxNodesNeeded.sh $config_file $cores)
#3 - Launch execution #3 - Launch execution
sbatch -p $partition -N $node_qty -t $limit_time $dir$execDir./generalRun.sh $dir $cores $config_file $use_extrae $run $diff sbatch -p $partition -N $node_qty -t $limit_time $PROTEO_HOME$execDir./generalRun.sh $cores $config_file $use_extrae $run $diff
fi fi
done done
......
#!/bin/bash #!/bin/bash
scriptDir="$(dirname "$0")" scriptDir="$(dirname "$0")"
source $scriptDir/../../Codes/build/config.txt source $scriptDir/../../Codes/build/config.txt
codeDir="/Codes/build"
export EXTRAE_CONFIG_FILE=extrae.xml export EXTRAE_CONFIG_FILE=extrae.xml
export LD_PRELOAD=$EXTRAE_HOME/lib/libmpitrace.so export LD_PRELOAD=$EXTRAE_HOME/lib/libmpitrace.so
$dir$codeDir/./a.out $PROTEO_BIN
#!/bin/bash #!/bin/bash
scriptDir="$(dirname "$0")" scriptDir="$(dirname "$0")"
source $scriptDir/../../Codes/build/config.txt source $scriptDir/../../Codes/build/config.txt
codeDir="/Codes/build"
valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes --log-file=vg.tp.%p $dir$codeDir/./a.out valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes --log-file=vg.tp.%p $PROTEO_BIN
...@@ -5,44 +5,39 @@ ...@@ -5,44 +5,39 @@
# !!!!This script should only be called by others scripts, do not call it directly!!! # !!!!This script should only be called by others scripts, do not call it directly!!!
# Runs a given configuration file with the indicated parameters with the aid of the RMS Slurm. # Runs a given configuration file with the indicated parameters with the aid of the RMS Slurm.
# Parameter 1 - Base directory of the malleability benchmark # Parameter 1 - Number of cores in a single machine
# Parameter 2 - Number of cores in a single machine # Parameter 2 - Configuration file name for the emulation.
# Parameter 3 - Configuration file name for the emulation. # Parameter 3 - Use Valgrind(1), Extrae(2) or nothing(0).
# Parameter 4 - Use Valgrind(1), Extrae(2) or nothing(0). # Parameter 4 - Index to use for the output files. Must be a positive integer.
# Parameter 5 - Index to use for the output files. Must be a positive integer. # Parameter 5 - Amount of executions per file. Must be a positive number.
# Parameter 6 - Amount of executions per file. Must be a positive number.
#====== Do not modify these values ======= #====== Do not modify these values =======
codeDir="/Codes/build"
execDir="/Exec" execDir="/Exec"
ResultsDir="/Results"
echo "START TEST" echo "START TEST"
#$1 == baseDir #$1 == cores
#$2 == cores #$2 == configFile
#$3 == configFile #$3 == use_external
#$4 == use_external #$4 == outFileIndex
#$5 == outFileIndex #$5 == qty
#$6 == qty
echo $@ echo $@
if [ $# -lt 4 ] if [ $# -lt 3 ]
then then
echo "Internal ERROR generalRun.sh - Not enough arguments were given" echo "Internal ERROR generalRun.sh - Not enough arguments were given"
exit -1 exit -1
fi fi
#READ PARAMETERS AND ENSURE CORRECTNESS #READ PARAMETERS AND ENSURE CORRECTNESS
dir=$1 cores=$1
cores=$2 configFile=$2
configFile=$3 use_external=$3
use_external=$4 outFileIndex=$4
outFileIndex=$5
qty=1 qty=1
if [ $# -ge 5 ] if [ $# -ge 4 ]
then then
qty=$6 qty=$5
fi fi
nodelist=$SLURM_JOB_NODELIST nodelist=$SLURM_JOB_NODELIST
...@@ -52,8 +47,8 @@ then ...@@ -52,8 +47,8 @@ then
exit -1 exit -1
fi fi
numP=$(bash $dir$execDir/BashScripts/getNumPNeeded.sh $configFile 0) numP=$(bash $PROTEO_HOME$execDir/BashScripts/getNumPNeeded.sh $configFile 0)
initial_nodelist=$(bash $dir$execDir/BashScripts/createInitialNodelist.sh $numP $cores $nodelist) initial_nodelist=$(bash $PROTEO_HOME$execDir/BashScripts/createInitialNodelist.sh $numP $cores $nodelist)
#EXECUTE RUN #EXECUTE RUN
echo "Nodes=$nodelist" echo "Nodes=$nodelist"
...@@ -62,26 +57,26 @@ then ...@@ -62,26 +57,26 @@ then
for ((i=0; i<qty; i++)) for ((i=0; i<qty; i++))
do do
echo "Run $i starts" echo "Run $i starts"
mpirun -hosts $initial_nodelist -np $numP $dir$codeDir/a.out $configFile $outFileIndex mpirun -hosts $initial_nodelist -np $numP $PROTEO_BIN $configFile $outFileIndex
echo "Run $i ends" echo "Run $i ends"
done done
elif [ $use_external -eq 1 ] #VALGRIND elif [ $use_external -eq 1 ] #VALGRIND
then then
cp $dir$execDir/Valgrind/worker_valgrind.sh . cp $PROTEO_HOME$execDir/Valgrind/worker_valgrind.sh .
for ((i=0; i<qty; i++)) for ((i=0; i<qty; i++))
do do
echo "Run $i starts" echo "Run $i starts"
mpirun -hosts $initial_nodelist -np $numP valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes --trace-children=yes --log-file=vg.sp.%p.$SLURM_JOB_ID.$i $dir$codeDir/a.out $configFile $outIndex mpirun -hosts $initial_nodelist -np $numP valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes --trace-children=yes --log-file=vg.sp.%p.$SLURM_JOB_ID.$i $PROTEO_BIN $configFile $outIndex
echo "Run $i ends" echo "Run $i ends"
done done
else #EXTRAE else #EXTRAE
cp $dir$execDir/Extrae/extrae.xml . cp $PROTEO_HOME$execDir/Extrae/extrae.xml .
cp $dir$execDir/Extrae/trace.sh . cp $PROTEO_HOME$execDir/Extrae/trace.sh .
cp $dir$execDir/Extrae/worker_extrae.sh . cp $PROTEO_HOME$execDir/Extrae/worker_extrae.sh .
for ((i=0; i<qty; i++)) for ((i=0; i<qty; i++))
do do
#FIXME Extrae not tested keeping in mind the initial nodelist - Could have some errors #FIXME Extrae not tested keeping in mind the initial nodelist - Could have some errors
srun -n$numP --mpi=pmi2 ./trace.sh $dir$codeDir/a.out $configFile $outFileIndex srun -n$numP --mpi=pmi2 ./trace.sh $PROTEO_BIN $configFile $outFileIndex
done done
fi fi
......
...@@ -2,26 +2,22 @@ ...@@ -2,26 +2,22 @@
# !!!!This script should only be called by others scripts, do not call it directly!!! # !!!!This script should only be called by others scripts, do not call it directly!!!
# Runs a given configuration file with the indicated parameters. # Runs a given configuration file with the indicated parameters.
# Parameter 1 - Base directory of the malleability benchmark # Parameter 1 - Number of cores in a single machine
# Parameter 2 - Number of cores in a single machine # Parameter 2 - Configuration file name for the emulation.
# Parameter 3 - Configuration file name for the emulation. # Parameter 3 - Use Extrae(1) or not(0).
# Parameter 4 - Use Extrae(1) or not(0). # Parameter 4 - Index to use for the output files. Must be a positive integer.
# Parameter 5 - Index to use for the output files. Must be a positive integer. # Parameter 5 - Amount of executions per file. Must be a positive number.
# Parameter 6 - Amount of executions per file. Must be a positive number.
#====== Do not modify these values ======= #====== Do not modify these values =======
codeDir="/Codes/build"
execDir="/Exec" execDir="/Exec"
ResultsDir="/Results"
echo "START TEST" echo "START TEST"
#$1 == baseDir #$1 == cores
#$2 == cores #$2 == configFile
#$3 == configFile #$3 == use_external
#$4 == use_external #$4 == outFileIndex
#$5 == outFileIndex #$5 == qty
#$6 == qty
echo $@ echo $@
if [ $# -lt 3 ] if [ $# -lt 3 ]
...@@ -31,36 +27,35 @@ then ...@@ -31,36 +27,35 @@ then
fi fi
#READ PARAMETERS AND ENSURE CORRECTNESS #READ PARAMETERS AND ENSURE CORRECTNESS
dir=$1 cores=$1
cores=$2 configFile=$2
configFile=$3
use_external=0 use_external=0
outFileIndex=0 outFileIndex=0
qty=1 qty=1
if [ $# -ge 4 ] if [ $# -ge 3 ]
then then
use_external=$4 use_external=$3
fi fi
if [ $# -ge 5 ] if [ $# -ge 4 ]
then then
outFileIndex=$5 outFileIndex=$4
fi fi
if [ $# -ge 6 ] if [ $# -ge 5 ]
then then
qty=$6 qty=$5
fi fi
numP=$(bash $dir$execDir/BashScripts/getNumPNeeded.sh $configFile 0) numP=$(bash $PROTEO_HOME$execDir/BashScripts/getNumPNeeded.sh $configFile 0)
nodelist=$SLURM_JOB_NODELIST nodelist=$SLURM_JOB_NODELIST
if [ -z "$nodelist" ]; if [ -z "$nodelist" ];
then then
nodelist="localhost" nodelist="localhost"
initial_nodelist="localhost" initial_nodelist="localhost"
else else
initial_nodelist=$(bash $dir$execDir/BashScripts/createInitialNodelist.sh $numP $cores $nodelist) initial_nodelist=$(bash $PROTEO_HOME$execDir/BashScripts/createInitialNodelist.sh $numP $cores $nodelist)
fi fi
#EXECUTE RUN #EXECUTE RUN
...@@ -70,25 +65,25 @@ then ...@@ -70,25 +65,25 @@ then
for ((i=0; i<qty; i++)) for ((i=0; i<qty; i++))
do do
echo "Run $i starts" echo "Run $i starts"
mpirun -hosts $initial_nodelist -np $numP $dir$codeDir/a.out $configFile $outFileIndex mpirun -hosts $initial_nodelist -np $numP $PROTEO_BIN $configFile $outFileIndex
echo "Run $i ends" echo "Run $i ends"
done done
elif [ $use_external -eq 1 ] #VALGRIND elif [ $use_external -eq 1 ] #VALGRIND
then then
cp $dir$execDir/Valgrind/worker_valgrind.sh . cp $PROTEO_HOME$execDir/Valgrind/worker_valgrind.sh .
for ((i=0; i<qty; i++)) for ((i=0; i<qty; i++))
do do
echo "Run $i starts" echo "Run $i starts"
mpirun -hosts $initial_nodelist -np $numP valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes --trace-children=yes --log-file=vg.sp.%p.$SLURM_JOB_ID.$i $dir$codeDir/a.out $configFile $outIndex mpirun -hosts $initial_nodelist -np $numP valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes --trace-children=yes --log-file=vg.sp.%p.$SLURM_JOB_ID.$i $PROTEO_BIN $configFile $outIndex
echo "Run $i ends" echo "Run $i ends"
done done
else else
cp $dir$execDir/Extrae/extrae.xml . cp $PROTEO_HOME$execDir/Extrae/extrae.xml .
cp $dir$execDir/Extrae/trace.sh . cp $PROTEO_HOME$execDir/Extrae/trace.sh .
cp $dir$execDir/Extrae/worker_extrae.sh . cp $PROTEO_HOME$execDir/Extrae/worker_extrae.sh .
for ((i=0; i<qty; i++)) for ((i=0; i<qty; i++))
do do
mpirun -hosts $initial_nodelist -np $numP ./trace.sh $dir$codeDir/a.out $configFile $outFileIndex mpirun -hosts $initial_nodelist -np $numP ./trace.sh $PROTEO_BIN $configFile $outFileIndex
done done
fi fi
......
...@@ -8,14 +8,10 @@ ...@@ -8,14 +8,10 @@
scriptDir="$(dirname "$0")" scriptDir="$(dirname "$0")"
source $scriptDir/../Codes/build/config.txt source $scriptDir/../Codes/build/config.txt
codeDir="/Codes"
execDir="/Exec"
ResultsDir="/Results"
complex_file=$1 complex_file=$1
output_name=$2 output_name=$2
python3 $dir$execDir/PythonCodes/read_multiple.py $complex_file $output_name python3 $PROTEO_HOME$execDir/PythonCodes/read_multiple.py $complex_file $output_name
echo "END TEST"
echo "END GENERATION"
...@@ -10,10 +10,7 @@ exclude="c00,c01,c02" ...@@ -10,10 +10,7 @@ exclude="c00,c01,c02"
scriptDir="$(dirname "$0")" scriptDir="$(dirname "$0")"
source $scriptDir/../Codes/build/config.txt source $scriptDir/../Codes/build/config.txt
codeDir="/Codes/build" cores=$(bash $PROTEO_HOME$execDir/BashScripts/getCores.sh $partition)
execDir="/Exec"
ResultsDir="/Results"
cores=$(bash $dir$execDir/BashScripts/getCores.sh $partition)
use_extrae=0 use_extrae=0
qty=1 qty=1
...@@ -33,7 +30,7 @@ internalIndex=$(echo $files | tr -cd ' ' | wc -c) ...@@ -33,7 +30,7 @@ internalIndex=$(echo $files | tr -cd ' ' | wc -c)
index=$((0)) index=$((0))
for config_file in $files for config_file in $files
do do
node_qty=$(bash $dir$execDir/BashScripts/getMaxNodesNeeded.sh $config_file $dir $cores) node_qty=$(bash $PROTEO_HOME$execDir/BashScripts/getMaxNodesNeeded.sh $config_file $cores)
outFileIndex=$(echo $config_file | sed s/[^0-9]//g) outFileIndex=$(echo $config_file | sed s/[^0-9]//g)
if [[ $outFileIndex ]]; then if [[ $outFileIndex ]]; then
...@@ -45,6 +42,6 @@ do ...@@ -45,6 +42,6 @@ do
#Execute test #Execute test
echo "Execute job $index with Nodes=$node_qty and config_file=$config_file" echo "Execute job $index with Nodes=$node_qty and config_file=$config_file"
sbatch -p $partition --exclude=$exclude -N $node_qty -t $limit_time $dir$execDir/generalRun.sh $dir $cores $config_file $use_extrae $index $qty sbatch -p $partition --exclude=$exclude -N $node_qty -t $limit_time $PROTEO_HOME$execDir/generalRun.sh $cores $config_file $use_extrae $index $qty
done done
echo "End" echo "End"
...@@ -15,10 +15,7 @@ exclude="c00,c01,c02" ...@@ -15,10 +15,7 @@ exclude="c00,c01,c02"
scriptDir="$(dirname "$0")" scriptDir="$(dirname "$0")"
source $scriptDir/../Codes/build/config.txt source $scriptDir/../Codes/build/config.txt
codeDir="/Codes/build" cores=$(bash $PROTEO_HOME$execDir/BashScripts/getCores.sh $partition)
execDir="/Exec"
ResultsDir="/Results"
cores=$(bash $dir$execDir/BashScripts/getCores.sh $partition)
if [ $# -lt 1 ] if [ $# -lt 1 ]
then then
...@@ -62,9 +59,9 @@ then ...@@ -62,9 +59,9 @@ then
fi fi
#Obtain amount of nodes neeeded #Obtain amount of nodes neeeded
node_qty=$(bash $dir$execDir/BashScripts/getMaxNodesNeeded.sh $config_file $dir $cores) node_qty=$(bash $PROTEO_HOME$execDir/BashScripts/getMaxNodesNeeded.sh $config_file $cores)
#Run with the expected amount of nodes #Run with the expected amount of nodes
sbatch -p $partition --exclude=$exclude -N $node_qty -t $limit_time $dir$execDir/generalRun.sh $dir $cores $config_file $use_external $outFileIndex $qty sbatch -p $partition --exclude=$exclude -N $node_qty -t $limit_time $PROTEO_HOME$execDir/generalRun.sh $cores $config_file $use_external $outFileIndex $qty
if ! [ -z "$output" ] if ! [ -z "$output" ]
then then
......
...@@ -13,9 +13,6 @@ cores=20 ...@@ -13,9 +13,6 @@ cores=20
scriptDir="$(dirname "$0")" scriptDir="$(dirname "$0")"
source $scriptDir/../Codes/build/config.txt source $scriptDir/../Codes/build/config.txt
codeDir="/Codes/build"
execDir="/Exec"
ResultsDir="/Results"
if [ $# -lt 1 ] if [ $# -lt 1 ]
then then
...@@ -52,7 +49,7 @@ then ...@@ -52,7 +49,7 @@ then
output=$5 output=$5
fi fi
bash $dir$execDir/generalRunCostum.sh $dir $cores $config_file $use_external $outFileIndex $qty bash $PROTEO_HOME$execDir/generalRunCostum.sh $cores $config_file $use_external $outFileIndex $qty
if ! [ -z "$output" ] if ! [ -z "$output" ]
then then
......
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