Skip to content

Instantly share code, notes, and snippets.

@sithhell
Created February 6, 2013 13:33
Show Gist options
  • Save sithhell/4722515 to your computer and use it in GitHub Desktop.
Save sithhell/4722515 to your computer and use it in GitHub Desktop.
#! /bin/bash
#
# Copyright (c) 2011 Thomas Heller
#
# Distributed under the Boost Software License, Version 1.0. (See accompanying
# file BOOST_LICENSE_1_0.rst or copy at http://www.boost.org/LICENSE_1_0.txt)
#
#PBS -N jacobi_super_bench_vega
#PBS -l nodes=vega:ppn=48
LIKWID="/home/heller/local/bin/likwid-pin -q -c"
#. /home/heller/.bashrc
HPX_APP=/home/heller/local/hpx_release/bin/jacobi_hpx_simple
HPX_OPTIONS="--hx 0.0002 --hy 0.00001 --max_iterations 10 --block_size 1000 --cache_block 1000"
OMP_APP=/home/heller/local/hpx_release/bin/jacobi_openmp_simple
OMP_APP_DYN=/home/heller/local/hpx_release/bin/jacobi_openmp_dynamic_simple
OMP_OPTIONS="--hx 0.0002 --hy 0.00001 --max_iterations 10 --block_size 1000 --cache_block 1000"
echo "#sockets #threads/socket #total_threads runs..."
run_bench ()
{
if [ "$1" -gt "1" ]
then
echo -n "hpx $1 $2 $3 "
for run in `seq 1 3`
do
/home/heller/local/bin/numactl -i $5 $LIKWID $4 -s 0x7f $HPX_APP $HPX_OPTIONS -t$3
done
echo ""
echo -n "omp $1 $2 $3 "
for run in `seq 1 3`
do
OMP_NUM_THREADS=$3 /home/heller/local/bin/numactl -i $5 $LIKWID $4 $OMP_APP $OMP_OPTIONS
done
echo ""
echo -n "omp_dynamic $1 $2 $3 "
for run in `seq 1 3`
do
OMP_NUM_THREADS=$3 /home/heller/local/bin/numactl -i $5 $LIKWID $4 $OMP_APP_DYN $OMP_OPTIONS
done
echo ""
else
echo -n "hpx $1 $2 $3 "
for run in `seq 1 3`
do
$LIKWID $4 -s 0x7f $HPX_APP $HPX_OPTIONS -t$3
done
echo ""
echo -n "omp $1 $2 $3 "
for run in `seq 1 3`
do
OMP_NUM_THREADS=$3 $LIKWID $4 $OMP_APP $OMP_OPTIONS
done
echo ""
echo -n "omp dynamic $1 $2 $3 "
for run in `seq 1 3`
do
OMP_NUM_THREADS=$3 $LIKWID $4 $OMP_APP_DYN $OMP_OPTIONS
done
echo ""
fi
}
# 1 Socket
for threads in 1 2 4 6
do
run_bench 1 $threads $threads S0:0-5 ""
done
# 2 Sockets
sockets=2
threads=2
threads_per_socket=1
run_bench $sockets $threads_per_socket $threads S0:0@S1:0 0,1
threads=4
threads_per_socket=2
run_bench $sockets $threads_per_socket $threads S0:0,1@S1:0,1 0,1
threads=8
threads_per_socket=4
run_bench $sockets $threads_per_socket $threads S0:0-3@S1:0-3 0,1
threads=12
threads_per_socket=6
run_bench $sockets $threads_per_socket $threads S0:0-5@S1:0-5 0,1
sockets=3
threads=3
threads_per_socket=1
run_bench $sockets $threads_per_socket $threads S0:0@S1:0@S2:0 0-2
threads=6
threads_per_socket=2
run_bench $sockets $threads_per_socket $threads S0:0,1@S1:0,1@S2:0,1 0-2
threads=12
threads_per_socket=4
run_bench $sockets $threads_per_socket $threads S0:0-3@S1:0-3@S2:0-3 0-2
threads=18
threads_per_socket=6
run_bench $sockets $threads_per_socket $threads S0:0-5@S1:0-5@S2:0-5 0-2
sockets=4
threads=4
threads_per_socket=1
run_bench $sockets $threads_per_socket $threads S0:0@S1:0@S2:0@S3:0 0-3
threads=8
threads_per_socket=2
run_bench $sockets $threads_per_socket $threads S0:0,1@S1:0,1@S2:0,1@S3:0,1 0-3
threads=16
threads_per_socket=4
run_bench $sockets $threads_per_socket $threads S0:0-3@S1:0-3@S2:0-3@S3:0-3 0-3
threads=24
threads_per_socket=6
run_bench $sockets $threads_per_socket $threads S0:0-5@S1:0-5@S2:0-5@S3:0-5 0-3
sockets=5
threads=5
threads_per_socket=1
run_bench $sockets $threads_per_socket $threads S0:0@S1:0@S2:0@S3:0@S4:0 0-4
threads=10
threads_per_socket=2
run_bench $sockets $threads_per_socket $threads S0:0,1@S1:0,1@S2:0,1@S3:0,1@S4:0,1 0-4
threads=20
threads_per_socket=4
run_bench $sockets $threads_per_socket $threads S0:0-3@S1:0-3@S2:0-3@S3:0-3@S4:0-3 0-4
threads=30
threads_per_socket=6
run_bench $sockets $threads_per_socket $threads S0:0-5@S1:0-5@S2:0-5@S3:0-5@S4:0-5 0-4
sockets=6
threads=6
threads_per_socket=1
run_bench $sockets $threads_per_socket $threads S0:0@S1:0@S2:0@S3:0@S4:0@S5:0 0-5
threads=12
threads_per_socket=2
run_bench $sockets $threads_per_socket $threads S0:0,1@S1:0,1@S2:0,1@S3:0,1@S4:0,1@S5:0,1 0-5
threads=24
threads_per_socket=4
run_bench $sockets $threads_per_socket $threads S0:0-3@S1:0-3@S2:0-3@S3:0-3@S4:0-3@S5:0-3 0-5
threads=36
threads_per_socket=6
run_bench $sockets $threads_per_socket $threads S0:0-5@S1:0-5@S2:0-5@S3:0-5@S4:0-5@S5:0-5 0-5
sockets=7
threads=7
threads_per_socket=1
run_bench $sockets $threads_per_socket $threads S0:0@S1:0@S2:0@S3:0@S4:0@S5:0@S6:0 0-6
threads=14
threads_per_socket=2
run_bench $sockets $threads_per_socket $threads S0:0,1@S1:0,1@S2:0,1@S3:0,1@S4:0,1@S5:0,1@S6:0,1 0-6
threads=28
threads_per_socket=4
run_bench $sockets $threads_per_socket $threads S0:0-3@S1:0-3@S2:0-3@S3:0-3@S4:0-3@S5:0-3@S6:0-3 0-6
threads=42
threads_per_socket=6
run_bench $sockets $threads_per_socket $threads S0:0-5@S1:0-5@S2:0-5@S3:0-5@S4:0-5@S5:0-5@S6:0-5 0-6
sockets=8
threads=8
threads_per_socket=1
run_bench $sockets $threads_per_socket $threads S0:0@S1:0@S2:0@S3:0@S4:0@S5:0@S6:0@S7:0 0-7
threads=16
threads_per_socket=2
run_bench $sockets $threads_per_socket $threads S0:0,1@S1:0,1@S2:0,1@S3:0,1@S4:0,1@S5:0,1@S6:0,1@S7:0-5 0-7
threads=32
threads_per_socket=4
run_bench $sockets $threads_per_socket $threads S0:0-3@S1:0-3@S2:0-3@S3:0-3@S4:0-3@S5:0-3@S6:0-3@S7:0-5 0-7
threads=48
threads_per_socket=6
run_bench $sockets $threads_per_socket $threads S0:0-5@S1:0-5@S2:0-5@S3:0-5@S4:0-5@S5:0-5@S6:0-5@S7:0-5 0-7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment