Vous avez reçu un message "Your GitLab account has been locked ..." ? Pas d'inquiétude : lisez cet article https://docs.gricad-pages.univ-grenoble-alpes.fr/help/unlock/

Commit b97a98b3 authored by aumgn's avatar aumgn
Browse files

[exp] Add memory option (for interleave configuration)

parent 6724184d
......@@ -27,25 +27,21 @@ msg() {
usage() {
cat <<HD
Usage: $script [-v] <programs> <pinning> <nodes> <use_perf> <autogroup> <repeat>
Usage: $script [-v] <programs> <pinning> <memories> <nodes> <use_perf> <autogroup> <repeat>
-v toggle verbose mode
<programs> list of programs to run
<pinning> list of values among { cores, nodes, init, subset, none }
<memories> list of values among { default, interleave }
<nodes> list of numbers of nodes
<use_perf> whether ('y') or not ('n') perf should be used
<autogroup> whether ('y') or not ('n') autogroup should be enabled
<repeat> the number of time to run the application for each parameter combinations
Run volrend on 64 cores with and without pinning one time each:
>> $0 volrend "cores none" 8 n n 1
Run volrend and wordcount
with pinning and without pinning,
on 2,3,4,5,6,7,8 nodes
with and without perf,
with and without autogroup,
five times each:
>> $0 "volrend word_count" "cores none" "\$(seq 2 8)" "y n" "y n" 5
>> $0 volrend "cores none" default 8 n n 1
Run varying many options, five times each:
>> $0 "volrend word_count" "cores none" "default interleave" "\$(seq 2 8)" "y n" "y n" 5
HD
}
......@@ -144,6 +140,7 @@ dump_args() {
echo "PROGRAM = $programs" >>$args_file
echo "PINNING = $pinnings" >>$args_file
echo "MEMORY = $memories" >>$args_file
echo "NODES = $nodes_list" >>$args_file
echo "USE_PERF = $use_perfs" >>$args_file
echo "AUTOGROUP = $autogroups" >>$args_file
......@@ -164,12 +161,6 @@ dump_programs() {
}
run_iterations() {
local program=$1; shift
local pinning=$1; shift
local nodes=$1; shift
local use_perf=$1; shift
local autogroup=$1; shift
local threads=$(($nodes * 8))
if [[ $pinning == 'cores' ]]; then
local pin_prefix="$PINTHREADS_BIN -c 0-$((threads-1))"
......@@ -186,16 +177,25 @@ run_iterations() {
exit 34
fi
if [[ $memory == "default" ]]; then
memory_prefix=""
elif [[ $memory == "interleave" ]]; then
memory_prefix="numactl -i all"
else
echo "Unknown memory organisation $memory"
exit 35
fi
if [[ $autogroup == "y" ]]; then
sudo sysctl -q kernel.sched_autogroup_enabled=1
elif [[ $autogroup == "n" ]]; then
sudo sysctl -q kernel.sched_autogroup_enabled=0
else
echo "Unknown autogroup $autogroup"
exit 35
exit 36
fi
printf '[%14s][%6s][%2d][%s][%s] ' $program $pinning $nodes $use_perf $autogroup
printf '[%14s][%6s][%10s][%2d][%s][%s] ' $program $pinning $memory $nodes $use_perf $autogroup
local exp_dir=$TMP_RESULTS_DIR/outputs/$program-$pinning-$nodes-$use_perf-$autogroup
......@@ -215,7 +215,7 @@ run_iterations() {
local output=$iteration_dir/output
local errors=$iteration_dir/error
local cmd_prefix="$perf_prefix $time_prefix $pin_prefix"
local cmd_prefix="$perf_prefix $time_prefix $memory_prefix $pin_prefix"
local cmd="$(command_$program "$cmd_prefix" "$threads")"
echo "#### sudo $cmd" >$iteration_dir/command
......@@ -238,10 +238,12 @@ run_all() {
for program in $programs; do
for pinning in $pinnings; do
for memory in $memories; do
for nodes in $nodes_list; do
for use_perf in $use_perfs; do
for autogroup in $autogroups; do
run_iterations $program $pinning $nodes $use_perf $autogroup
run_iterations
done
done
done
done
......@@ -291,13 +293,14 @@ while [[ $1 == -* ]]; do
esac
done
if [[ $# != 6 ]]; then
if [[ $# != 7 ]]; then
usage
exit 125
fi
programs=$1; shift
pinnings=$1; shift
memories=$1; shift
nodes_list=$1; shift
use_perfs=$1; shift
autogroups=$1; shift
......
Markdown is supported
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