Browse Source

Add dumb perfmodel for mpi tests for simgrid to be able to run them

Samuel Thibault 10 years ago
parent
commit
215a3d8d4d

+ 13 - 0
mpi/src/starpu_mpi_task_insert.c

@@ -645,6 +645,17 @@ void _starpu_mpi_redux_data_dummy_func(STARPU_ATTRIBUTE_UNUSED void *buffers[],
 {
 }
 
+/* Dummy cost function for simgrid */
+static double cost_function(struct starpu_task *task STARPU_ATTRIBUTE_UNUSED, unsigned nimpl STARPU_ATTRIBUTE_UNUSED)
+{
+	return 0.000001;
+}
+static struct starpu_perfmodel dumb_model =
+{
+	.type		= STARPU_COMMON,
+	.cost_function	= cost_function
+};
+
 static
 struct starpu_codelet _starpu_mpi_redux_data_read_cl =
 {
@@ -653,6 +664,7 @@ struct starpu_codelet _starpu_mpi_redux_data_read_cl =
 	.opencl_funcs = {_starpu_mpi_redux_data_dummy_func},
 	.nbuffers = 1,
 	.modes = {STARPU_R},
+	.model = &dumb_model,
 	.name = "_starpu_mpi_redux_data_read_cl"
 };
 
@@ -663,6 +675,7 @@ struct starpu_codelet _starpu_mpi_redux_data_readwrite_cl =
 	.opencl_funcs = {_starpu_mpi_redux_data_dummy_func},
 	.nbuffers = 1,
 	.modes = {STARPU_RW},
+	.model = &dumb_model,
 	.name = "_starpu_mpi_redux_data_write_cl"
 };
 

+ 17 - 3
mpi/tests/cache.c

@@ -23,25 +23,39 @@ void func_cpu(STARPU_ATTRIBUTE_UNUSED void *descr[], STARPU_ATTRIBUTE_UNUSED voi
 {
 }
 
+/* Dummy cost function for simgrid */
+static double cost_function(struct starpu_task *task STARPU_ATTRIBUTE_UNUSED, unsigned nimpl STARPU_ATTRIBUTE_UNUSED)
+{
+	return 0.000001;
+}
+static struct starpu_perfmodel dumb_model =
+{
+	.type          = STARPU_COMMON,
+	.cost_function = cost_function
+};
+
 struct starpu_codelet mycodelet_r =
 {
 	.cpu_funcs = {func_cpu},
 	.nbuffers = 1,
-	.modes = {STARPU_R}
+	.modes = {STARPU_R},
+	.model = &dumb_model
 };
 
 struct starpu_codelet mycodelet_w =
 {
 	.cpu_funcs = {func_cpu},
 	.nbuffers = 1,
-	.modes = {STARPU_W}
+	.modes = {STARPU_W},
+	.model = &dumb_model
 };
 
 struct starpu_codelet mycodelet_rw =
 {
 	.cpu_funcs = {func_cpu},
 	.nbuffers = 1,
-	.modes = {STARPU_RW}
+	.modes = {STARPU_RW},
+	.model = &dumb_model
 };
 
 void test(struct starpu_codelet *codelet, enum starpu_data_access_mode mode, starpu_data_handle_t data, int rank, int in_cache)

+ 13 - 1
mpi/tests/cache_disable.c

@@ -23,11 +23,23 @@ void func_cpu(STARPU_ATTRIBUTE_UNUSED void *descr[], STARPU_ATTRIBUTE_UNUSED voi
 {
 }
 
+/* Dummy cost function for simgrid */
+static double cost_function(struct starpu_task *task STARPU_ATTRIBUTE_UNUSED, unsigned nimpl STARPU_ATTRIBUTE_UNUSED)
+{
+	return 0.000001;
+}
+static struct starpu_perfmodel dumb_model =
+{
+	.type          = STARPU_COMMON,
+	.cost_function = cost_function
+};
+
 struct starpu_codelet mycodelet_r =
 {
 	.cpu_funcs = {func_cpu},
 	.nbuffers = 1,
-	.modes = {STARPU_R}
+	.modes = {STARPU_R},
+	.model = &dumb_model
 };
 
 int main(int argc, char **argv)

+ 6 - 12
mpi/tests/callback.c

@@ -27,29 +27,23 @@ void my_func(STARPU_ATTRIBUTE_UNUSED void *descr[], STARPU_ATTRIBUTE_UNUSED void
 	FPRINTF_MPI(stderr, "i am here\n");
 }
 
-#ifdef STARPU_SIMGRID
-static double cost_function(struct starpu_task *task, unsigned nimpl)
+/* Dummy cost function for simgrid */
+static double cost_function(struct starpu_task *task STARPU_ATTRIBUTE_UNUSED, unsigned nimpl STARPU_ATTRIBUTE_UNUSED)
 {
-	(void) task;
-	(void) nimpl;
 	return 0.000001;
 }
-
-static struct starpu_perfmodel model =
+static struct starpu_perfmodel dumb_model =
 {
-	.type = STARPU_COMMON,
-	.cost_function = cost_function,
+	.type		= STARPU_COMMON,
+	.cost_function	= cost_function
 };
-#endif
 
 struct starpu_codelet my_codelet =
 {
 	.cpu_funcs = {my_func},
 	.cuda_funcs = {my_func},
 	.opencl_funcs = {my_func},
-#ifdef STARPU_SIMGRID
-	.model = &model
-#endif
+	.model = &dumb_model
 };
 
 static

+ 22 - 0
mpi/tests/early_request.c

@@ -60,12 +60,28 @@ void fill_tmp_buffer(void *buffers[], void *cl_arg)
 		tmp[i]=nx+i;
 }
 
+#ifdef STARPU_SIMGRID
+/* Dummy cost function for simgrid */
+static double cost_function(struct starpu_task *task STARPU_ATTRIBUTE_UNUSED, unsigned nimpl STARPU_ATTRIBUTE_UNUSED)
+{
+	return 0.000001;
+}
+static struct starpu_perfmodel dumb_model =
+{
+	.type		= STARPU_COMMON,
+	.cost_function	= cost_function
+};
+#endif
+
 static struct starpu_codelet fill_tmp_buffer_cl =
 {
 	.where = STARPU_CPU,
 	.cpu_funcs = {fill_tmp_buffer, NULL},
 	.nbuffers = 1,
 	.modes = {STARPU_W},
+#ifdef STARPU_SIMGRID
+	.model = &dumb_model,
+#endif
 	.name = "fill_tmp_buffer"
 };
 
@@ -86,6 +102,9 @@ static struct starpu_codelet read_ghost_value_cl =
 	.cpu_funcs = {read_ghost, NULL},
 	.nbuffers = 1,
 	.modes = {STARPU_R},
+#ifdef STARPU_SIMGRID
+	.model = &dumb_model,
+#endif
 	.name = "read_ghost_value"
 };
 
