singleRunCostum.sh 1.46 KB
Newer Older
1
2
3
#!/bin/bash

dir="/home/martini/malleability_benchmark"
4
cores=20
5

6
7
# Executes a given configuration file. This script can be called with Slurm commands to 
#   choose the desired user configuration.
8
9
10
11
12
13
14
15
16
17
18
# Parameter 1: Configuration file name for the emulation.
# Parameter 2(Optional): Index to use for the output files. Must be a positive integer.
# Parameter 3(Optional): Number of repetitions to perform. Must be a positive integer.
# Parameter 4(Optional): Use Extrae(1) or not(0).
# Parameter 5(Optional): Path where the output files should be saved. 
#====== Do not modify these values =======

codeDir="/Codes/build"
execDir="/Exec"
ResultsDir="/Results"

iker_martin's avatar
iker_martin committed
19
if [ $# -lt 1 ]
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
then
  echo "Not enough arguments. Usage:"
  echo "singleRunCostum.sh config.ini [outFileIndex] [Qty] [Use Extrae] [Output path]"
  exit 1
fi

#$1 == configFile
#$2 == outFileIndex
#$3 == Qty of repetitions
#$4 == Use extrae NO(0) YES(1)
#$5 == Output path

config_file=$1
outFileIndex=0
qty=1
use_extrae=0

iker_martin's avatar
iker_martin committed
37
if [ $# -ge 2 ]
38
39
40
then
  outFileIndex=$2
fi
iker_martin's avatar
iker_martin committed
41
if [ $# -ge 3 ]
42
43
44
then
  qty=$3
fi
iker_martin's avatar
iker_martin committed
45
if [ $# -ge 4 ]
46
47
48
then
  use_extrae=$4
fi
iker_martin's avatar
iker_martin committed
49
if [ $# -ge 5 ]
50
51
52
53
then
  output=$5
fi

54
bash $dir$execDir/generalRunCostum.sh $dir $cores $config_file $use_extrae $outFileIndex $qty
55
56
57
58
59
60
61
62
63
64
65
66
67
68

if ! [ -z "$output" ]
then
  mkdir -p $output
  echo "Moving data to $output\nMoved files:"
  ls R${outFileIndex}_G*
  mv R${outFileIndex}_G* $output
  if [ "$use_extrae" -eq 1 ]
  then
    mv a.out.* $output
    mv TRACE* $output
    mv set-0/ $output
  fi
fi