runValgrind.sh 1.33 KB
Newer Older
iker_martin's avatar
iker_martin committed
1
2
3
4
5
6
#!/bin/bash

#SBATCH -p P1
#SBATCH -N 1
#SBATCH --exclude=c01,c00,c02

7
source build/config.txt
iker_martin's avatar
iker_martin committed
8
codeDir="/Codes"
9
execDir="/Exec"
10
cores=$(bash $dir$execDir/BashScripts/getCores.sh $partition)
iker_martin's avatar
iker_martin committed
11

12
13
#configFile=$1
#outIndex=$2
iker_martin's avatar
iker_martin committed
14

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

19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#mpirun --version
#numP=$(bash $dir$execDir/BashScripts/getNumPNeeded.sh $configFile 0)
#mpirun -np $numP valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes --trace-children=yes --log-file=nc.vg.%p $dir$codeDir/build/a.out $configFile $outIndex

nodelist=$SLURM_JOB_NODELIST
nodes=$SLURM_JOB_NUM_NODES
configFile=$1

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

echo "MPICH provider=$FI_PROVIDER"
34
mpirun --version
35
numP=$(bash $dir$execDir/BashScripts/getNumPNeeded.sh $configFile 0)
36
37
38
39
initial_nodelist=$(bash $dir$execDir/BashScripts/createInitialNodelist.sh $numP $cores $nodelist)
echo $initial_nodelist
echo "Test PreRUN $numP $nodelist"
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 $dir$codeDir/build/a.out $configFile $outIndex 
iker_martin's avatar
iker_martin committed
40
41
42

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