@@ -104,6 +123,9 @@ static struct starpu_codelet submitted_order =
 	.cpu_funcs = {submitted_order_fun, NULL},
 	.nbuffers = 2,
 	.modes = {STARPU_RW, STARPU_W},
+#ifdef STARPU_SIMGRID
+	.model = &dumb_model,
+#endif
 	.name = "submitted_order_enforcer"
 };
 

+ 13 - 1
mpi/tests/insert_task.c

@@ -27,11 +27,23 @@ void func_cpu(void *descr[], STARPU_ATTRIBUTE_UNUSED void *_args)
 	*x = (*x + *y) / 2;
 }
 
+/* Dummy cost function for simgrid */
+static double cost_function(struct starpu_task *task STARPU_ATTRIBUTE_UNUSED, unsigned nimpl STARPU_ATTRIBUTE_UNUSED)
+{
+	return 0.000001;
+}
+static struct starpu_perfmodel dumb_model =
+{
+	.type		= STARPU_COMMON,
+	.cost_function	= cost_function
+};
+
 struct starpu_codelet mycodelet =
 {
 	.cpu_funcs = {func_cpu},
 	.nbuffers = 2,
-	.modes = {STARPU_RW, STARPU_R}
+	.modes = {STARPU_RW, STARPU_R},
+	.model = &dumb_model
 };
 
 #define X     4

+ 16 - 0
mpi/tests/insert_task_block.c

@@ -44,10 +44,26 @@ void func_cpu(void *descr[], STARPU_ATTRIBUTE_UNUSED void *_args)
 	}
 }
 
