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

3
#SBATCH -p P1
4
#SBATCH -N 1
iker_martin's avatar
iker_martin committed
5

6
7
partition='P1'

8
source build/config.txt
9
codeDir="/Codes"
10
11
execDir="/Exec"
cores=$(bash $dir$execDir/BashScripts/getCores.sh $partition)
12

13
14
nodelist=$SLURM_JOB_NODELIST
nodes=$SLURM_JOB_NUM_NODES
15
configFile=$1
iker_martin's avatar
iker_martin committed
16
17
18
19
20
21

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

23
echo "MPICH provider=$FI_PROVIDER"
24
mpirun --version
25
26
27
28
numP=$(bash $dir$execDir/BashScripts/getNumPNeeded.sh $configFile 0)
initial_nodelist=$(bash $dir$execDir/BashScripts/createInitialNodelist.sh $numP $cores $nodelist)
echo $initial_nodelist
echo "Test PreRUN $numP $nodelist"
29
mpirun -hosts $initial_nodelist -np $numP $dir$codeDir/build/a.out $configFile $outIndex 
30

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