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

Iker Martín's avatar
Iker Martín committed
3
#SBATCH -p P1
4
#SBATCH -N 1
Iker Martín's avatar
Iker Martín committed
5

Iker Martín Álvarez's avatar
Iker Martín Álvarez committed
6
7
8
9
partition='P1'

source build/config.txt
cores=$(bash $PROTEO_HOME$execDir/BashScripts/getCores.sh $partition)
Iker Martín's avatar
Iker Martín committed
10
11
12

nodelist=$SLURM_JOB_NODELIST
nodes=$SLURM_JOB_NUM_NODES
Iker Martín Álvarez's avatar
Iker Martín Álvarez committed
13
configFile=$1
iker_martin's avatar
iker_martin committed
14

Iker Martín Álvarez's avatar
Iker Martín Álvarez committed
15
16
17
18
19
outIndex=0
if [ $# -ge 2 ]
then
  outIndex=$2 
fi
20

Iker Martín Álvarez's avatar
Iker Martín Álvarez committed
21
22
23
24
25
26
27
echo "MPICH provider=$FI_PROVIDER"
mpirun --version
numP=$(bash $PROTEO_HOME$execDir/BashScripts/getNumPNeeded.sh $configFile 0)
initial_nodelist=$(bash $PROTEO_HOME$execDir/BashScripts/createInitialNodelist.sh $numP $cores $nodelist)
echo $initial_nodelist
echo "Test PreRUN $numP $nodelist"
mpirun -hosts $initial_nodelist -np $numP $PROTEO_BIN $configFile $outIndex 
28

29
echo "END RUN"
Iker Martín's avatar
Iker Martín committed
30
sed -i 's/application called MPI_Abort(MPI_COMM_WORLD, -100) - process/shrink cleaning/g' slurm-$SLURM_JOB_ID.out
Iker Martín Álvarez's avatar
Iker Martín Álvarez committed
31
32
33
sed -i 's/Abort(-100)/shrink cleaning/g' slurm-$SLURM_JOB_ID.out
MAM_ID=$(($SLURM_JOB_ID % 1000))
rm MAM_HF_ID*$MAM_ID*S*.tmp