+#ifdef STARPU_SIMGRID
+/* Dummy cost function for simgrid */
+static double cost_function(struct starpu_task *task STARPU_ATTRIBUTE_UNUSED, unsigned nimpl STARPU_ATTRIBUTE_UNUSED)
+{
+	return 0.000001;
+}
+static struct starpu_perfmodel dumb_model =
+{
+	.type		= STARPU_COMMON,
+	.cost_function	= cost_function
+};
+#endif
+
 struct starpu_codelet mycodelet =
 {
 	.cpu_funcs = {func_cpu},
 	.nbuffers = 1,
+#ifdef STARPU_SIMGRID
+	.model = &dumb_model,
+#endif
 	.modes = {STARPU_RW}
 };
 

+ 13 - 1
mpi/tests/insert_task_compute.c

@@ -29,11 +29,23 @@ void func_cpu(void *descr[], void *_args)
 	*x = *x * *y;
 }
 
+/* Dummy cost function for simgrid */
+static double cost_function(struct starpu_task *task STARPU_ATTRIBUTE_UNUSED, unsigned nimpl STARPU_ATTRIBUTE_UNUSED)
+{
+	return 0.000001;
+}
+static struct starpu_perfmodel dumb_model =
+{
+	.type		= STARPU_COMMON,
+	.cost_function	= cost_function
+};
+
 struct starpu_codelet mycodelet =
 {
 	.cpu_funcs = {func_cpu},
 	.nbuffers = 2,
-	.modes = {STARPU_RW, STARPU_R}
+	.modes = {STARPU_RW, STARPU_R},
+	.model = &dumb_model
 };
 
 int test(int rank, int node, int *before, int *after, int task_insert, int data_array)

+ 14 - 2
mpi/tests/insert_task_count.c

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
- * Copyright (C) 2009, 2010, 2014  Université de Bordeaux
+ * Copyright (C) 2009, 2010, 2014-2015  Université de Bordeaux
  * Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015  CNRS
  *
  * StarPU is free software; you can redistribute it and/or modify
@@ -34,6 +34,17 @@ void increment_cpu(void *descr[], STARPU_ATTRIBUTE_UNUSED void *_args)
 	(*tokenptr)++;
 }
 
+/* Dummy cost function for simgrid */
+static double cost_function(struct starpu_task *task STARPU_ATTRIBUTE_UNUSED, unsigned nimpl STARPU_ATTRIBUTE_UNUSED)
+{
+	return 0.000001;
+}
+static struct starpu_perfmodel dumb_model =
+{
+	.type		= STARPU_COMMON,
+	.cost_function	= cost_function
+};
+
 static struct starpu_codelet increment_cl =
 {
 #ifdef STARPU_USE_CUDA
@@ -41,7 +52,8 @@ static struct starpu_codelet increment_cl =
 #endif
 	.cpu_funcs = {increment_cpu},
 	.nbuffers = 1,
-	.modes = {STARPU_RW}
+	.modes = {STARPU_RW},
+	.model = &dumb_model
 };
 
 int main(int argc, char **argv)

+ 16 - 0
mpi/tests/insert_task_dyn_handles.c

@@ -35,11 +35,27 @@ void func_cpu(void *descr[], void *_args)
 	}
 }
 
+#ifdef STARPU_SIMGRID
+/* Dummy cost function for simgrid */
+static double cost_function(struct starpu_task *task STARPU_ATTRIBUTE_UNUSED, unsigned nimpl STARPU_ATTRIBUTE_UNUSED)
+{
+	return 0.000001;
+}
+static struct starpu_perfmodel dumb_model =
+{
+	.type		= STARPU_COMMON,
+	.cost_function	= cost_function
+};
+#endif
+
 struct starpu_codelet codelet =
 {
 	.cpu_funcs = {func_cpu},
 	.cpu_funcs_name = {"func_cpu"},
 	.nbuffers = STARPU_VARIABLE_NBUFFERS,
+#ifdef STARPU_SIMGRID
+	.model = &dumb_model,
+#endif
 };
 
 int main(int argc, char **argv)

+ 12 - 0
mpi/tests/insert_task_node_choice.c

@@ -30,11 +30,23 @@ void func_cpu(void *descr[], STARPU_ATTRIBUTE_UNUSED void *_args)
 	assert(node == rank);
 }
 
+/* Dummy cost function for simgrid */
+static double cost_function(struct starpu_task *task STARPU_ATTRIBUTE_UNUSED, unsigned nimpl STARPU_ATTRIBUTE_UNUSED)
+{
+	return 0.000001;
+}
+static struct starpu_perfmodel dumb_model =
+{
+	.type		= STARPU_COMMON,
+	.cost_function	= cost_function
+};
+
 struct starpu_codelet mycodelet =
 {
 	.cpu_funcs = {func_cpu},
 	.nbuffers = 2,
 	.modes = {STARPU_RW, STARPU_RW},
+	.model = &dumb_model,
 	.name = "insert_task_node_choice"
 };
 

