Browse Source

tests/energy: add missing include and copyright

Nathalie Furmento 5 years ago
parent
commit
99bcaa43b7
4 changed files with 51 additions and 6 deletions
  1. 18 2
      tests/energy/dynamic.sh
  2. 3 4
      tests/energy/energy_efficiency.c
  3. 15 0
      tests/energy/perfs.gp
  4. 15 0
      tests/energy/static.sh

+ 18 - 2
tests/energy/dynamic.sh

@@ -1,4 +1,19 @@
 #!/bin/sh
 #!/bin/sh
+# StarPU --- Runtime system for heterogeneous multicore architectures.
+#
+# Copyright (C) 2020       Université de Bordeaux, CNRS (LaBRI UMR 5800), Inria
+#
+# 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.
+#
 
 
 # To have 24 cores
 # To have 24 cores
 export STARPU_HOSTNAME=sirocco
 export STARPU_HOSTNAME=sirocco
@@ -12,8 +27,9 @@ export NITER=30
 
 
 GAMMAS="1000000 100000 76000 10000 0"
 GAMMAS="1000000 100000 76000 10000 0"
 
 
-for gamma in $GAMMAS; do
-	(for freq_slow in $(seq 1200 200 3500) ; do 
+for gamma in $GAMMA
+do
+	(for freq_slow in $(seq 1200 200 3500) ; do
 		STARPU_SCHED_GAMMA=$gamma STARPU_FREQ_SLOW=$freq_slow \
 		STARPU_SCHED_GAMMA=$gamma STARPU_FREQ_SLOW=$freq_slow \
 			./energy_efficiency $N $NITER | grep "^$(($N * 512))	" &
 			./energy_efficiency $N $NITER | grep "^$(($N * 512))	" &
 	done) | sort -n -k 2 > dynamic.$gamma.dat
 	done) | sort -n -k 2 > dynamic.$gamma.dat

+ 3 - 4
tests/energy/energy_efficiency.c

@@ -17,6 +17,7 @@
 
 
 #include <stdbool.h>
 #include <stdbool.h>
 #include <starpu.h>
 #include <starpu.h>
+#include <limits.h>
 #include "../helper.h"
 #include "../helper.h"
 
 
 /*
 /*
@@ -68,7 +69,6 @@ static float power(float frequency)
 	return power_min + alpha * ( frequency*frequency*frequency - freq_min3);
 	return power_min + alpha * ( frequency*frequency*frequency - freq_min3);
 }
 }
 
 
-
 /*
 /*
  * This returns the frequency of the given worker and implementation in MHz.
  * This returns the frequency of the given worker and implementation in MHz.
  * This is where we can tune either a given number of cores at a low frequency,
  * This is where we can tune either a given number of cores at a low frequency,
@@ -276,8 +276,8 @@ CODELET(potrf, 1, STARPU_RW)
 CODELET(trsm, 2, STARPU_R, STARPU_RW)
 CODELET(trsm, 2, STARPU_R, STARPU_RW)
 CODELET(gemm, 3, STARPU_R, STARPU_R, STARPU_RW)
 CODELET(gemm, 3, STARPU_R, STARPU_R, STARPU_RW)
 
 
-
-int main(int argc, char *argv[]) {
+int main(int argc, char *argv[])
+{
 	/* Initialize environment variables */
 	/* Initialize environment variables */
 
 
 	if (!getenv("STARPU_IDLE_POWER"))
 	if (!getenv("STARPU_IDLE_POWER"))
@@ -333,7 +333,6 @@ int main(int argc, char *argv[]) {
 		return 0;
 		return 0;
 	}
 	}
 
 
-
 	/* Give parameter summary to user */
 	/* Give parameter summary to user */
 
 
 	printf("freqs (MHz):\n");
 	printf("freqs (MHz):\n");

+ 15 - 0
tests/energy/perfs.gp

@@ -1,3 +1,18 @@
+# StarPU --- Runtime system for heterogeneous multicore architectures.
+#
+# Copyright (C) 2020       Université de Bordeaux, CNRS (LaBRI UMR 5800), Inria
+#
+# 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.
+#
 set term postscript eps enhanced color font ",20"
 set term postscript eps enhanced color font ",20"
 set key top left
 set key top left
 set xlabel "frequency (MHz)"
 set xlabel "frequency (MHz)"

+ 15 - 0
tests/energy/static.sh

@@ -1,4 +1,19 @@
 #!/bin/sh
 #!/bin/sh
+# StarPU --- Runtime system for heterogeneous multicore architectures.
+#
+# Copyright (C) 2020       Université de Bordeaux, CNRS (LaBRI UMR 5800), Inria
+#
+# 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.
+#
 
 
 # To have 24 cores
 # To have 24 cores
 export STARPU_HOSTNAME=sirocco
 export STARPU_HOSTNAME=sirocco