Browse Source

make bandwidth_scheds much faster in non-benchmarks case

Samuel Thibault 4 years ago
parent
commit
b0efcdc3b9
2 changed files with 7 additions and 6 deletions
  1. 4 4
      tests/microbenchs/bandwidth.c
  2. 3 2
      tests/microbenchs/bandwidth_scheds.sh

+ 4 - 4
tests/microbenchs/bandwidth.c

@@ -129,11 +129,11 @@ static struct starpu_codelet sync_codelet =
 
 static void usage(char **argv)
 {
-	fprintf(stderr, "Usage: %s [-n iter] [-s size (MB)] [-i increment] [-a]\n", argv[0]);
-	fprintf(stderr, "\t-n iter\tNumber of iterations\n");
+	fprintf(stderr, "Usage: %s [-n niter] [-s size (MB)] [-c cpustep] [-a]\n", argv[0]);
+	fprintf(stderr, "\t-n niter\tNumber of iterations\n");
 	fprintf(stderr, "\t-s size\tBuffer size in MB\n");
-	fprintf(stderr, "\t-i increment\tCpu number increment\n");
-	fprintf(stderr, "\t-a\tDo not run the alone test\n");
+	fprintf(stderr, "\t-c cpustep\tCpu number increment\n");
+	fprintf(stderr, "\t-a Do not run the alone test\n");
 	exit(EXIT_FAILURE);
 }
 

+ 3 - 2
tests/microbenchs/bandwidth_scheds.sh

@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 # StarPU --- Runtime system for heterogeneous multicore architectures.
 #
 # Copyright (C) 2016-2020  Université de Bordeaux, CNRS (LaBRI UMR 5800), Inria
@@ -33,6 +33,7 @@ set output "bandwidth.svg"
 set pointsize 0.3
 EOF
 else
+	fast="-i 3 -c 4"
 	cat > bandwidth.gp << EOF
 set term postscript eps enhanced color font ",18"
 set output "bandwidth.eps"
@@ -61,7 +62,7 @@ do
 		extra=
 	fi
 
-	STARPU_BACKOFF_MIN=0 STARPU_BACKOFF_MAX=0 STARPU_SCHED=$sched $STARPU_LAUNCH $(dirname $0)/bandwidth $extra | tee bandwidth-$sched.dat
+	STARPU_BACKOFF_MIN=0 STARPU_BACKOFF_MAX=0 STARPU_SCHED=$sched $STARPU_LAUNCH $(dirname $0)/bandwidth $fast $extra "$@" | tee bandwidth-$sched.dat
 	echo "\"bandwidth-$sched.dat\" using 1:3 with linespoints lt $type pt $type title \"$sched\", \\" >> bandwidth.gp
 	echo "\"bandwidth-$sched.dat\" using 1:8 with linespoints lt $type pt $type notitle, \\" >> bandwidth.gp
 	type=$((type+1))