diff --git a/benchmarks/README.md b/benchmarks/README.md index aca2fb77d1c79b98caf17c76ddc32f0048e657b4..d802f75e3bd5dd8de3fdef9c6de5845bd94251f5 100644 --- a/benchmarks/README.md +++ b/benchmarks/README.md @@ -48,7 +48,7 @@ In general, we can divide the number of all tasks in **four steps**: Go inside of `copy/` and run ``` -./run_copy.sh ARCH +./run_copy_likwid.sh ARCH ``` For help run this script with `--help`. @@ -152,4 +152,4 @@ lbmpy_orientation='v' Additionally to the plots, all lbmpy results are also shown in a queryable dataframe and the average speedup by using the `split` and `nontemporal` option -as well as the parameters of the fastest kernel are given. \ No newline at end of file +as well as the parameters of the fastest kernel are given. diff --git a/benchmarks/copy/run_copy_likwid.sh b/benchmarks/copy/run_copy_likwid.sh new file mode 100755 index 0000000000000000000000000000000000000000..1ab0f593ed8aa87788d3aa31cd1a05263f2e49fd --- /dev/null +++ b/benchmarks/copy/run_copy_likwid.sh @@ -0,0 +1,59 @@ +#!/bin/bash + +module load likwid + +CSV_FILE="../results_copy.csv" + +# Check parameter +while test $# -gt 0; do + case "$1" in + -h|--help) + echo -e "Usage: ./run_copy.sh [ARCH]\n" + echo -e " ARCH Target architecture. One of [IVB, HSW, SKL].\n" + exit 0 + ;; + *) + ARCH=`echo $1 | awk '{print tolower($0)}'` + ARCH_UP=`echo $1 | awk '{print toupper($0)}'` + shift + ;; + esac +done + +if [ -z $ARCH ]; then + echo "Specify target architecture [IVB, HSW, SKL]" + exit -1 +fi + +case $ARCH in + "skl") + TYPE="copy_avx512" + ;; + "hsw") + TYPE="copy_avx" + ;; + "ivb") + TYPE="copy_sse" + ;; + *) + echo "Target architecture '$ARCH' not supported." + exit -1 + ;; +esac + +# Create new CSV if it does not exist already +if [ ! -f $CSV_FILE ]; then + echo "size(KB),bandwidth(MB/s),arch" > $CSV_FILE +fi + +# Run benchmark +for size in `cat sizes.dat`; do + bw=`likwid-bench -t $TYPE -w S0:${size}kB:1 | grep MByte/s | awk '{print $2}'` + echo "$size , $bw, $ARCH_UP" >> $CSV_FILE +done + +#./a.copy.$ARCH | tee tmp$ARCH.dat +#cat tmp$ARCH.dat | sort -nk1 > out.copy.$ARCH +#rm tmp$ARCH.dat + +#awk -v arch="$ARCH_UP" 'NR>2 {print $1, ",", $7, ",", arch}' out.copy.$ARCH >> $CSV_FILE diff --git a/benchmarks/copy/sizes.dat b/benchmarks/copy/sizes.dat new file mode 100644 index 0000000000000000000000000000000000000000..c9bc8845dd4826803f79e15bcbbf89933184b569 --- /dev/null +++ b/benchmarks/copy/sizes.dat @@ -0,0 +1,71 @@ +5.6 +7.2 +9.2 +12.3 +15.9 +20.5 +27.1 +35.3 +45.6 +59.4 +74.8 +77.3 +93.7 +100.9 +117.2 +131.1 +146.4 +170.5 +183.3 +222.2 +229.4 +286.7 +288.8 +358.4 +448.0 +560.1 +700.4 +875.5 +1094.7 +1368.1 +1710.1 +2138.1 +2672.6 +3340.8 +4175.9 +5219.8 +6524.9 +8156.2 +10195.5 +12744.7 +15930.9 +19913.2 +24891.9 +31114.8 +38893.6 +48617.0 +60771.3 +75964.4 +94955.5 +118694.4 +148367.9 +185460.2 +231824.9 +289781.2 +362226.7 +452783.6 +565979.6 +707474.4 +884343.3 +1105429.5 +1381786.6 +1727233.5 +2159042.0 +2698802.2 +3373503.0 +4216879.1 +5271098.9 +6588873.2 +8236091.9 +10295114.8 +12868893.7