+ 21 - 5
mpi/tests/insert_task_owner.c

@@ -30,39 +30,55 @@ void func_cpu(void *descr[], STARPU_ATTRIBUTE_UNUSED void *_args)
 	assert(node == rank);
 }
 
+/* Dummy cost function for simgrid */
+static double cost_function(struct starpu_task *task STARPU_ATTRIBUTE_UNUSED, unsigned nimpl STARPU_ATTRIBUTE_UNUSED)
+{
+	return 0.000001;
+}
+static struct starpu_perfmodel dumb_model =
+{
+	.type		= STARPU_COMMON,
+	.cost_function	= cost_function
+};
+
 struct starpu_codelet mycodelet_r_w =
 {
 	.cpu_funcs = {func_cpu},
 	.nbuffers = 2,
-	.modes = {STARPU_R, STARPU_W}
+	.modes = {STARPU_R, STARPU_W},
+	.model = &dumb_model
 };
 
 struct starpu_codelet mycodelet_rw_r =
 {
 	.cpu_funcs = {func_cpu},
 	.nbuffers = 2,
-	.modes = {STARPU_RW, STARPU_R}
+	.modes = {STARPU_RW, STARPU_R},
+	.model = &dumb_model
 };
 
 struct starpu_codelet mycodelet_rw_rw =
 {
 	.cpu_funcs = {func_cpu},
 	.nbuffers = 2,
-	.modes = {STARPU_RW, STARPU_RW}
+	.modes = {STARPU_RW, STARPU_RW},
+	.model = &dumb_model
 };
 
 struct starpu_codelet mycodelet_w_r =
 {
 	.cpu_funcs = {func_cpu},
 	.nbuffers = 2,
-	.modes = {STARPU_W, STARPU_R}
+	.modes = {STARPU_W, STARPU_R},
+	.model = &dumb_model
 };
 
 struct starpu_codelet mycodelet_r_r =
 {
 	.cpu_funcs = {func_cpu},
 	.nbuffers = 2,
-	.modes = {STARPU_R, STARPU_R}
+	.modes = {STARPU_R, STARPU_R},
+	.model = &dumb_model
 };
 
 int main(int argc, char **argv)

+ 14 - 2
mpi/tests/insert_task_owner2.c

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
- * Copyright (C) 2012                    Université Bordeaux
+ * Copyright (C) 2012, 2015                    Université Bordeaux
  * Copyright (C) 2011, 2012, 2013, 2014, 2015  CNRS
  *
  * StarPU is free software; you can redistribute it and/or modify
@@ -38,11 +38,23 @@ void func_cpu(void *descr[], STARPU_ATTRIBUTE_UNUSED void *_args)
 	FPRINTF(stderr, "-------> CODELET VALUES: %d %d %d %d\n", *x0, *x1, *x2, *y);
 }
 
+/* Dummy cost function for simgrid */
+static double cost_function(struct starpu_task *task STARPU_ATTRIBUTE_UNUSED, unsigned nimpl STARPU_ATTRIBUTE_UNUSED)
+{
+	return 0.000001;
+}
+static struct starpu_perfmodel dumb_model =
+{
+	.type		= STARPU_COMMON,
+	.cost_function	= cost_function
+};
+
 struct starpu_codelet mycodelet =
 {
 	.cpu_funcs = {func_cpu},
 	.nbuffers = 4,
-	.modes = {STARPU_R, STARPU_RW, STARPU_W, STARPU_W}
+	.modes = {STARPU_R, STARPU_RW, STARPU_W, STARPU_W},
+	.model = &dumb_model
 };
 
 int main(int argc, char **argv)

+ 13 - 1
mpi/tests/insert_task_owner_data.c

@@ -27,11 +27,23 @@ void func_cpu(void *descr[], STARPU_ATTRIBUTE_UNUSED void *_args)
 	*x1 *= *x1;
 }
 
