runBase.sh 947 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
#SBATCH --mem-per-cpu=6000
#SBATCH --exclusive
iker_martin's avatar
iker_martin committed
7

8
9
partition='P1'

10
source build/config.txt
11
cores=$(bash $PROTEO_HOME$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

outIndex=0
if [ $# -ge 2 ]
then
20
  outIndex=$2 
iker_martin's avatar
iker_martin committed
21
fi
22

23
echo "MPICH provider=$FI_PROVIDER"
24
mpirun --version
25
26
numP=$(bash $PROTEO_HOME$execDir/BashScripts/getNumPNeeded.sh $configFile 0)
initial_nodelist=$(bash $PROTEO_HOME$execDir/BashScripts/createInitialNodelist.sh $numP $cores $nodelist)
27
28
echo $initial_nodelist
echo "Test PreRUN $numP $nodelist"
29
mpirun -hosts $initial_nodelist -np $numP $PROTEO_BIN $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
34
35
MAM_ID=$(($SLURM_JOB_ID % 1000))
rm MAM_HF_ID*$MAM_ID*S*.tmp