소스 검색

Add script to plot cholesky simgrid performance

Samuel Thibault 6 년 전
부모
커밋
d24a206632
3개의 변경된 파일69개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      configure.ac
  2. 6 0
      examples/Makefile.am
  3. 62 0
      examples/cholesky/cholesky.sh

+ 1 - 0
configure.ac

@@ -3413,6 +3413,7 @@ AC_CONFIG_COMMANDS([executable-scripts], [
   test -e examples/heat/heat.sh || ln -sf $ac_abs_top_srcdir/examples/heat/heat.sh examples/heat/
   mkdir -p examples/lu
   test -e examples/lu/lu.sh || ln -sf $ac_abs_top_srcdir/examples/lu/lu.sh examples/lu/
+  test -e examples/cholesky/cholesky.sh || ln -sf $ac_abs_top_srcdir/examples/cholesky/cholesky.sh examples/cholesky/
   test -e tools/starpu_paje_draw_histogram.R || ln -sf $ac_abs_top_srcdir/tools/starpu_paje_draw_histogram.R tools/starpu_paje_draw_histogram.R
   test -e tools/starpu_paje_state_stats.R || ln -sf $ac_abs_top_srcdir/tools/starpu_paje_state_stats.R tools/starpu_paje_state_stats.R
   test -e tools/starpu_trace_state_stats.py || ln -sf $ac_abs_top_srcdir/tools/starpu_trace_state_stats.py tools/starpu_trace_state_stats.py

+ 6 - 0
examples/Makefile.am

@@ -315,6 +315,12 @@ TESTS += \
 	lu/lu.sh
 
 endif
+
+if STARPU_SIMGRID
+TESTS += \
+	 cholesky/cholesky.sh
+endif
+
 endif
 endif
 

+ 62 - 0
examples/cholesky/cholesky.sh

@@ -0,0 +1,62 @@
+#!/bin/bash
+# StarPU --- Runtime system for heterogeneous multicore architectures.
+#
+# Copyright (C) 2018                 Université de Bordeaux
+#
+# StarPU is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or (at
+# your option) any later version.
+#
+# StarPU is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+#
+# See the GNU Lesser General Public License in COPYING.LGPL for more details.
+#
+
+ROOT=${0%.sh}
+#[ -n "$STARPU_SCHEDS" ] || STARPU_SCHEDS=`$(dirname $0)/../../tools/starpu_sched_display`
+[ -n "$STARPU_SCHEDS" ] || STARPU_SCHEDS="prio lws dmda dmdar dmdas dmdasd modular-heft modular-heft-prio modular-heft2"
+[ -n "$STARPU_HOSTNAME" ] || STARPU_HOSTNAME=mirage
+unset MALLOC_PERTURB_
+
+(
+echo -n "#"
+for STARPU_SCHED in $STARPU_SCHEDS ; do
+	echo -n " $STARPU_SCHED"
+done
+echo
+
+for size in `seq 2 2 30` ; do
+	echo -n "$((size * 960))"
+	for STARPU_SCHED in $STARPU_SCHEDS
+	do
+		export STARPU_SCHED
+		GFLOPS=`${ROOT}_implicit -size $((size * 960)) -nblocks $size 2> /dev/null | grep -v GFlops | cut -d '	' -f 3`
+		[ -n "$GFLOPS" ] || GFLOPS='""'
+		echo -n " $GFLOPS"
+	done
+	echo 
+done
+) | tee cholesky.output
+
+[ -n "$TERMINAL" ] || TERMINAL=eps
+[ -n "$OUTFILE" ] || OUTFILE=cholesky.eps
+cat > cholesky.gp << EOF
+set terminal $TERMINAL
+set output "$OUTFILE"
+set key top left
+set xlabel "size"
+set ylabel "GFlops"
+plot \\
+EOF
+
+N=2
+for STARPU_SCHED in $STARPU_SCHEDS
+do
+	echo "'cholesky.output' using 1:$N with lines title '$STARPU_SCHED', \\" >> cholesky.gp
+	N=$(($N + 1))
+done
+gnuplot cholesky.gp
+gv $OUTFILE