runBase.sh 894 Bytes
Newer Older
iker_martin's avatar
iker_martin committed
1
2
#!/bin/bash

3
#SBATCH -p P1
4
#SBATCH -N 1
5
#SBATCH --exclude=c01,c00,c02
iker_martin's avatar
iker_martin committed
6

7
8
9
dir="/home/martini/malleability_benchmark"
codeDir="/Codes"

10
11
nodelist=$SLURM_JOB_NODELIST
nodes=$SLURM_JOB_NUM_NODES
12
configFile=$1
iker_martin's avatar
iker_martin committed
13
14
15
16
17
18

outIndex=0
if [ $# -ge 2 ]
then
  outIndex=$2
fi
19

iker_martin's avatar
iker_martin committed
20
echo "MPICH"
21
#module load mpich-3.4.1-noucx
iker_martin's avatar
iker_martin committed
22
23
#export HYDRA_DEBUG=1

24
aux=$(grep "\[resize0\]" -n $configFile | cut -d ":" -f1)
25
26
read -r ini fin <<<$(echo $aux)
diff=$(( fin - ini ))
27
numP=$(head -$fin $configFile | tail -$diff | cut -d ';' -f1 | grep Procs | cut -d '=' -f2)
28

29
30
ls /home/martini/malleability_benchmark/Codes/build/a.out

iker_martin's avatar
iker_martin committed
31
echo "Test PreRUN $numP $nodes"
32
mpirun -np $numP $dir$codeDir/build/a.out $configFile $outIndex $nodelist $nodes
33

34
echo "END RUN"
35
sed -i 's/application called MPI_Abort(MPI_COMM_WORLD, -100) - process/shrink cleaning/g' slurm-$SLURM_JOB_ID.out
36
37
38
sed -i 's/Abort(-100)/shrink cleaning/g' slurm-$SLURM_JOB_ID.out