runBase.sh 698 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
aux=$(grep "\[resize0\]" -n $configFile | cut -d ":" -f1)
20
21
read -r ini fin <<<$(echo $aux)
diff=$(( fin - ini ))
22
numP=$(head -$fin $configFile | tail -$diff | cut -d ';' -f1 | grep Procs | cut -d '=' -f2)
23

24
mpirun -np $numP $dir$codeDir/build/a.out $configFile $outIndex $nodelist $nodes
25

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