Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Iker Martín Álvarez
Proteo
Commits
7a64506d
Commit
7a64506d
authored
Jul 02, 2024
by
iker_martin
Browse files
Updated Exec files to consider the new env variables in the configuration when executing
parent
6d368caa
Changes
12
Hide whitespace changes
Inline
Side-by-side
Exec/BashScripts/createInitialNodelist.sh
View file @
7a64506d
#!/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
#====== Do not modify these values =======
codeDir
=
"/Codes/build"
execDir
=
"/Exec"
ResultsDir
=
"/Results"
numP
=
$1
cores
=
$2
nodelist
=
$3
...
...
Exec/BashScripts/getMaxNodesNeeded.sh
View file @
7a64506d
...
...
@@ -2,31 +2,27 @@
# Obtains for a given configuration file how many nodes will be needed
# Parameter 1 - Configuration file name for the emulation.
# Parameter 2 - Base directory of the malleability benchmark
# Parameter 3 - Number of cores in the machines. The machines must be homogenous. Must be a positive number.
# Parameter 2 - Number of cores in the machines. The machines must be homogenous. Must be a positive number.
#====== Do not modify these values =======
codeDir
=
"/Codes/build"
execDir
=
"/Exec"
ResultsDir
=
"/Results"
if
[
"$#"
-lt
"
3
"
]
if
[
"$#"
-lt
"
2
"
]
then
echo
"Not enough arguments"
echo
"Usage -> bash getMaxNodesNeeded.sh Configuration.ini
BaseDirectory
NumCores"
echo
"Usage -> bash getMaxNodesNeeded.sh Configuration.ini NumCores"
exit
-1
fi
config_file
=
$1
dir
=
$2
cores
=
$3
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
)
numP
=
$(
bash
$
PROTEO_HOME
$execDir
/BashScripts/getNumPNeeded.sh
$config_file
$j
)
if
[
"
$numP
"
-gt
"
$max_numP
"
]
;
then
max_numP
=
$numP
...
...
Exec/BashScripts/getNumPNeeded.sh
View file @
7a64506d
...
...
@@ -3,11 +3,6 @@
# 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
group_index
=
$2
...
...
Exec/CheckRun.sh
View file @
7a64506d
...
...
@@ -19,10 +19,7 @@ partition="P1"
scriptDir
=
"
$(
dirname
"
$0
"
)
"
source
$scriptDir
/../Codes/build/config.txt
codeDir
=
"/Codes/"
execDir
=
"/Exec/"
ResultsDir
=
"/Results/"
cores
=
$(
bash
$dir$execDir
/BashScripts/getCores.sh
$partition
)
cores
=
$(
bash
$PROTEO_HOME$execDir
/BashScripts/getCores.sh
$partition
)
if
[
"$#"
-lt
"6"
]
then
...
...
@@ -195,10 +192,10 @@ do
#2 - Obtain number of nodes needed
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
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
done
...
...
Exec/Extrae/worker_extrae.sh
View file @
7a64506d
#!/bin/bash
scriptDir
=
"
$(
dirname
"
$0
"
)
"
source
$scriptDir
/../../Codes/build/config.txt
codeDir
=
"/Codes/build"
export
EXTRAE_CONFIG_FILE
=
extrae.xml
export
LD_PRELOAD
=
$EXTRAE_HOME
/lib/libmpitrace.so
$
dir$codeDir
/./a.out
$
PROTEO_BIN
Exec/Valgrind/worker_valgrind.sh
View file @
7a64506d
#!/bin/bash
scriptDir
=
"
$(
dirname
"
$0
"
)
"
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
Exec/generalRun.sh
View file @
7a64506d
...
...
@@ -5,44 +5,39 @@
# !!!!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.
# Parameter 1 - Base directory of the malleability benchmark
# Parameter 2 - Number of cores in a single machine
# Parameter 3 - Configuration file name for the emulation.
# Parameter 4 - Use Valgrind(1), Extrae(2) or nothing(0).
# Parameter 5 - Index to use for the output files. Must be a positive integer.
# Parameter 6 - Amount of executions per file. Must be a positive number.
# Parameter 1 - Number of cores in a single machine
# Parameter 2 - Configuration file name for the emulation.
# Parameter 3 - Use Valgrind(1), Extrae(2) or nothing(0).
# Parameter 4 - Index to use for the output files. Must be a positive integer.
# Parameter 5 - Amount of executions per file. Must be a positive number.
#====== Do not modify these values =======
codeDir
=
"/Codes/build"
execDir
=
"/Exec"
ResultsDir
=
"/Results"
echo
"START TEST"
#$1 == baseDir
#$2 == cores
#$3 == configFile
#$4 == use_external
#$5 == outFileIndex
#$6 == qty
#$1 == cores
#$2 == configFile
#$3 == use_external
#$4 == outFileIndex
#$5 == qty
echo
$@
if
[
$#
-lt
4
]
if
[
$#
-lt
3
]
then
echo
"Internal ERROR generalRun.sh - Not enough arguments were given"
exit
-1
fi
#READ PARAMETERS AND ENSURE CORRECTNESS
dir
=
$1
cores
=
$2
configFile
=
$3
use_external
=
$4
outFileIndex
=
$5
cores
=
$1
configFile
=
$2
use_external
=
$3
outFileIndex
=
$4
qty
=
1
if
[
$#
-ge
5
]
if
[
$#
-ge
4
]
then
qty
=
$
6
qty
=
$
5
fi
nodelist
=
$SLURM_JOB_NODELIST
...
...
@@ -52,8 +47,8 @@ then
exit
-1
fi
numP
=
$(
bash
$
dir
$execDir
/BashScripts/getNumPNeeded.sh
$configFile
0
)
initial_nodelist
=
$(
bash
$
dir
$execDir
/BashScripts/createInitialNodelist.sh
$numP
$cores
$nodelist
)
numP
=
$(
bash
$
PROTEO_HOME
$execDir
/BashScripts/getNumPNeeded.sh
$configFile
0
)
initial_nodelist
=
$(
bash
$
PROTEO_HOME
$execDir
/BashScripts/createInitialNodelist.sh
$numP
$cores
$nodelist
)
#EXECUTE RUN
echo
"Nodes=
$nodelist
"
...
...
@@ -62,26 +57,26 @@ then
for
((
i
=
0
;
i<qty
;
i++
))
do
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"
done
elif
[
$use_external
-eq
1
]
#VALGRIND
then
cp
$
dir
$execDir
/Valgrind/worker_valgrind.sh
.
cp
$
PROTEO_HOME
$execDir
/Valgrind/worker_valgrind.sh
.
for
((
i
=
0
;
i<qty
;
i++
))
do
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"
done
else
#EXTRAE
cp
$
dir
$execDir
/Extrae/extrae.xml
.
cp
$
dir
$execDir
/Extrae/trace.sh
.
cp
$
dir
$execDir
/Extrae/worker_extrae.sh
.
cp
$
PROTEO_HOME
$execDir
/Extrae/extrae.xml
.
cp
$
PROTEO_HOME
$execDir
/Extrae/trace.sh
.
cp
$
PROTEO_HOME
$execDir
/Extrae/worker_extrae.sh
.
for
((
i
=
0
;
i<qty
;
i++
))
do
#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
fi
...
...
Exec/generalRunCostum.sh
View file @
7a64506d
...
...
@@ -2,26 +2,22 @@
# !!!!This script should only be called by others scripts, do not call it directly!!!
# Runs a given configuration file with the indicated parameters.
# Parameter 1 - Base directory of the malleability benchmark
# Parameter 2 - Number of cores in a single machine
# Parameter 3 - Configuration file name for the emulation.
# Parameter 4 - Use Extrae(1) or not(0).
# Parameter 5 - Index to use for the output files. Must be a positive integer.
# Parameter 6 - Amount of executions per file. Must be a positive number.
# Parameter 1 - Number of cores in a single machine
# Parameter 2 - Configuration file name for the emulation.
# Parameter 3 - Use Extrae(1) or not(0).
# Parameter 4 - Index to use for the output files. Must be a positive integer.
# Parameter 5 - Amount of executions per file. Must be a positive number.
#====== Do not modify these values =======
codeDir
=
"/Codes/build"
execDir
=
"/Exec"
ResultsDir
=
"/Results"
echo
"START TEST"
#$1 == baseDir
#$2 == cores
#$3 == configFile
#$4 == use_external
#$5 == outFileIndex
#$6 == qty
#$1 == cores
#$2 == configFile
#$3 == use_external
#$4 == outFileIndex
#$5 == qty
echo
$@
if
[
$#
-lt
3
]
...
...
@@ -31,36 +27,35 @@ then
fi
#READ PARAMETERS AND ENSURE CORRECTNESS
dir
=
$1
cores
=
$2
configFile
=
$3
cores
=
$1
configFile
=
$2
use_external
=
0
outFileIndex
=
0
qty
=
1
if
[
$#
-ge
4
]
if
[
$#
-ge
3
]
then
use_external
=
$
4
use_external
=
$
3
fi
if
[
$#
-ge
5
]
if
[
$#
-ge
4
]
then
outFileIndex
=
$
5
outFileIndex
=
$
4
fi
if
[
$#
-ge
6
]
if
[
$#
-ge
5
]
then
qty
=
$
6
qty
=
$
5
fi
numP
=
$(
bash
$
dir
$execDir
/BashScripts/getNumPNeeded.sh
$configFile
0
)
numP
=
$(
bash
$
PROTEO_HOME
$execDir
/BashScripts/getNumPNeeded.sh
$configFile
0
)
nodelist
=
$SLURM_JOB_NODELIST
if
[
-z
"
$nodelist
"
]
;
then
nodelist
=
"localhost"
initial_nodelist
=
"localhost"
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
#EXECUTE RUN
...
...
@@ -70,25 +65,25 @@ then
for
((
i
=
0
;
i<qty
;
i++
))
do
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"
done
elif
[
$use_external
-eq
1
]
#VALGRIND
then
cp
$
dir
$execDir
/Valgrind/worker_valgrind.sh
.
cp
$
PROTEO_HOME
$execDir
/Valgrind/worker_valgrind.sh
.
for
((
i
=
0
;
i<qty
;
i++
))
do
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"
done
else
cp
$
dir
$execDir
/Extrae/extrae.xml
.
cp
$
dir
$execDir
/Extrae/trace.sh
.
cp
$
dir
$execDir
/Extrae/worker_extrae.sh
.
cp
$
PROTEO_HOME
$execDir
/Extrae/extrae.xml
.
cp
$
PROTEO_HOME
$execDir
/Extrae/trace.sh
.
cp
$
PROTEO_HOME
$execDir
/Extrae/worker_extrae.sh
.
for
((
i
=
0
;
i<qty
;
i++
))
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
fi
...
...
Exec/multipleRuns.sh
View file @
7a64506d
...
...
@@ -8,14 +8,10 @@
scriptDir
=
"
$(
dirname
"
$0
"
)
"
source
$scriptDir
/../Codes/build/config.txt
codeDir
=
"/Codes"
execDir
=
"/Exec"
ResultsDir
=
"/Results"
complex_file
=
$1
output_name
=
$2
python3
$dir$execDir
/PythonCodes/read_multiple.py
$complex_file
$output_name
echo
"END TEST"
python3
$PROTEO_HOME$execDir
/PythonCodes/read_multiple.py
$complex_file
$output_name
echo
"END GENERATION"
Exec/runAll.sh
View file @
7a64506d
...
...
@@ -10,10 +10,7 @@ exclude="c00,c01,c02"
scriptDir
=
"
$(
dirname
"
$0
"
)
"
source
$scriptDir
/../Codes/build/config.txt
codeDir
=
"/Codes/build"
execDir
=
"/Exec"
ResultsDir
=
"/Results"
cores
=
$(
bash
$dir$execDir
/BashScripts/getCores.sh
$partition
)
cores
=
$(
bash
$PROTEO_HOME$execDir
/BashScripts/getCores.sh
$partition
)
use_extrae
=
0
qty
=
1
...
...
@@ -33,7 +30,7 @@ internalIndex=$(echo $files | tr -cd ' ' | wc -c)
index
=
$((
0
))
for
config_file
in
$files
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
)
if
[[
$outFileIndex
]]
;
then
...
...
@@ -45,6 +42,6 @@ do
#Execute test
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
echo
"End"
Exec/singleRun.sh
View file @
7a64506d
...
...
@@ -15,10 +15,7 @@ exclude="c00,c01,c02"
scriptDir
=
"
$(
dirname
"
$0
"
)
"
source
$scriptDir
/../Codes/build/config.txt
codeDir
=
"/Codes/build"
execDir
=
"/Exec"
ResultsDir
=
"/Results"
cores
=
$(
bash
$dir$execDir
/BashScripts/getCores.sh
$partition
)
cores
=
$(
bash
$PROTEO_HOME$execDir
/BashScripts/getCores.sh
$partition
)
if
[
$#
-lt
1
]
then
...
...
@@ -62,9 +59,9 @@ then
fi
#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
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
"
]
then
...
...
Exec/singleRunCostum.sh
View file @
7a64506d
...
...
@@ -13,9 +13,6 @@ cores=20
scriptDir
=
"
$(
dirname
"
$0
"
)
"
source
$scriptDir
/../Codes/build/config.txt
codeDir
=
"/Codes/build"
execDir
=
"/Exec"
ResultsDir
=
"/Results"
if
[
$#
-lt
1
]
then
...
...
@@ -52,7 +49,7 @@ then
output
=
$5
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
"
]
then
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment