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
7b80c0d2
Commit
7b80c0d2
authored
Dec 22, 2023
by
iker_martin
Browse files
Automatic directory finder when making the installation
parent
8984a81d
Changes
13
Hide whitespace changes
Inline
Side-by-side
Codes/Makefile
View file @
7b80c0d2
...
...
@@ -10,6 +10,7 @@ DEF =
# Final binary
BIN
=
a.out
CONFIG
=
config.txt
# Put all auto generated stuff to this build dir.
BUILD_DIR
=
./build
...
...
@@ -27,6 +28,14 @@ DEP = $(OBJ:%.o=%.d)
# Default target named after the binary.
$(BIN)
:
$(BUILD_DIR)/$(BIN)
# Default configuration file
$(CONFIG)
:
$(BUILD_DIR)/$(CONFIG)
$(BUILD_DIR)/$(CONFIG)
:
mkdir
-p
$
(
@D
)
@
echo
-n
"dir=
\"
"
>
$(BUILD_DIR)
/
$(CONFIG)
@
realpath
-z
$$
(
echo
"
$
$(pwd)
/.."
)
>>
$(BUILD_DIR)
/
$(CONFIG)
@
echo
"
\"
"
>>
$(BUILD_DIR)
/
$(CONFIG)
# Actual target of the binary - depends on all .o files.
$(BUILD_DIR)/$(BIN)
:
$(OBJ)
$(MCC)
$(C_FLAGS)
$^
-o
$@
$(LD_FLAGS)
...
...
@@ -45,12 +54,12 @@ $(BUILD_DIR)/%.o : %.c
$(MCC)
$(C_FLAGS)
$(DEF)
-MMD
-c
$<
-o
$@
clean
:
-
rm
$(BUILD_DIR)
/
$(BIN)
$(OBJ)
$(DEP)
-
rm
$(BUILD_DIR)
/
$(BIN)
$(BUILD_DIR)
/
$(CONFIG)
$(OBJ)
$(DEP)
clear
:
-
rm
-rf
$(BUILDDIR)
install
:
$(BIN)
install
:
$(BIN)
$(CONFIG)
echo
"Done"
# Builds target with slurm
...
...
Codes/runBase.sh
View file @
7b80c0d2
...
...
@@ -4,9 +4,10 @@
#SBATCH -N 1
#SBATCH --exclude=c01,c00,c02
dir
=
"/home/martini/malleability_benchmark"
partition
=
'P1'
scriptDir
=
"
$(
dirname
"
$0
"
)
"
source
$scriptDir
/build/config.txt
codeDir
=
"/Codes"
execDir
=
"/Exec"
cores
=
$(
bash
$dir$execDir
/BashScripts/getCores.sh
$partition
)
...
...
Codes/runTrace.sh
View file @
7b80c0d2
...
...
@@ -4,7 +4,8 @@
#SBATCH -N 1
#SBATCH --exclude=c01,c00,c02
dir
=
"/home/martini/malleability_benchmark"
scriptDir
=
"
$(
dirname
"
$0
"
)
"
source
$scriptDir
/build/config.txt
codeDir
=
"/Codes/build"
resultsDir
=
"/Results"
execDir
=
"/Exec"
...
...
Codes/runValgrind.sh
View file @
7b80c0d2
...
...
@@ -4,7 +4,8 @@
#SBATCH -N 1
#SBATCH --exclude=c01,c00,c02
dir
=
"/home/martini/malleability_benchmark"
scriptDir
=
"
$(
dirname
"
$0
"
)
"
source
$scriptDir
/build/config.txt
codeDir
=
"/Codes"
execDir
=
"/Exec"
...
...
Exec/BashScripts/createInitialNodelist.sh
View file @
7b80c0d2
#!/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 =======
...
...
Exec/BashScripts/getCores.sh
100644 → 100755
View file @
7b80c0d2
File mode changed from 100644 to 100755
Exec/BashScripts/getNumPNeeded.sh
View file @
7b80c0d2
#!/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 =======
...
...
Exec/CheckRun.sh
View file @
7b80c0d2
#!/bin/bash
dir
=
"/home/martini/malleability_benchmark/"
partition
=
"P1"
# Checks if all the runs in the current working directory performed under a
...
...
@@ -18,6 +17,8 @@ partition="P1"
# Must be a positive integer.
#====== Do not modify the following values =======
scriptDir
=
"
$(
dirname
"
$0
"
)
"
source
$scriptDir
/../Codes/build/config.txt
codeDir
=
"Codes/"
execDir
=
"Exec/"
ResultsDir
=
"Results/"
...
...
@@ -68,7 +69,7 @@ fi
# then the scripts exits.
#The user must figure out what to do with those runs.
qtyG
=
$(
ls
R
*
_Global.out |
wc
-l
)
qtyG
=
$((
$qtyG
*
2
))
qtyG
=
$((
$qtyG
*
$total_groups
))
qtyL
=
$(
ls
R
*
_G
*
N
*
.out |
wc
-l
)
if
[
"
$qtyG
"
==
"
$qtyL
"
]
then
...
...
Exec/Extrae/trace_worker.sh
View file @
7b80c0d2
#!/bin/bash
dir
=
"/home/martini/malleability_benchmark"
scriptDir
=
"
$(
dirname
"
$0
"
)
"
source
$scriptDir
/../../Codes/build/config.txt
codeDir
=
"/Codes/build"
export
EXTRAE_CONFIG_FILE
=
extrae.xml
...
...
Exec/multipleRuns.sh
View file @
7b80c0d2
#!/bin/bash
dir
=
"/home/martini/malleability_benchmark/"
# Creates a directory with all possible and valid combinations of configuration files
# that can be created from a given complex configuration file.
# Parameter 1: Complex configuration file name.
# Parameter 2: Common output name of the output configuration files. It will be appended an index to each of them.
#====== Do not modify these values =======
scriptDir
=
"
$(
dirname
"
$0
"
)
"
source
$scriptDir
/../Codes/build/config.txt
codeDir
=
"Codes/"
execDir
=
"Exec/"
ResultsDir
=
"Results/"
...
...
Exec/runAll.sh
View file @
7b80c0d2
#!/bin/bash
dir
=
"/home/martini/malleability_benchmark"
partition
=
"P1"
exclude
=
"c00,c01,c02"
...
...
@@ -9,6 +8,8 @@ exclude="c00,c01,c02"
# Parameter 2(Optional) - Maximum amount of time in seconds needed by a single execution. Default value is 0, which indicates infinite time. Must be a positive integer.
#====== Do not modify these values =======
scriptDir
=
"
$(
dirname
"
$0
"
)
"
source
$scriptDir
/../Codes/build/config.txt
codeDir
=
"/Codes/build"
execDir
=
"/Exec"
ResultsDir
=
"/Results"
...
...
Exec/singleRun.sh
View file @
7b80c0d2
#!/bin/bash
dir
=
"/home/martini/malleability_benchmark"
partition
=
"P1"
exclude
=
"c00,c01,c02"
...
...
@@ -14,6 +13,8 @@ exclude="c00,c01,c02"
# Parameter 6(Optional): Path where the output files should be saved.
#====== Do not modify these values =======
scriptDir
=
"
$(
dirname
"
$0
"
)
"
source
$scriptDir
/../Codes/build/config.txt
codeDir
=
"/Codes/build"
execDir
=
"/Exec"
ResultsDir
=
"/Results"
...
...
Exec/singleRunCostum.sh
View file @
7b80c0d2
#!/bin/bash
dir
=
"/home/martini/malleability_benchmark"
cores
=
20
# Executes a given configuration file. This script can be called with Slurm commands to
...
...
@@ -12,6 +11,8 @@ cores=20
# Parameter 5(Optional): Path where the output files should be saved.
#====== Do not modify these values =======
scriptDir
=
"
$(
dirname
"
$0
"
)
"
source
$scriptDir
/../Codes/build/config.txt
codeDir
=
"/Codes/build"
execDir
=
"/Exec"
ResultsDir
=
"/Results"
...
...
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