runBase.sh 907 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
13
configFile=$1
outIndex=$2
14

iker_martin's avatar
iker_martin committed
15
echo "MPICH"
16
#module load mpich-3.4.1-noucx
iker_martin's avatar
iker_martin committed
17
18
#export HYDRA_DEBUG=1

19
20
21
22
aux=$(grep "\[resize0\]" -n $1 | cut -d ":" -f1)
read -r ini fin <<<$(echo $aux)
diff=$(( fin - ini ))
numP=$(head -$fin $1 | tail -$diff | cut -d ';' -f1 | grep Procs | cut -d '=' -f2)
23

24
#mpirun -np 4 /home/martini/Instalaciones/valgrind-mpich-3.4.1-noucx/bin/valgrind --leak-check=full --show-leak-kinds=all --log-file=nc.vg.%p $dir$codeDir/a.out $configFile $outIndex $nodelist $nodes
25
mpirun -np $numP $dir$codeDir/build/a.out $configFile $outIndex $nodelist $nodes
26
27
rm hostfile.o$SLURM_JOB_ID

28
echo "END RUN"
29
sed -i 's/application called MPI_Abort(MPI_COMM_WORLD, -100) - process/shrink cleaning/g' slurm-$SLURM_JOB_ID.out