+/* Dummy cost function for simgrid */
+static double cost_function(struct starpu_task *task STARPU_ATTRIBUTE_UNUSED, unsigned nimpl STARPU_ATTRIBUTE_UNUSED)
+{
+	return 0.000001;
+}
+static struct starpu_perfmodel dumb_model =
+{
+	.type		= STARPU_COMMON,
+	.cost_function	= cost_function
+};
+
 struct starpu_codelet mycodelet =
 {
 	.cpu_funcs = {func_cpu},
 	.nbuffers = 2,
-	.modes = {STARPU_RW, STARPU_RW}
+	.modes = {STARPU_RW, STARPU_RW},
+	.model = &dumb_model
 };
 
 int main(int argc, char **argv)

+ 13 - 1
mpi/tests/insert_task_recv_cache.c

@@ -32,11 +32,23 @@ void func_cpu(STARPU_ATTRIBUTE_UNUSED void *descr[], STARPU_ATTRIBUTE_UNUSED voi
 {
 }
 
+/* Dummy cost function for simgrid */
+static double cost_function(struct starpu_task *task STARPU_ATTRIBUTE_UNUSED, unsigned nimpl STARPU_ATTRIBUTE_UNUSED)
+{
+	return 0.000001;
+}
+static struct starpu_perfmodel dumb_model =
+{
+	.type		= STARPU_COMMON,
+	.cost_function	= cost_function
+};
+
 struct starpu_codelet mycodelet =
 {
 	.cpu_funcs = {func_cpu},
 	.nbuffers = 2,
-	.modes = {STARPU_RW, STARPU_R}
+	.modes = {STARPU_RW, STARPU_R},
+	.model = &dumb_model
 };
 
 #define N     1000

+ 13 - 1
mpi/tests/insert_task_sent_cache.c

@@ -32,11 +32,23 @@ void func_cpu(STARPU_ATTRIBUTE_UNUSED void *descr[], STARPU_ATTRIBUTE_UNUSED voi
 {
 }
 
+/* Dummy cost function for simgrid */
+static double cost_function(struct starpu_task *task STARPU_ATTRIBUTE_UNUSED, unsigned nimpl STARPU_ATTRIBUTE_UNUSED)
+{
+	return 0.000001;
+}
+static struct starpu_perfmodel dumb_model =
+{
+	.type		= STARPU_COMMON,
+	.cost_function	= cost_function
+};
+
 struct starpu_codelet mycodelet =
 {
 	.cpu_funcs = {func_cpu},
 	.nbuffers = 2,
-	.modes = {STARPU_RW, STARPU_R}
+	.modes = {STARPU_RW, STARPU_R},
+	.model = &dumb_model
 };
 
 #define N     1000

+ 13 - 1
mpi/tests/matrix.c

@@ -28,11 +28,23 @@ void func_cpu(void *descr[], STARPU_ATTRIBUTE_UNUSED void *_args)
 	*Y = *Y + *A * *X;
 }
 
+/* Dummy cost function for simgrid */
+static double cost_function(struct starpu_task *task STARPU_ATTRIBUTE_UNUSED, unsigned nimpl STARPU_ATTRIBUTE_UNUSED)
+{
+	return 0.000001;
+}
+static struct starpu_perfmodel dumb_model =
+{
+	.type		= STARPU_COMMON,
+	.cost_function	= cost_function
+};
+
 struct starpu_codelet mycodelet =
 {
 	.cpu_funcs = {func_cpu},
 	.nbuffers = 3,
-	.modes = {STARPU_R, STARPU_R, STARPU_RW}
+	.modes = {STARPU_R, STARPU_R, STARPU_RW},
+	.model = &dumb_model
 };
 
 #define N 4

+ 13 - 1
mpi/tests/matrix2.c

@@ -28,11 +28,23 @@ void func_cpu(void *descr[], STARPU_ATTRIBUTE_UNUSED void *_args)
 	*Y = *Y + *A * *X;
 }
 
+/* Dummy cost function for simgrid */
+static double cost_function(struct starpu_task *task STARPU_ATTRIBUTE_UNUSED, unsigned nimpl STARPU_ATTRIBUTE_UNUSED)
+{
+	return 0.000001;
+}
+static struct starpu_perfmodel dumb_model =
+{
+	.type		= STARPU_COMMON,
+	.cost_function	= cost_function
+};
+
 struct starpu_codelet mycodelet =
 {
 	.cpu_funcs = {func_cpu},
 	.nbuffers = 3,
-	.modes = {STARPU_R, STARPU_R, STARPU_RW}
+	.modes = {STARPU_R, STARPU_R, STARPU_RW},
+	.model = &dumb_model
 };
 
 #define N 4

