Commit 8ad61042 authored by iker_martin's avatar iker_martin
Browse files

Added Exec scripts for performing Extrae Runs

parent 92767020
<?xml version='1.0'?>
<trace enabled="yes"
home="/home/martini/extrae-mpich-3.4.1-noucx"
initial-mode="detail"
type="paraver"
>
<mpi enabled="yes">
<counters enabled="yes" />
<comm-calls enabled="yes" />
</mpi>
<openmp enabled="no" ompt="no">
<locks enabled="no" />
<taskloop enabled="no" />
<counters enabled="yes" />
</openmp>
<pthread enabled="no">
<locks enabled="no" />
<counters enabled="yes" />
</pthread>
<callers enabled="yes">
<mpi enabled="yes">1-3</mpi>
<sampling enabled="no">1-5</sampling>
<dynamic-memory enabled="no">1-3</dynamic-memory>
<input-output enabled="no">1-3</input-output>
<syscall enabled="no">1-3</syscall>
</callers>
<user-functions enabled="no" list="/home/bsc41/bsc41273/user-functions.dat" exclude-automatic-functions="no">
<counters enabled="yes" />
</user-functions>
<counters enabled="yes">
<cpu enabled="yes" starting-set-distribution="1">
<set enabled="yes" domain="all" changeat-time="0">
PAPI_TOT_INS,PAPI_TOT_CYC
</set>
</cpu>
<network enabled="no" />
<resource-usage enabled="no" />
<memory-usage enabled="no" />
</counters>
<storage enabled="no">
<trace-prefix enabled="yes">TRACE</trace-prefix>
<size enabled="no">5</size>
<temporal-directory enabled="yes">/scratch</temporal-directory>
<final-directory enabled="yes">/gpfs/scratch/bsc41/bsc41273</final-directory>
</storage>
<buffer enabled="yes">
<size enabled="yes">5000000</size>
<circular enabled="no" />
</buffer>
<trace-control enabled="no">
<file enabled="no" frequency="5M">/gpfs/scratch/bsc41/bsc41273/control</file>
<global-ops enabled="no"></global-ops>
</trace-control>
<others enabled="yes">
<minimum-time enabled="no">10M</minimum-time>
<finalize-on-signal enabled="yes"
SIGUSR1="no" SIGUSR2="no" SIGINT="yes"
SIGQUIT="yes" SIGTERM="yes" SIGXCPU="yes"
SIGFPE="yes" SIGSEGV="yes" SIGABRT="yes"
/>
<flush-sampling-buffer-at-instrumentation-point enabled="yes" />
</others>
<bursts enabled="no">
<threshold enabled="yes">500u</threshold>
<mpi-statistics enabled="yes" />
</bursts>
<sampling enabled="no" type="default" period="50m" variability="10m" />
<dynamic-memory enabled="no">
<alloc enabled="yes" threshold="32768" />
<free enabled="yes" />
</dynamic-memory>
<pebs-sampling enabled="no">
<loads enabled="no" frequency="100" minimum-latency="10" />
<stores enabled="no" frequency="50">
<offcore-l3-misses enabled="no" /> <!-- Read together with stores samples. -->
</stores>
<load-l3-misses enabled="no" frequency="25" />
</pebs-sampling>
<input-output enabled="no" internals="no"/>
<syscall enabled="no" />
<merge enabled="yes"
synchronization="default"
tree-fan-out="16"
max-memory="512"
joint-states="yes"
keep-mpits="yes"
translate-addresses="yes"
sort-addresses="yes"
translate-data-addresses="yes"
overwrite="yes"
/>
</trace>
#!/bin/bash
#This script should only be called by others scripts, do not call it directly
#SBATCH --exclude=c02,c01,c00
#SBATCH -p P1
codeDir="/Codes/build"
echo "START TEST"
#$1 == baseDir
#$2 == configFile
#$3 == use_extrae
#$4 == outFileIndex
echo $@
if [ $# -lt 3 ]
then
echo "Internal ERROR generalRun.sh - Not enough arguments were given"
exit -1
fi
dir=$1
configFile=$2
use_extrae=$3
outFileIndex=$4
aux=$(grep "\[resize0\]" -n $configFile | cut -d ":" -f1)
read -r ini fin <<<$(echo $aux)
diff=$(( fin - ini ))
numP=$(head -$fin $configFile | tail -$diff | cut -d ';' -f1 | grep Procs | cut -d '=' -f2)
echo "Nodes=$SLURM_JOB_NODELIST"
if [ $use_extrae -ne 1 ]
then
mpirun -np $numP $dir$codeDir/a.out $configFile $outFileIndex $SLURM_JOB_NODELIST $SLURM_JOB_NUM_NODES
else
# EXTRAE Configuration
export EXTRAE_CONFIG_FILE=./extrae.xml
export LD_PRELOAD=${EXTRAE_HOME}/lib/libmpitrace.so
srun -n$numP --mpi=pmi2 $dir$codeDir/a.out $configFile $outFileIndex $SLURM_JOB_NODELIST $SLURM_JOB_NUM_NODES
fi
echo "END TEST"
sed -i 's/application called MPI_Abort(MPI_COMM_WORLD, -100) - process/shrink cleaning/g' slurm-$SLURM_JOB_ID.out
dir="/home/martini/malleability_benchmark"
#procs=(2 10 20 40 80 120 160)
procs=(2)
cores=20
#====== Do not modify these values =======
codeDir="/Codes/build"
execDir="/Exec"
ResultsDir="/Results"
use_extrae=1
#Extrae config
qty=1
outFileIndex=$2
if [ $# -ge 1 ]
then
qty=$1
fi
for proc in "${procs[@]}"
do
echo "------------------------------------------run np=$proc"
node_qty=$(($proc / $cores))
if [ $node_qty -eq 0 ]
then
node_qty=1
fi
config_file="test$proc"".ini"
upper_dir="Proc$proc"
mkdir $upper_dir
cd $upper_dir
for ((i=0; i<qty; i++))
do
# Move data to new directory
lower_dir="Run$i"
mkdir $lower_dir
cd $lower_dir
cp $dir$execDir/extrae.xml .
cp ../../$config_file .
#pwd
sbatch -p P1 -N $node_qty $dir$execDir/generalRun.sh $dir $config_file $use_extrae $outFileIndex
cd ..
done
cd ..
done
echo "End"
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment