Procházet zdrojové kódy

Make quickcheck faster

Samuel Thibault před 10 roky
rodič
revize
d35c3ec66b

+ 7 - 1
examples/basic_examples/mult.c

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
- * Copyright (C) 2010-2011, 2013  Université de Bordeaux
+ * Copyright (C) 2010-2011, 2013, 2015  Université de Bordeaux
  * Copyright (C) 2010  Mehdi Juhoor <mjuhoor@gmail.com>
  * Copyright (C) 2010, 2011, 2012, 2013  Centre National de la Recherche Scientifique
  *
@@ -43,9 +43,15 @@ static starpu_data_handle_t A_handle, B_handle, C_handle;
 
 static unsigned nslicesx = 4;
 static unsigned nslicesy = 4;
+#ifdef STARPU_QUICK_CHECK
+static unsigned xdim = 512;
+static unsigned ydim = 512;
+static unsigned zdim = 256;
+#else
 static unsigned xdim = 1024;
 static unsigned ydim = 1024;
 static unsigned zdim = 512;
+#endif
 
 
 /*

+ 5 - 1
examples/binary/binary.c

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
- * Copyright (C) 2009, 2010-2011, 2013-2014  Université de Bordeaux
+ * Copyright (C) 2009, 2010-2011, 2013-2015  Université de Bordeaux
  * Copyright (C) 2010, 2011, 2012, 2013, 2014  Centre National de la Recherche Scientifique
  *
  * StarPU is free software; you can redistribute it and/or modify
@@ -40,7 +40,11 @@ int compute(char *file_name, int load_as_file)
 	starpu_data_handle_t float_array_handle;
 	unsigned i;
 	int ret = 0;
+#ifdef STARPU_QUICK_CHECK
+	unsigned niter = 50;
+#else
 	unsigned niter = 500;
+#endif
 
 	starpu_vector_data_register(&float_array_handle, STARPU_MAIN_RAM, (uintptr_t)&float_array, 4, sizeof(float));
 

+ 5 - 1
examples/cg/cg.c

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
- * Copyright (C) 2010-2012, 2014  Université de Bordeaux
+ * Copyright (C) 2010-2012, 2014-2015  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
@@ -74,7 +74,11 @@ static int use_reduction = 1;
 static starpu_data_handle_t A_handle, b_handle, x_handle;
 static TYPE *A, *b, *x;
 
+#ifdef STARPU_QUICK_CHECK
+static int i_max = 100;
+#else
 static int i_max = 1000;
+#endif
 static double eps = (10e-14);
 
 static starpu_data_handle_t r_handle, d_handle, q_handle;

+ 2 - 2
examples/cholesky/cholesky.h

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
- * Copyright (C) 2009-2014  Université de Bordeaux
+ * Copyright (C) 2009-2015  Université de Bordeaux
  * Copyright (C) 2010, 2011, 2012, 2013  Centre National de la Recherche Scientifique
  *
  * StarPU is free software; you can redistribute it and/or modify
@@ -114,7 +114,7 @@
 /* End of magma code */
 
 #ifdef STARPU_QUICK_CHECK
-static unsigned size = 960*4;
+static unsigned size = 320*4;
 static unsigned nblocks = 4;
 static unsigned nbigblocks = 2;
 #else

+ 1 - 1
examples/lu/lu_example.c

@@ -25,7 +25,7 @@
 #include "xlu_kernels.h"
 
 #ifdef STARPU_QUICK_CHECK
-static unsigned long size = 960*4;
+static unsigned long size = 320*4;
 static unsigned nblocks = 4;
 #else
 static unsigned long size = 960*16;

+ 11 - 1
examples/profiling/profiling.c

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
- * Copyright (C) 2010-2013  Université de Bordeaux
+ * Copyright (C) 2010-2013, 2015  Université de Bordeaux
  * Copyright (C) 2010, 2011, 2012, 2013  Centre National de la Recherche Scientifique
  *
  * StarPU is free software; you can redistribute it and/or modify
@@ -21,7 +21,11 @@
 
 #define FPRINTF(ofile, fmt, ...) do { if (!getenv("STARPU_SSILENT")) {fprintf(ofile, fmt, ## __VA_ARGS__); }} while(0)
 
+#ifdef STARPU_QUICK_CHECK
+static unsigned niter = 50;
+#else
 static unsigned niter = 500;
+#endif
 
 void sleep_codelet(STARPU_ATTRIBUTE_UNUSED void *descr[],
 			STARPU_ATTRIBUTE_UNUSED void *_args)
@@ -44,9 +48,15 @@ int main(int argc, char **argv)
 	/* Enable profiling */
 	starpu_profiling_status_set(STARPU_PROFILING_ENABLE);
 
+#ifdef STARPU_QUICK_CHECK
+	/* We should observe at least 50ms in the sleep time reported by every
+	 * worker. */
+	usleep(50000);
+#else
 	/* We should observe at least 500ms in the sleep time reported by every
 	 * worker. */
 	usleep(500000);