+ 25 - 0
mpi/tests/mpi_reduction.c

@@ -24,11 +24,27 @@ extern void redux_cpu_func(void *descr[], void *cl_arg);
 extern void dot_cpu_func(void *descr[], void *cl_arg);
 extern void display_cpu_func(void *descr[], void *cl_arg);
 
+#ifdef STARPU_SIMGRID
+/* Dummy cost function for simgrid */
+static double cost_function(struct starpu_task *task STARPU_ATTRIBUTE_UNUSED, unsigned nimpl STARPU_ATTRIBUTE_UNUSED)
+{
+	return 0.000001;
+}
+static struct starpu_perfmodel dumb_model =
+{
+	.type		= STARPU_COMMON,
+	.cost_function	= cost_function
+};
+#endif
+
 static struct starpu_codelet init_codelet =
 {
 	.cpu_funcs = {init_cpu_func},
 	.nbuffers = 1,
 	.modes = {STARPU_W},
+#ifdef STARPU_SIMGRID
+	.model = &dumb_model,
+#endif
 	.name = "init_codelet"
 };
 
@@ -37,6 +53,9 @@ static struct starpu_codelet redux_codelet =
 	.cpu_funcs = {redux_cpu_func},
 	.modes = {STARPU_RW, STARPU_R},
 	.nbuffers = 2,
+#ifdef STARPU_SIMGRID
+	.model = &dumb_model,
+#endif
 	.name = "redux_codelet"
 };
 
@@ -45,6 +64,9 @@ static struct starpu_codelet dot_codelet =
 	.cpu_funcs = {dot_cpu_func},
 	.nbuffers = 2,
 	.modes = {STARPU_R, STARPU_REDUX},
+#ifdef STARPU_SIMGRID
+	.model = &dumb_model,
+#endif
 	.name = "dot_codelet"
 };
 
@@ -53,6 +75,9 @@ static struct starpu_codelet display_codelet =
 	.cpu_funcs = {display_cpu_func},
 	.nbuffers = 1,
 	.modes = {STARPU_R},
+#ifdef STARPU_SIMGRID
+	.model = &dumb_model,
+#endif
 	.name = "display_codelet"
 };
 

+ 16 - 0
mpi/tests/mpi_scatter_gather.c

@@ -38,11 +38,27 @@ void cpu_codelet(void *descr[], void *_args)
 	}
 }
 
+#ifdef STARPU_SIMGRID
+/* Dummy cost function for simgrid */
+static double cost_function(struct starpu_task *task STARPU_ATTRIBUTE_UNUSED, unsigned nimpl STARPU_ATTRIBUTE_UNUSED)
+{
+	return 0.000001;
+}
+static struct starpu_perfmodel dumb_model =
+{
+	.type		= STARPU_COMMON,
+	.cost_function	= cost_function
+};
+#endif
+
 static struct starpu_codelet cl =
 {
 	.cpu_funcs = {cpu_codelet},
 	.nbuffers = 1,
 	.modes = {STARPU_RW},
+#ifdef STARPU_SIMGRID
+	.model = &dumb_model,
+#endif
 };
 
 void scallback(void *arg STARPU_ATTRIBUTE_UNUSED)

+ 13 - 1
mpi/tests/policy_register.c

@@ -23,11 +23,23 @@ void func_cpu(void *descr[], void *_args)
 	(void)_args;
 }
 
+/* Dummy cost function for simgrid */
+static double cost_function(struct starpu_task *task STARPU_ATTRIBUTE_UNUSED, unsigned nimpl STARPU_ATTRIBUTE_UNUSED)
+{
+	return 0.000001;
+}
+static struct starpu_perfmodel dumb_model =
+{
+	.type		= STARPU_COMMON,
+	.cost_function	= cost_function
+};
+
 struct starpu_codelet mycodelet =
 {
 	.cpu_funcs = {func_cpu},
 	.nbuffers = 2,
-	.modes = {STARPU_W, STARPU_W}
+	.modes = {STARPU_W, STARPU_W},
+	.model = &dumb_model
 };
 
 int starpu_mpi_select_node_my_policy_0(int me, int nb_nodes, struct starpu_data_descr *descr, int nb_data)

+ 15 - 2
mpi/tests/policy_selection.c

@@ -23,17 +23,30 @@ void func_cpu(void *descr[], void *_args)
 	(void)_args;
 }
 
