From 04680c072188a9b488710251ce1e76747887c202 Mon Sep 17 00:00:00 2001 From: Dominic Kempf <dominic.kempf@iwr.uni-heidelberg.de> Date: Tue, 18 Apr 2017 13:09:10 +0200 Subject: [PATCH] Have a script that runs timings manually --- bin/CMakeLists.txt | 1 + bin/knltimings.sh | 26 ++++++++++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100755 bin/knltimings.sh diff --git a/bin/CMakeLists.txt b/bin/CMakeLists.txt index e8ea4bd4..36a037e3 100644 --- a/bin/CMakeLists.txt +++ b/bin/CMakeLists.txt @@ -11,4 +11,5 @@ dune_install_python_script(SCRIPT performance_regression.py ) dune_symlink_to_source_files(FILES make_graph.sh + knltimings.sh ) diff --git a/bin/knltimings.sh b/bin/knltimings.sh new file mode 100755 index 00000000..f2d52108 --- /dev/null +++ b/bin/knltimings.sh @@ -0,0 +1,26 @@ +#!/bin/bash + +# If an argument was given use it as the working directory +if [ $# -eq 1 ] +then + cd $1 +fi + +# Search for runnable executables +FILES=$(ls *.ini) +for inifile in $FILES +do + line=$(grep ^"opcounter = " $inifile) + extract=${line##opcounter = } + UPPER=10 + if [ $extract -eq 1 ] + then + UPPER=1 + fi + COUNT=0 + while [ $COUNT -lt $UPPER ]; do + exec=${inifile%.ini} + mpirun -np 66 ./$exec $inifile + COUNT=$((COUNT + 1)) + done +done -- GitLab