+#endif
 
 	struct starpu_codelet cl =
 	{

+ 5 - 1
examples/reductions/dot_product.c

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
- * Copyright (C) 2010-2014  Université de Bordeaux
+ * Copyright (C) 2010-2015  Université de Bordeaux
  * Copyright (C) 2012 inria
  *
  * StarPU is free software; you can redistribute it and/or modify
@@ -36,7 +36,11 @@ static starpu_data_handle_t *_y_handles;
 static struct starpu_opencl_program _opencl_program;
 #endif
 
+#ifdef STARPU_QUICK_CHECK
+static unsigned _nblocks = 512;
+#else
 static unsigned _nblocks = 4096;
+#endif
 static unsigned _entries_per_block = 1024;
 
 static DOT_TYPE _dot = 0.0f;

+ 8 - 2
examples/spmd/vector_scal_spmd.c

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2010, 2011, 2012, 2013  Centre National de la Recherche Scientifique
- * Copyright (C) 2010-2013  Université de Bordeaux
+ * Copyright (C) 2010-2013, 2015  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
@@ -30,6 +30,12 @@
 #define	NX	204800
 #define FPRINTF(ofile, fmt, ...) do { if (!getenv("STARPU_SSILENT")) {fprintf(ofile, fmt, ## __VA_ARGS__); }} while(0)
 
+#ifdef STARPU_QUICK_CHECK
+#define ITER 10
+#else
+#define ITER 100
+#endif
+
 static int get_first_element_rank(int nel, int rank, int nb_workers)
 {
 	if(rank == 0)
@@ -118,7 +124,7 @@ int main(int argc, char **argv)
 
 	float factor = 1.001;
 
-	for (i = 0; i < 100; i++) {
+	for (i = 0; i < ITER; i++) {
 		struct starpu_task *task = starpu_task_create();
 
 		task->cl = &cl;

+ 5 - 1
socl/examples/matmul/matmul.c

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
- * Copyright (C) 2010,2011 University of Bordeaux
+ * Copyright (C) 2010,2011, 2015 University of 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
@@ -35,7 +35,11 @@
 
 // Basic Matrix dimensions
 #define WA (128L * BLOCK_SIZE) // Matrix A width
+#ifdef STARPU_QUICK_CHECK
+#define HA (128L * BLOCK_SIZE) // Matrix A height
+#else
 #define HA (512L * BLOCK_SIZE) // Matrix A height
+#endif
 #define WB (128L * BLOCK_SIZE) // Matrix B width
 #define HB WA  // Matrix B height
 #define WC WB  // Matrix C width

+ 5 - 1
tests/overlap/gpu_concurrency.c

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
- * Copyright (C) 2014  Université de Bordeaux
+ * Copyright (C) 2014-2015  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
@@ -23,7 +23,11 @@
 #include "../helper.h"
 #include <common/thread.h>
 
+#ifdef STARPU_QUICK_CHECK
+#define NITERS 100000
+#else
 #define NITERS 1000000
+#endif
 #define NTASKS 64
 #define SYNC 16
 

+ 9 - 2
tests/perfmodels/non_linear_regression_based.c

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
- * Copyright (C) 2011-2012, 2014  Université de Bordeaux
+ * Copyright (C) 2011-2012, 2014-2015  Université de Bordeaux
  * Copyright (C) 2012, 2013  Centre National de la Recherche Scientifique
  * Copyright (C) 2012 inria
  *
@@ -20,6 +20,13 @@
 #include <starpu.h>
 #include "../helper.h"
 
+#define START_LOG 8
+#ifdef STARPU_QUICK_CHECK
+#define END_LOG 20
+#else
+#define END_LOG 25
+#endif
+
 #ifdef STARPU_USE_CUDA
 static void memset_cuda(void *descr[], void *arg)
 {
@@ -118,7 +125,7 @@ int main(int argc, char **argv)
 #endif
 
 	int slog;
-	for (slog = 8; slog < 25; slog++)
+	for (slog = START_LOG; slog < END_LOG; slog++)
 	{
 		int size = 1 << slog;
 		test_memset(size);

+ 9 - 2
tests/perfmodels/regression_based.c

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
- * Copyright (C) 2011-2014  Université de Bordeaux
+ * Copyright (C) 2011-2015  Université de Bordeaux
  * Copyright (C) 2011  Télécom-SudParis
  * Copyright (C) 2012 inria
  *
@@ -21,6 +21,13 @@
 #include <starpu_scheduler.h>
 #include "../helper.h"
 
+#define START 1024
+#ifdef STARPU_QUICK_CHECK
+#define END 1048576
+#else
+#define END 16777216
+#endif
+
 #ifdef STARPU_USE_CUDA
 static void memset_cuda(void *descr[], void *arg)
 {
@@ -159,7 +166,7 @@ int main(int argc, char **argv)
 #endif
 
 	int size;
-	for (size = 1024; size < 16777216; size *= 2)
+	for (size = START; size < END; size *= 2)
 	{
 		/* Use a linear regression */
 		test_memset(size, &memset_cl);