+/* Dummy cost function for simgrid */
+static double cost_function(struct starpu_task *task STARPU_ATTRIBUTE_UNUSED, unsigned nimpl STARPU_ATTRIBUTE_UNUSED)
+{
+	return 0.000001;
+}
+static struct starpu_perfmodel dumb_model =
+{
+	.type		= STARPU_COMMON,
+	.cost_function	= cost_function
+};
+
 struct starpu_codelet mycodelet_2 =
 {
 	.cpu_funcs = {func_cpu},
 	.nbuffers = 2,
-	.modes = {STARPU_W, STARPU_W}
+	.modes = {STARPU_W, STARPU_W},
+	.model = &dumb_model
 };
 struct starpu_codelet mycodelet_3 =
 {
 	.cpu_funcs = {func_cpu},
 	.nbuffers = 3,
-	.modes = {STARPU_R, STARPU_W, STARPU_W}
+	.modes = {STARPU_R, STARPU_W, STARPU_W},
+	.model = &dumb_model
 };
 
 int main(int argc, char **argv)

+ 13 - 1
mpi/tests/policy_selection2.c

@@ -28,11 +28,23 @@ void func_cpu(void *descr[], void *_args)
 	*data2 += *data0;
 }
 
+/* Dummy cost function for simgrid */
+static double cost_function(struct starpu_task *task STARPU_ATTRIBUTE_UNUSED, unsigned nimpl STARPU_ATTRIBUTE_UNUSED)
+{
+	return 0.000001;
+}
+static struct starpu_perfmodel dumb_model =
+{
+	.type		= STARPU_COMMON,
+	.cost_function	= cost_function
+};
+
 struct starpu_codelet mycodelet =
 {
 	.cpu_funcs = {func_cpu},
 	.nbuffers = 3,
-	.modes = {STARPU_R, STARPU_W, STARPU_W}
+	.modes = {STARPU_R, STARPU_W, STARPU_W},
+	.model = &dumb_model
 };
 
 int main(int argc, char **argv)

+ 14 - 2
mpi/tests/ring.c

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
- * Copyright (C) 2009, 2010, 2014  Université de Bordeaux
+ * Copyright (C) 2009, 2010, 2014-2015  Université de Bordeaux
  * Copyright (C) 2010, 2011, 2012, 2013  CNRS
  *
  * StarPU is free software; you can redistribute it and/or modify
@@ -37,6 +37,17 @@ void increment_cpu(void *descr[], STARPU_ATTRIBUTE_UNUSED void *_args)
 	(*tokenptr)++;
 }
 
+/* Dummy cost function for simgrid */
+static double cost_function(struct starpu_task *task STARPU_ATTRIBUTE_UNUSED, unsigned nimpl STARPU_ATTRIBUTE_UNUSED)
+{
+	return 0.000001;
+}
+static struct starpu_perfmodel dumb_model =
+{
+	.type		= STARPU_COMMON,
+	.cost_function	= cost_function
+};
+
 static struct starpu_codelet increment_cl =
 {
 #ifdef STARPU_USE_CUDA
@@ -44,7 +55,8 @@ static struct starpu_codelet increment_cl =
 #endif
 	.cpu_funcs = {increment_cpu},
 	.nbuffers = 1,
-	.modes = {STARPU_RW}
+	.modes = {STARPU_RW},
+	.model = &dumb_model
 };
 
 void increment_token(void)

+ 14 - 2
mpi/tests/ring_async.c

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
- * Copyright (C) 2009, 2010, 2014  Université de Bordeaux
+ * Copyright (C) 2009, 2010, 2014-2015  Université de Bordeaux
  * Copyright (C) 2010, 2011, 2012, 2013  CNRS
  *
  * StarPU is free software; you can redistribute it and/or modify
@@ -37,6 +37,17 @@ void increment_cpu(void *descr[], STARPU_ATTRIBUTE_UNUSED void *_args)
 	(*tokenptr)++;
 }
 
+/* Dummy cost function for simgrid */
+static double cost_function(struct starpu_task *task STARPU_ATTRIBUTE_UNUSED, unsigned nimpl STARPU_ATTRIBUTE_UNUSED)
+{
+	return 0.000001;
+}
+static struct starpu_perfmodel dumb_model =
+{
+	.type		= STARPU_COMMON,
+	.cost_function	= cost_function
+};
+
 static struct starpu_codelet increment_cl =
 {
 #ifdef STARPU_USE_CUDA
@@ -44,7 +55,8 @@ static struct starpu_codelet increment_cl =
 #endif
 	.cpu_funcs = {increment_cpu},
 	.nbuffers = 1,
-	.modes = {STARPU_RW}
+	.modes = {STARPU_RW},
+	.model = &dumb_model
 };
 
 void increment_token(void)

