runBase.sh 899 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
cores=$(bash $PROTEO_HOME$execDir/BashScripts/getCores.sh $partition)
10

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

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

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

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