+ 14 - 2
mpi/tests/ring_async_implicit.c

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
- * Copyright (C) 2010  Université de Bordeaux
+ * Copyright (C) 2010, 2015  Université de Bordeaux
  * Copyright (C) 2010, 2011, 2012, 2013  CNRS
  *
  * StarPU is free software; you can redistribute it and/or modify
@@ -37,6 +37,17 @@ void increment_cpu(void *descr[], STARPU_ATTRIBUTE_UNUSED void *_args)
 	(*tokenptr)++;
 }
 
+/* Dummy cost function for simgrid */
+static double cost_function(struct starpu_task *task STARPU_ATTRIBUTE_UNUSED, unsigned nimpl STARPU_ATTRIBUTE_UNUSED)
+{
+	return 0.000001;
+}
+static struct starpu_perfmodel dumb_model =
+{
+	.type		= STARPU_COMMON,
+	.cost_function	= cost_function
+};
+
 static struct starpu_codelet increment_cl =
 {
 #ifdef STARPU_USE_CUDA
@@ -44,7 +55,8 @@ static struct starpu_codelet increment_cl =
 #endif
 	.cpu_funcs = {increment_cpu},
 	.nbuffers = 1,
-	.modes = {STARPU_RW}
+	.modes = {STARPU_RW},
+	.model = &dumb_model
 };
 
 void increment_token(void)

+ 14 - 2
mpi/tests/ring_sync.c

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
- * Copyright (C) 2009, 2010, 2014  Université de Bordeaux
+ * Copyright (C) 2009, 2010, 2014-2015  Université de Bordeaux
  * Copyright (C) 2010, 2011, 2012, 2013, 2014  CNRS
  *
  * StarPU is free software; you can redistribute it and/or modify
@@ -37,6 +37,17 @@ void increment_cpu(void *descr[], STARPU_ATTRIBUTE_UNUSED void *_args)
 	(*tokenptr)++;
 }
 
+/* Dummy cost function for simgrid */
+static double cost_function(struct starpu_task *task STARPU_ATTRIBUTE_UNUSED, unsigned nimpl STARPU_ATTRIBUTE_UNUSED)
+{
+	return 0.000001;
+}
+static struct starpu_perfmodel dumb_model =
+{
+	.type		= STARPU_COMMON,
+	.cost_function	= cost_function
+};
+
 static struct starpu_codelet increment_cl =
 {
 #ifdef STARPU_USE_CUDA
@@ -44,7 +55,8 @@ static struct starpu_codelet increment_cl =
 #endif
 	.cpu_funcs = {increment_cpu},
 	.nbuffers = 1,
-	.modes = {STARPU_RW}
+	.modes = {STARPU_RW},
+	.model = &dumb_model
 };
 
 void increment_token(void)

+ 14 - 2
mpi/tests/ring_sync_detached.c

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
- * Copyright (C) 2009, 2010, 2014  Université de Bordeaux
+ * Copyright (C) 2009, 2010, 2014-2015  Université de Bordeaux
  * Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015  CNRS
  *
  * StarPU is free software; you can redistribute it and/or modify
@@ -34,6 +34,17 @@ void increment_cpu(void *descr[], STARPU_ATTRIBUTE_UNUSED void *_args)
 	(*tokenptr)++;
 }
 
+/* Dummy cost function for simgrid */
+static double cost_function(struct starpu_task *task STARPU_ATTRIBUTE_UNUSED, unsigned nimpl STARPU_ATTRIBUTE_UNUSED)
+{
+	return 0.000001;
+}
+static struct starpu_perfmodel dumb_model =
+{
+	.type		= STARPU_COMMON,
+	.cost_function	= cost_function
+};
+
 static struct starpu_codelet increment_cl =
 {
 #ifdef STARPU_USE_CUDA
@@ -41,7 +52,8 @@ static struct starpu_codelet increment_cl =
 #endif
 	.cpu_funcs = {increment_cpu},
 	.nbuffers = 1,
-	.modes = {STARPU_RW}
+	.modes = {STARPU_RW},
+	.model = &dumb_model
 };
 
 void increment_token(starpu_data_handle_t handle)