浏览代码

StarPU-top: rename objects from starputopXXX to starpu_topXXX

Nathalie Furmento 13 年之前
父节点
当前提交
14677179f1
共有 39 个文件被更改,包括 451 次插入433 次删除
  1. 12 12
      doc/chapters/perf-feedback.texi
  2. 3 3
      examples/stencil/stencil-kernels.c
  3. 6 6
      examples/stencil/stencil.c
  4. 3 3
      examples/stencil/stencil.h
  5. 41 41
      examples/top/hello_world_top.c
  6. 47 52
      include/starpu_top.h
  7. 5 5
      src/Makefile.am
  8. 3 3
      src/drivers/driver_common/driver_common.c
  9. 6 6
      src/sched_policies/heft.c
  10. 159 158
      src/top/starpu_top.c
  11. 24 24
      src/top/starputop_connection.c
  12. 6 6
      src/top/starputop_connection.h
  13. 21 0
      src/top/starpu_top_core.h
  14. 11 11
      src/top/starputop_message_queue.c
  15. 15 15
      src/top/starputop_message_queue.h
  16. 18 17
      src/top/starputop_task.c
  17. 1 1
      starpu-top/StarPU-Top-common.pri
  18. 1 1
      starpu-top/aboutdialog.ui
  19. 3 3
      starpu-top/communicationmanager.cpp
  20. 3 3
      starpu-top/communicationmanager.h
  21. 3 3
      starpu-top/communicationthread.cpp
  22. 1 1
      starpu-top/configurationmanager.h
  23. 1 1
      starpu-top/dataaggregatorwidget.h
  24. 1 1
      starpu-top/datawidget.h
  25. 2 2
      starpu-top/extradist
  26. 9 9
      starpu-top/ganttwidget.cpp
  27. 6 6
      starpu-top/ganttwidget.h
  28. 0 0
      starpu-top/images/starpu_top.png
  29. 1 1
      starpu-top/interactivewidget.h
  30. 11 11
      starpu-top/mainwindow.cpp
  31. 4 4
      starpu-top/mainwindow.h
  32. 3 3
      starpu-top/mainwindow.ui
  33. 1 1
      starpu-top/preferencesdialog.h
  34. 1 1
      starpu-top/resources.qrc
  35. 1 1
      starpu-top/sessionsetupmanager.h
  36. 7 7
      starpu-top/starputoptypes.h
  37. 7 7
      starpu-top/taskmanager.cpp
  38. 3 3
      starpu-top/taskmanager.h
  39. 1 1
      tools/dev/starpu_funcs.cocci

+ 12 - 12
doc/chapters/perf-feedback.texi

@@ -132,40 +132,40 @@ StarPU-Top is an interface which remotely displays the on-line state of a StarPU
 application and permits the user to change parameters on the fly.
 application and permits the user to change parameters on the fly.
 
 
 Variables to be monitored can be registered by calling the
 Variables to be monitored can be registered by calling the
-@code{starputop_add_data_boolean}, @code{starputop_add_data_integer},
-@code{starputop_add_data_float} functions, e.g.:
+@code{starpu_top_add_data_boolean}, @code{starpu_top_add_data_integer},
+@code{starpu_top_add_data_float} functions, e.g.:
 
 
 @example
 @example
-starputop_data *data = starputop_add_data_integer("mynum", 0, 100, 1);
+starpu_top_data *data = starpu_top_add_data_integer("mynum", 0, 100, 1);
 @end example
 @end example
 
 
-The application should then call @code{starputop_init_and_wait} to give its name
+The application should then call @code{starpu_top_init_and_wait} to give its name
 and wait for StarPU-Top to get a start request from the user. The name is used
 and wait for StarPU-Top to get a start request from the user. The name is used
 by StarPU-Top to quickly reload a previously-saved layout of parameter display.
 by StarPU-Top to quickly reload a previously-saved layout of parameter display.
 
 
 @example
 @example
-starputop_init_and_wait("the application");
+starpu_top_init_and_wait("the application");
 @end example
 @end example
 
 
 The new values can then be provided thanks to
 The new values can then be provided thanks to
-@code{starputop_update_data_boolean}, @code{starputop_update_data_integer},
-@code{starputop_update_data_float}, e.g.:
+@code{starpu_top_update_data_boolean}, @code{starpu_top_update_data_integer},
+@code{starpu_top_update_data_float}, e.g.:
 
 
 @example
 @example
-starputop_update_data_integer(data, mynum);
+starpu_top_update_data_integer(data, mynum);
 @end example
 @end example
 
 
-Updateable parameters can be registered thanks to @code{starputop_register_parameter_boolean}, @code{starputop_register_parameter_integer}, @code{starputop_register_parameter_float}, e.g.:
+Updateable parameters can be registered thanks to @code{starpu_top_register_parameter_boolean}, @code{starpu_top_register_parameter_integer}, @code{starpu_top_register_parameter_float}, e.g.:
 
 
 @example
 @example
 float apha;
 float apha;
-starputop_register_parameter_float("alpha", &alpha, 0, 10, modif_hook);
+starpu_top_register_parameter_float("alpha", &alpha, 0, 10, modif_hook);
 @end example
 @end example
 
 
 @code{modif_hook} is a function which will be called when the parameter is being modified, it can for instance print the new value:
 @code{modif_hook} is a function which will be called when the parameter is being modified, it can for instance print the new value:
 
 
 @example
 @example
-void modif_hook(struct starputop_param_t *d) @{
+void modif_hook(struct starpu_top_param_t *d) @{
     fprintf(stderr,"%s has been modified: %f\n", d->name, alpha);
     fprintf(stderr,"%s has been modified: %f\n", d->name, alpha);
 @}
 @}
 @end example
 @end example
@@ -174,7 +174,7 @@ Task schedulers should notify StarPU-Top when it has decided when a task will be
 scheduled, so that it can show it in its Gantt chart, for instance:
 scheduled, so that it can show it in its Gantt chart, for instance:
 
 
 @example
 @example
-starputop_task_prevision(task, workerid, begin, end);
+starpu_top_task_prevision(task, workerid, begin, end);
 @end example
 @end example
 
 
 Starting StarPU-Top and the application can be done two ways:
 Starting StarPU-Top and the application can be done two ways:

+ 3 - 3
examples/stencil/stencil-kernels.c

@@ -267,7 +267,7 @@ fprintf(stderr,"!!! DO update_func_cuda z %d CUDA%d !!!\n", block->bz, workerid)
 		STARPU_CUDA_REPORT_ERROR(cures);
 		STARPU_CUDA_REPORT_ERROR(cures);
 
 
 	if (block->bz == 0)
 	if (block->bz == 0)
-		starputop_update_data_integer(starputop_achieved_loop, ++achieved_iter);
+		starpu_top_update_data_integer(starpu_top_achieved_loop, ++achieved_iter);
 }
 }
 #endif /* STARPU_USE_CUDA */
 #endif /* STARPU_USE_CUDA */
 
 
@@ -360,7 +360,7 @@ fprintf(stderr,"!!! DO update_func_opencl z %d OPENCL%d !!!\n", block->bz, worke
 		STARPU_OPENCL_REPORT_ERROR(err);
 		STARPU_OPENCL_REPORT_ERROR(err);
 
 
 	if (block->bz == 0)
 	if (block->bz == 0)
-		starputop_update_data_integer(starputop_achieved_loop, ++achieved_iter);
+		starpu_top_update_data_integer(starpu_top_achieved_loop, ++achieved_iter);
 }
 }
 #endif /* STARPU_USE_OPENCL */
 #endif /* STARPU_USE_OPENCL */
 
 
@@ -435,7 +435,7 @@ fprintf(stderr,"!!! DO update_func_cpu z %d CPU%d !!!\n", block->bz, workerid);
 	}
 	}
 
 
 	if (block->bz == 0)
 	if (block->bz == 0)
-		starputop_update_data_integer(starputop_achieved_loop, ++achieved_iter);
+		starpu_top_update_data_integer(starpu_top_achieved_loop, ++achieved_iter);
 }
 }
 
 
 /* Performance model and codelet structure */
 /* Performance model and codelet structure */

+ 6 - 6
examples/stencil/stencil.c

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  *
- * Copyright (C) 2010  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010, 2011  Centre National de la Recherche Scientifique
  * Copyright (C) 2010-2011  Université de Bordeaux 1
  * Copyright (C) 2010-2011  Université de Bordeaux 1
  *
  *
  * StarPU is free software; you can redistribute it and/or modify
  * StarPU is free software; you can redistribute it and/or modify
@@ -37,8 +37,8 @@ static unsigned sizez = 64*SIZE;
 unsigned nbz = 64;
 unsigned nbz = 64;
 
 
 /* StarPU top variables */
 /* StarPU top variables */
-starputop_data* starputop_init_loop;
-starputop_data* starputop_achieved_loop;
+starpu_top_data* starpu_top_init_loop;
+starpu_top_data* starpu_top_achieved_loop;
 
 
 /*
 /*
  *	Initialization
  *	Initialization
@@ -115,9 +115,9 @@ static void init_problem(int argc, char **argv, int rank, int world_size)
 	parse_args(argc, argv);
 	parse_args(argc, argv);
 
 
 	if (getenv("STARPU_TOP")) {
 	if (getenv("STARPU_TOP")) {
-		starputop_init_loop = starputop_add_data_integer("Task creation iter", 0, niter, 1);
-		starputop_achieved_loop = starputop_add_data_integer("Task achieved iter", 0, niter, 1);
-		starputop_init_and_wait("stencil_top example");
+		starpu_top_init_loop = starpu_top_add_data_integer("Task creation iter", 0, niter, 1);
+		starpu_top_achieved_loop = starpu_top_add_data_integer("Task achieved iter", 0, niter, 1);
+		starpu_top_init_and_wait("stencil_top example");
 	}
 	}
 	create_blocks_array(sizex, sizey, sizez, nbz);
 	create_blocks_array(sizex, sizey, sizez, nbz);
 
 

+ 3 - 3
examples/stencil/stencil.h

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  *
- * Copyright (C) 2010  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010, 2011  Centre National de la Recherche Scientifique
  * Copyright (C) 2010-2011  Université de Bordeaux 1
  * Copyright (C) 2010-2011  Université de Bordeaux 1
  *
  *
  * StarPU is free software; you can redistribute it and/or modify
  * StarPU is free software; you can redistribute it and/or modify
@@ -45,8 +45,8 @@ extern void life_update(int bz, const TYPE *old, TYPE *newp, int nx, int ny, int
 #define K	1
 #define K	1
 
 
 #define NDIRS 2
 #define NDIRS 2
-extern starputop_data* starputop_init_loop;
-extern starputop_data* starputop_achieved_loop;
+extern starpu_top_data* starpu_top_init_loop;
+extern starpu_top_data* starpu_top_achieved_loop;
 
 
 
 
 /* Split only on the z axis to make things simple */
 /* Split only on the z axis to make things simple */

+ 41 - 41
examples/top/hello_world_top.c

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  *
  * Copyright (C) 2010  Université de Bordeaux 1
  * Copyright (C) 2010  Université de Bordeaux 1
- * Copyright (C) 2010  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010, 2011  Centre National de la Recherche Scientifique
  *
  *
  * StarPU is free software; you can redistribute it and/or modify
  * 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
  * it under the terms of the GNU Lesser General Public License as published by
@@ -19,7 +19,7 @@
  * This examples demonstrates how to construct and submit a task to StarPU and
  * This examples demonstrates how to construct and submit a task to StarPU and
  * more precisely:
  * more precisely:
  *  - how to allocate a new task structure (starpu_task_create)
  *  - how to allocate a new task structure (starpu_task_create)
- *  - how to describe a multi-versionned computational kernel (ie. a codelet) 
+ *  - how to describe a multi-versionned computational kernel (ie. a codelet)
  *  - how to pass an argument to the codelet (task->cl_arg)
  *  - how to pass an argument to the codelet (task->cl_arg)
  *  - how to declare a callback function that is called once the task has been
  *  - how to declare a callback function that is called once the task has been
  *    executed
  *    executed
@@ -72,7 +72,7 @@ void cpu_func(void *buffers[], void *cl_arg)
 		sum+=rand();
 		sum+=rand();
 		i++;
 		i++;
 	}
 	}
-	
+
 	printf("Hello %s (params = {%i, %f} ) sum=%d\n",
 	printf("Hello %s (params = {%i, %f} ) sum=%d\n",
 			names[name_selected],
 			names[name_selected],
 			params->i,
 			params->i,
@@ -80,19 +80,19 @@ void cpu_func(void *buffers[], void *cl_arg)
 			sum);
 			sum);
 }
 }
 
 
-void callback_name_changed(starputop_param* param)
+void callback_name_changed(starpu_top_param* param)
 {
 {
 	char* message = (char *) malloc(256);
 	char* message = (char *) malloc(256);
 	sprintf(message, "Name have been changed to %s", names[name_selected]);
 	sprintf(message, "Name have been changed to %s", names[name_selected]);
-	starputop_debug_log(message);
+	starpu_top_debug_log(message);
 }
 }
 
 
-void callback_number_addition_changed(starputop_param* param)
+void callback_number_addition_changed(starpu_top_param* param)
 {
 {
 	char* message = (char *) malloc(256);
 	char* message = (char *) malloc(256);
 	sprintf(message, "Number of addition is now %d", number_of_addition);
 	sprintf(message, "Number of addition is now %d", number_of_addition);
 
 
-	starputop_debug_log(message);
+	starpu_top_debug_log(message);
 }
 }
 
 
 starpu_codelet cl =
 starpu_codelet cl =
@@ -113,44 +113,44 @@ int main(int argc, char **argv)
  	* default configuration for the scheduling policies and the number of
  	* default configuration for the scheduling policies and the number of
 	* processors/accelerators */
 	* processors/accelerators */
 	starpu_init(NULL);
 	starpu_init(NULL);
-	
-	
-	/*init starputop*/
-	starputop_data * loop_count =
-			starputop_add_data_integer("Loop count", 0,124,1);
-	starputop_data * remain_count = 
-			starputop_add_data_integer("Remaining loop", 0,124,1);
-	starputop_data * midle_reach = 
-			starputop_add_data_boolean("Midle reached", 1);
-	starputop_param* name = 
-			starputop_register_parameter_enum("Your name : ",
+
+
+	/*init starpu_top*/
+	starpu_top_data * loop_count =
+			starpu_top_add_data_integer("Loop count", 0,124,1);
+	starpu_top_data * remain_count =
+			starpu_top_add_data_integer("Remaining loop", 0,124,1);
+	starpu_top_data * midle_reach =
+			starpu_top_add_data_boolean("Midle reached", 1);
+	starpu_top_param* name =
+			starpu_top_register_parameter_enum("Your name : ",
 											&name_selected,
 											&name_selected,
 											names,
 											names,
 											names_len,
 											names_len,
 											callback_name_changed);
 											callback_name_changed);
-	starputop_param * number_of_addition_param = 
-			starputop_register_parameter_integer("Number of Millions of addition", 
-							     &number_of_addition, 
+	starpu_top_param * number_of_addition_param =
+			starpu_top_register_parameter_integer("Number of Millions of addition",
+							     &number_of_addition,
 							     0,
 							     0,
-							     50, 
+							     50,
 							     callback_number_addition_changed);
 							     callback_number_addition_changed);
 	STARPU_ASSERT(number_of_addition_param != NULL);
 	STARPU_ASSERT(number_of_addition_param != NULL);
 
 
-	starputop_param * stop5_param = 
-			starputop_register_parameter_boolean("Stop after 5 task ?", 
+	starpu_top_param * stop5_param =
+			starpu_top_register_parameter_boolean("Stop after 5 task ?",
 							     &stop_after_5_task,
 							     &stop_after_5_task,
 							     NULL);
 							     NULL);
 	STARPU_ASSERT(stop5_param != NULL);
 	STARPU_ASSERT(stop5_param != NULL);
 
 
-	
+
 
 
 	//all parameters are initialized, we can connect to UI
 	//all parameters are initialized, we can connect to UI
-	starputop_init_and_wait("Serveur de test HelloWorld");
-	
+	starpu_top_init_and_wait("Serveur de test HelloWorld");
+
 	//set "default value"
 	//set "default value"
-	starputop_update_data_boolean(midle_reach, 0);
-	
-	
+	starpu_top_update_data_boolean(midle_reach, 0);
+
+
 	/* create a new task that is non-blocking by default : the task is not
 	/* create a new task that is non-blocking by default : the task is not
 	 * submitted to the scheduler until the starpu_task_submit function is
 	 * submitted to the scheduler until the starpu_task_submit function is
 	 * called */
 	 * called */
@@ -162,28 +162,28 @@ int main(int argc, char **argv)
 	int i;
 	int i;
 	for(i=0; i<124; i++)
 	for(i=0; i<124; i++)
 	{
 	{
-		starputop_update_data_integer(loop_count, i);
-		starputop_update_data_integer(remain_count, 124-i);
+		starpu_top_update_data_integer(loop_count, i);
+		starpu_top_update_data_integer(remain_count, 124-i);
 		if(i==62)
 		if(i==62)
 		{
 		{
-			starputop_update_data_boolean(midle_reach, 1);
+			starpu_top_update_data_boolean(midle_reach, 1);
 		}
 		}
 		if(i==25)
 		if(i==25)
 		{
 		{
 			//changing name
 			//changing name
 			name_selected = 1;
 			name_selected = 1;
-			starputop_update_parameter(name);
+			starpu_top_update_parameter(name);
 		}
 		}
 		if(i>4 && stop_after_5_task)
 		if(i>4 && stop_after_5_task)
 		{
 		{
 			break;
 			break;
 		}
 		}
-		
+
 		task[i]=starpu_task_create();
 		task[i]=starpu_task_create();
 
 
 		/* the task uses codelet "cl" */
 		/* the task uses codelet "cl" */
 		task[i]->cl = &cl;
 		task[i]->cl = &cl;
-		
+
 		/* It is possible to pass buffers that are not managed by the DSM to the
 		/* It is possible to pass buffers that are not managed by the DSM to the
 		 * kernels: the second argument of the "cpu_func" function is a pointer to a
 		 * kernels: the second argument of the "cpu_func" function is a pointer to a
 		 * buffer that contains information for the codelet (cl_arg stands for
 		 * buffer that contains information for the codelet (cl_arg stands for
@@ -195,7 +195,7 @@ int main(int argc, char **argv)
 		struct params params = { i, 2.0f };
 		struct params params = { i, 2.0f };
 		task[i]->cl_arg = &params;
 		task[i]->cl_arg = &params;
 		task[i]->cl_arg_size = sizeof(params);
 		task[i]->cl_arg_size = sizeof(params);
-			
+
 		/* once the task has been executed, callback_func(0x42)
 		/* once the task has been executed, callback_func(0x42)
 		 * will be called on a CPU */
 		 * will be called on a CPU */
 		task[i]->callback_func = callback_func;
 		task[i]->callback_func = callback_func;
@@ -203,11 +203,11 @@ int main(int argc, char **argv)
 
 
 		/* starpu_task_submit will be a blocking call */
 		/* starpu_task_submit will be a blocking call */
 		task[i]->synchronous = 1;
 		task[i]->synchronous = 1;
-		
+
 		/* submit the task to StarPU */
 		/* submit the task to StarPU */
 		if(number_of_addition==42)
 		if(number_of_addition==42)
-			starputop_debug_lock("debug stop point because of 42 !");
-		
+			starpu_top_debug_lock("debug stop point because of 42 !");
+
 		starpu_task_submit(task[i]);
 		starpu_task_submit(task[i]);
 	}
 	}
 	/* terminate StarPU: statistics and other debug outputs are not
 	/* terminate StarPU: statistics and other debug outputs are not
@@ -218,6 +218,6 @@ int main(int argc, char **argv)
 	 * results in an undefined behaviour */
 	 * results in an undefined behaviour */
 
 
 	starpu_shutdown();
 	starpu_shutdown();
-	
+
 	return 0;
 	return 0;
 }
 }

+ 47 - 52
include/starpu_top.h

@@ -28,12 +28,12 @@ extern "C" {
  
  
 typedef enum
 typedef enum
 {
 {
-	STARPUTOP_DATA_BOOLEAN,
-	STARPUTOP_DATA_INTEGER,
-	STARPUTOP_DATA_FLOAT
-} starputop_data_type;
+	STARPU_TOP_DATA_BOOLEAN,
+	STARPU_TOP_DATA_INTEGER,
+	STARPU_TOP_DATA_FLOAT
+} starpu_top_data_type;
 
 
-typedef struct starputop_data_t
+typedef struct starpu_top_data_t
 {
 {
 	unsigned int id;
 	unsigned int id;
 	const char* name;
 	const char* name;
@@ -42,33 +42,33 @@ typedef struct starputop_data_t
 	double double_min_value;
 	double double_min_value;
 	double double_max_value;
 	double double_max_value;
 	int active;
 	int active;
-	starputop_data_type type;
-	struct starputop_data_t * next;
-} starputop_data;
+	starpu_top_data_type type;
+	struct starpu_top_data_t * next;
+} starpu_top_data;
 
 
 typedef enum
 typedef enum
 {
 {
-	STARPUTOP_PARAM_BOOLEAN,
-	STARPUTOP_PARAM_INTEGER,
-	STARPUTOP_PARAM_FLOAT,
-	STARPUTOP_PARAM_ENUM
-} starputop_param_type;
+	STARPU_TOP_PARAM_BOOLEAN,
+	STARPU_TOP_PARAM_INTEGER,
+	STARPU_TOP_PARAM_FLOAT,
+	STARPU_TOP_PARAM_ENUM
+} starpu_top_param_type;
 
 
-typedef struct starputop_param_t
+typedef struct starpu_top_param_t
 {
 {
 	unsigned int id;
 	unsigned int id;
 	const char* name;
 	const char* name;
-	starputop_param_type type;
+	starpu_top_param_type type;
 	void* value;
 	void* value;
 	char** enum_values; /* only for enum type can be NULL */
 	char** enum_values; /* only for enum type can be NULL */
 	int nb_values;
 	int nb_values;
-	void (*callback)(struct starputop_param_t*);
+	void (*callback)(struct starpu_top_param_t*);
 	int int_min_value; /* only for integer type */
 	int int_min_value; /* only for integer type */
 	int int_max_value;
 	int int_max_value;
 	double double_min_value; /*only for double type */
 	double double_min_value; /*only for double type */
 	double double_max_value;
 	double double_max_value;
-	struct starputop_param_t * next;
-} starputop_param;
+	struct starpu_top_param_t * next;
+} starpu_top_param;
 
 
 typedef enum
 typedef enum
 {
 {
@@ -79,7 +79,7 @@ typedef enum
 	TOP_TYPE_DISABLE,
 	TOP_TYPE_DISABLE,
 	TOP_TYPE_DEBUG,
 	TOP_TYPE_DEBUG,
 	TOP_TYPE_UNKNOW	
 	TOP_TYPE_UNKNOW	
-} starputop_message_type;
+} starpu_top_message_type;
 
 
 
 
 /* 
 /* 
@@ -87,11 +87,6 @@ typedef enum
  */
  */
 int starpu_top_status_get();
 int starpu_top_status_get();
 
 
-/*
- * Convert timespec to ms
- */
-unsigned long long starpu_timing_timespec_to_ms(const struct timespec *ts);
-
 /*****************************************************
 /*****************************************************
 ****   Functions to call BEFORE initialisation   *****
 ****   Functions to call BEFORE initialisation   *****
 *****************************************************/
 *****************************************************/
@@ -100,7 +95,7 @@ unsigned long long starpu_timing_timespec_to_ms(const struct timespec *ts);
  * If active=0, the value will NOT be displayed to user by default.
  * If active=0, the value will NOT be displayed to user by default.
  * Any other value will make the value displayed by default.
  * Any other value will make the value displayed by default.
 */
 */
-starputop_data * starputop_add_data_boolean(
+starpu_top_data * starpu_top_add_data_boolean(
 			const char* data_name,
 			const char* data_name,
 			int active);
 			int active);
 /*
 /*
@@ -109,7 +104,7 @@ starputop_data * starputop_add_data_boolean(
  * If active=0, the value will NOT be displayed to user by default.
  * If active=0, the value will NOT be displayed to user by default.
  * Any other value will make the value displayed by default.
  * Any other value will make the value displayed by default.
 */
 */
-starputop_data * starputop_add_data_integer(
+starpu_top_data * starpu_top_add_data_integer(
 			const char* data_name, 
 			const char* data_name, 
 			int minimum_value, 
 			int minimum_value, 
 			int maximum_value, 
 			int maximum_value, 
@@ -120,7 +115,7 @@ starputop_data * starputop_add_data_integer(
  * If active=0, the value will NOT be displayed to user by default.
  * If active=0, the value will NOT be displayed to user by default.
  * Any other value will make the value displayed by default.
  * Any other value will make the value displayed by default.
 */
 */
-starputop_data* starputop_add_data_float(const char* data_name, 
+starpu_top_data* starpu_top_add_data_float(const char* data_name, 
 			double minimum_value, 
 			double minimum_value, 
 			double maximum_value, 
 			double maximum_value, 
 			int active);
 			int active);
@@ -130,10 +125,10 @@ starputop_data* starputop_add_data_float(const char* data_name,
  * The callback fonction will be called when the parameter is modified by UI, 
  * The callback fonction will be called when the parameter is modified by UI, 
  * and can be null.
  * and can be null.
 */
 */
-starputop_param* starputop_register_parameter_boolean(
+starpu_top_param* starpu_top_register_parameter_boolean(
 			const char* param_name, 
 			const char* param_name, 
 			int* parameter_field, 
 			int* parameter_field, 
-			void (*callback)(struct starputop_param_t*));
+			void (*callback)(struct starpu_top_param_t*));
 /*
 /*
  * This fonction register a parameter named param_name, of type integer.
  * This fonction register a parameter named param_name, of type integer.
  * Minimum and maximum value will be used to prevent user seting incorrect
  * Minimum and maximum value will be used to prevent user seting incorrect
@@ -141,11 +136,11 @@ starputop_param* starputop_register_parameter_boolean(
  * The callback fonction will be called when the parameter is modified by UI, 
  * The callback fonction will be called when the parameter is modified by UI, 
  * and can be null.
  * and can be null.
 */
 */
-starputop_param* starputop_register_parameter_integer(const char* param_name, 
+starpu_top_param* starpu_top_register_parameter_integer(const char* param_name, 
 			int* parameter_field, 
 			int* parameter_field, 
 			int minimum_value, 
 			int minimum_value, 
 			int maximum_value,
 			int maximum_value,
-			void (*callback)(struct starputop_param_t*));
+			void (*callback)(struct starpu_top_param_t*));
 /*
 /*
  * This fonction register a parameter named param_name, of type float.
  * This fonction register a parameter named param_name, of type float.
  * Minimum and maximum value will be used to prevent user seting incorrect
  * Minimum and maximum value will be used to prevent user seting incorrect
@@ -153,12 +148,12 @@ starputop_param* starputop_register_parameter_integer(const char* param_name,
  * The callback fonction will be called when the parameter is modified by UI,
  * The callback fonction will be called when the parameter is modified by UI,
  * and can be null.
  * and can be null.
 */
 */
-starputop_param* starputop_register_parameter_float(
+starpu_top_param* starpu_top_register_parameter_float(
 			const char* param_name, 
 			const char* param_name, 
 			double* parameter_field, 
 			double* parameter_field, 
 			double minimum_value, 
 			double minimum_value, 
 			double maximum_value, 
 			double maximum_value, 
-			void (*callback)(struct starputop_param_t*));
+			void (*callback)(struct starpu_top_param_t*));
 
 
 /*
 /*
  * This fonction register a parameter named param_name, of type enum.
  * This fonction register a parameter named param_name, of type enum.
@@ -167,12 +162,12 @@ starputop_param* starputop_register_parameter_float(
  * The callback fonction will be called when the parameter is modified by UI,
  * The callback fonction will be called when the parameter is modified by UI,
  * and can be null.
  * and can be null.
 */
 */
-starputop_param* starputop_register_parameter_enum(
+starpu_top_param* starpu_top_register_parameter_enum(
 			const char* param_name, 
 			const char* param_name, 
 			int* parameter_field, 
 			int* parameter_field, 
 			char** values,
 			char** values,
 			int nb_values, 
 			int nb_values, 
-			void (*callback)(struct starputop_param_t*));
+			void (*callback)(struct starpu_top_param_t*));
 
 
 
 
 
 
@@ -186,7 +181,7 @@ starputop_param* starputop_register_parameter_enum(
  * This function will wait for a TOP to connect, send initialisation
  * This function will wait for a TOP to connect, send initialisation
  * sentences, and wait for the GO message.
  * sentences, and wait for the GO message.
  */
  */
-void starputop_init_and_wait(const char* server_name);
+void starpu_top_init_and_wait(const char* server_name);
 
 
 /****************************************************
 /****************************************************
 ************ To call after initialisation************
 ************ To call after initialisation************
@@ -197,29 +192,29 @@ void starputop_init_and_wait(const char* server_name);
  * of a parameter from something other than starpu_top.
  * of a parameter from something other than starpu_top.
  * This fonction notice UI that the configuration changed
  * This fonction notice UI that the configuration changed
  */ 
  */ 
-void starputop_update_parameter(const starputop_param* param);
+void starpu_top_update_parameter(const starpu_top_param* param);
 
 
 /*
 /*
- * This functions update the value of the starputop_data on UI
+ * This functions update the value of the starpu_top_data on UI
  */
  */
-void starputop_update_data_boolean(
-			const starputop_data* data, 
+void starpu_top_update_data_boolean(
+			const starpu_top_data* data, 
 			int value);
 			int value);
-void starputop_update_data_integer(
-			const starputop_data* data, 
+void starpu_top_update_data_integer(
+			const starpu_top_data* data, 
 			int value);
 			int value);
-void starputop_update_data_float(
-			const starputop_data* data, 
+void starpu_top_update_data_float(
+			const starpu_top_data* data, 
 			double value);
 			double value);
 
 
 /*
 /*
  * This functions notify UI than the task has started or ended
  * This functions notify UI than the task has started or ended
  */
  */
-void starputop_task_started(
+void starpu_top_task_started(
 			struct starpu_task *task, 
 			struct starpu_task *task, 
 			int devid, 
 			int devid, 
 			const struct timespec* ts);
 			const struct timespec* ts);
-void starputop_task_ended(
+void starpu_top_task_ended(
 			struct starpu_task *task, 
 			struct starpu_task *task, 
 			int devid, 
 			int devid, 
 			const struct timespec* ts );
 			const struct timespec* ts );
@@ -227,12 +222,12 @@ void starputop_task_ended(
  * This functions notify UI than the task have been planed to 
  * This functions notify UI than the task have been planed to 
  * run from timestamp_begin to timestamp_end, on computation-core
  * run from timestamp_begin to timestamp_end, on computation-core
  */
  */
-void starputop_task_prevision_timespec(
+void starpu_top_task_prevision_timespec(
 			struct starpu_task *task, 
 			struct starpu_task *task, 
 			int devid, 
 			int devid, 
 			const struct timespec* start, 
 			const struct timespec* start, 
 			const struct timespec* end);
 			const struct timespec* end);
-void starputop_task_prevision(
+void starpu_top_task_prevision(
 			struct starpu_task *task, 
 			struct starpu_task *task, 
 			int devid, unsigned long long start, 
 			int devid, unsigned long long start, 
 			unsigned long long end);
 			unsigned long long end);
@@ -241,7 +236,7 @@ void starputop_task_prevision(
 /*
 /*
  * This functions are usefull in debug mode. The starpu developper doesn't need
  * This functions are usefull in debug mode. The starpu developper doesn't need
  * to check if the debug mode is active.
  * to check if the debug mode is active.
- * This is checked by starputop itsefl.
+ * This is checked by starpu_top itsefl.
  * 
  * 
  * top_debug_log just send a message to display by UI
  * top_debug_log just send a message to display by UI
  * top_debug_lock send a message and wait for a continue message from UI 
  * top_debug_lock send a message and wait for a continue message from UI 
@@ -250,14 +245,14 @@ void starputop_task_prevision(
  * The lock (wich create a stop-point) should be called only by the main thread.
  * The lock (wich create a stop-point) should be called only by the main thread.
  * Calling it from more than one thread is not supported.
  * Calling it from more than one thread is not supported.
  */
  */
-void starputop_debug_log(const char* message);
-void starputop_debug_lock(const char* message);
+void starpu_top_debug_log(const char* message);
+void starpu_top_debug_lock(const char* message);
 
 
 /****************************************************
 /****************************************************
 ***************** Callback function *****************
 ***************** Callback function *****************
 *****************************************************/
 *****************************************************/
 
 
-void starputop_process_input_message(char *message);
+void starpu_top_process_input_message(char *message);
 	
 	
 	
 	
 
 

+ 5 - 5
src/Makefile.am

@@ -109,8 +109,8 @@ noinst_HEADERS = 						\
 	profiling/profiling.h					\
 	profiling/profiling.h					\
 	util/starpu_insert_task_utils.h				\
 	util/starpu_insert_task_utils.h				\
 	starpu_parameters.h					\
 	starpu_parameters.h					\
-	top/starputop_message_queue.h				\
-	top/starputop_connection.h
+	top/starpu_top_message_queue.h				\
+	top/starpu_top_connection.h
 
 
 libstarpu_la_SOURCES = 						\
 libstarpu_la_SOURCES = 						\
 	common/barrier.c					\
 	common/barrier.c					\
@@ -203,9 +203,9 @@ libstarpu_la_SOURCES = 						\
 	profiling/bound.c					\
 	profiling/bound.c					\
 	profiling/profiling_helpers.c				\
 	profiling/profiling_helpers.c				\
 	top/starpu_top.c					\
 	top/starpu_top.c					\
-	top/starputop_task.c					\
-	top/starputop_message_queue.c				\
-	top/starputop_connection.c
+	top/starpu_top_task.c					\
+	top/starpu_top_message_queue.c				\
+	top/starpu_top_connection.c
 
 
 if STARPU_USE_CPU
 if STARPU_USE_CPU
 libstarpu_la_SOURCES += drivers/cpu/driver_cpu.c
 libstarpu_la_SOURCES += drivers/cpu/driver_cpu.c

+ 3 - 3
src/drivers/driver_common/driver_common.c

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  *
  * Copyright (C) 2010, 2011  Université de Bordeaux 1
  * Copyright (C) 2010, 2011  Université de Bordeaux 1
- * Copyright (C) 2010  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010, 2011  Centre National de la Recherche Scientifique
  * Copyright (C) 2011  Télécom-SudParis
  * Copyright (C) 2011  Télécom-SudParis
  *
  *
  * StarPU is free software; you can redistribute it and/or modify
  * StarPU is free software; you can redistribute it and/or modify
@@ -54,7 +54,7 @@ void _starpu_driver_start_job(struct starpu_worker_s *args, starpu_job_t j, stru
 	}
 	}
 
 
 	if (starpu_top)
 	if (starpu_top)
-		starputop_task_started(task,workerid,codelet_start);
+		starpu_top_task_started(task,workerid,codelet_start);
 
 
 	STARPU_TRACE_START_CODELET_BODY(j);
 	STARPU_TRACE_START_CODELET_BODY(j);
 }
 }
@@ -81,7 +81,7 @@ void _starpu_driver_end_job(struct starpu_worker_s *args, starpu_job_t j, struct
 	}
 	}
 
 
 	if (starpu_top)
 	if (starpu_top)
-	  starputop_task_ended(task,workerid,codelet_end);
+	  starpu_top_task_ended(task,workerid,codelet_end);
 
 
 	args->status = STATUS_UNKNOWN;
 	args->status = STATUS_UNKNOWN;
 }
 }

+ 6 - 6
src/sched_policies/heft.c

@@ -51,7 +51,7 @@ const float gamma_maximum=10000.0;
 const float idle_power_minimum=0;
 const float idle_power_minimum=0;
 const float idle_power_maximum=10000.0;
 const float idle_power_maximum=10000.0;
 
 
-static void param_modified(struct starputop_param_t* d){
+static void param_modified(struct starpu_top_param_t* d){
 	//just to show parameter modification
 	//just to show parameter modification
 	fprintf(stderr,"%s has been modified : alpha=%f|beta=%f|gamma=%f|idle_power=%f !\n", 
 	fprintf(stderr,"%s has been modified : alpha=%f|beta=%f|gamma=%f|idle_power=%f !\n", 
 		d->name, alpha,beta,_gamma,idle_power);
 		d->name, alpha,beta,_gamma,idle_power);
@@ -78,10 +78,10 @@ static void heft_init(struct starpu_machine_topology_s *topology,
 	if (strval_idle_power)
 	if (strval_idle_power)
 		idle_power = atof(strval_idle_power);
 		idle_power = atof(strval_idle_power);
 	
 	
-	starputop_register_parameter_float("HEFT_ALPHA", &alpha, alpha_minimum,alpha_maximum,param_modified);
-	starputop_register_parameter_float("HEFT_BETA", &beta, beta_minimum,beta_maximum,param_modified);
-	starputop_register_parameter_float("HEFT_GAMMA", &_gamma, gamma_minimum,gamma_maximum,param_modified);
-	starputop_register_parameter_float("HEFT_IDLE_POWER", &idle_power, idle_power_minimum,idle_power_maximum,param_modified);
+	starpu_top_register_parameter_float("HEFT_ALPHA", &alpha, alpha_minimum,alpha_maximum,param_modified);
+	starpu_top_register_parameter_float("HEFT_BETA", &beta, beta_minimum,beta_maximum,param_modified);
+	starpu_top_register_parameter_float("HEFT_GAMMA", &_gamma, gamma_minimum,gamma_maximum,param_modified);
+	starpu_top_register_parameter_float("HEFT_IDLE_POWER", &idle_power, idle_power_minimum,idle_power_maximum,param_modified);
 
 
 	unsigned workerid;
 	unsigned workerid;
 	for (workerid = 0; workerid < nworkers; workerid++)
 	for (workerid = 0; workerid < nworkers; workerid++)
@@ -195,7 +195,7 @@ static int push_task_on_best_worker(struct starpu_task *task, int best_workerid,
 	task->predicted_transfer = predicted_transfer;
 	task->predicted_transfer = predicted_transfer;
 
 
 	if (starpu_top_status_get())
 	if (starpu_top_status_get())
-		starputop_task_prevision(task, best_workerid, 
+		starpu_top_task_prevision(task, best_workerid, 
 					(unsigned long long)(exp_end[best_workerid]-predicted)/1000,
 					(unsigned long long)(exp_end[best_workerid]-predicted)/1000,
 					(unsigned long long)exp_end[best_workerid]/1000);
 					(unsigned long long)exp_end[best_workerid]/1000);
 
 

+ 159 - 158
src/top/starpu_top.c

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  *
- * Copyright (C) 2011 William Braik, Yann Courtois, Jean-Marie Couteyen, Anthony
- * Roy
+ * Copyright (C) 2011 William Braik, Yann Courtois, Jean-Marie Couteyen, Anthony Roy
+ * Copyright (C) 2011 Centre National de la Recherche Scientifique
  *
  *
  * StarPU is free software; you can redistribute it and/or modify
  * 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
  * it under the terms of the GNU Lesser General Public License as published by
@@ -17,8 +17,9 @@
 
 
 
 
 #include <starpu_top.h>
 #include <starpu_top.h>
-#include <top/starputop_message_queue.h>
-#include <top/starputop_connection.h>
+#include <top/starpu_top_message_queue.h>
+#include <top/starpu_top_connection.h>
+#include <top/starpu_top_core.h>
 #include <profiling/profiling.h>
 #include <profiling/profiling.h>
 #include <stdio.h>
 #include <stdio.h>
 #include <string.h>
 #include <string.h>
@@ -26,19 +27,19 @@
 #include <pthread.h>
 #include <pthread.h>
 #include <common/timing.h>
 #include <common/timing.h>
 
 
-extern starputop_message_queue_t*  starputop_mt;
+extern starpu_top_message_queue_t*  starpu_top_mt;
 int starpu_top = 0;
 int starpu_top = 0;
-int starputop_debug_on = 0;
-unsigned int starputop_data_cpt = 0;
-unsigned int starputop_param_cpt = 0;
-starputop_data* starputop_first_data = NULL;
-starputop_param* starputop_first_param = NULL;
-starputop_data** starputop_datas;
-starputop_param** starputop_params;
-
-sem_t starputop_wait_for_go;
-pthread_mutex_t starputop_wait_for_continue_mutex;
-pthread_cond_t starputop_wait_for_continue_cond = PTHREAD_COND_INITIALIZER;
+int starpu_top_debug_on = 0;
+unsigned int starpu_top_data_cpt = 0;
+unsigned int starpu_top_param_cpt = 0;
+starpu_top_data* starpu_top_first_data = NULL;
+starpu_top_param* starpu_top_first_param = NULL;
+starpu_top_data** starpu_top_datas;
+starpu_top_param** starpu_top_params;
+
+sem_t starpu_top_wait_for_go;
+pthread_mutex_t starpu_top_wait_for_continue_mutex;
+pthread_cond_t starpu_top_wait_for_continue_cond = PTHREAD_COND_INITIALIZER;
 
 
 int starpu_top_status_get()
 int starpu_top_status_get()
 {
 {
@@ -52,8 +53,8 @@ unsigned long long int current_timestamp();
 *****************INIT FUNC********************
 *****************INIT FUNC********************
 **********************************************/
 **********************************************/
 
 
-char *message_for_topdata_init(starputop_data* data);
-char *message_for_topparam_init(starputop_param* param);
+char *message_for_topdata_init(starpu_top_data* data);
+char *message_for_topparam_init(starpu_top_param* param);
 
 
 /*
 /*
  * we store data and param in a tab to offer a O(1) access when the program  is
  * we store data and param in a tab to offer a O(1) access when the program  is
@@ -63,25 +64,25 @@ void copy_data_and_param()
 {
 {
 	printf("%s:%d trace\n", __FILE__, __LINE__);
 	printf("%s:%d trace\n", __FILE__, __LINE__);
 	//copying datas
 	//copying datas
-	starputop_datas = (starputop_data **) malloc(starputop_data_cpt*sizeof(starputop_data*));
-	starputop_data* cur = starputop_first_data;
+	starpu_top_datas = (starpu_top_data **) malloc(starpu_top_data_cpt*sizeof(starpu_top_data*));
+	starpu_top_data* cur = starpu_top_first_data;
 	unsigned int i = 0;
 	unsigned int i = 0;
-	for(i = 0; i < starputop_data_cpt; i++)
+	for(i = 0; i < starpu_top_data_cpt; i++)
 	{
 	{
-		starputop_datas[i] = cur;
+		starpu_top_datas[i] = cur;
 		cur = cur->next;
 		cur = cur->next;
 	}
 	}
 	//copying params
 	//copying params
-	starputop_params = (starputop_param **) malloc(starputop_param_cpt*sizeof(starputop_param*));
-	starputop_param* cur2 = starputop_first_param;
-	for(i = 0; i < starputop_param_cpt; i++)
+	starpu_top_params = (starpu_top_param **) malloc(starpu_top_param_cpt*sizeof(starpu_top_param*));
+	starpu_top_param* cur2 = starpu_top_first_param;
+	for(i = 0; i < starpu_top_param_cpt; i++)
 	{
 	{
-		starputop_params[i] = cur2;
+		starpu_top_params[i] = cur2;
 		cur2 = cur2->next;
 		cur2 = cur2->next;
 	}
 	}
 }
 }
 
 
-static void starputop_get_device_type(int id, char* type){
+static void starpu_top_get_device_type(int id, char* type){
 	enum starpu_archtype device_type=starpu_worker_get_type(id);
 	enum starpu_archtype device_type=starpu_worker_get_type(id);
 	switch (device_type)
 	switch (device_type)
 	{
 	{
@@ -100,11 +101,11 @@ static void starputop_get_device_type(int id, char* type){
 	}  
 	}  
 }
 }
 
 
-static void starputop_send_devices_info()
+static void starpu_top_send_devices_info()
 {
 {
 	char* message=(char *)malloc(5*sizeof(char));
 	char* message=(char *)malloc(5*sizeof(char));
 	snprintf(message,5,"DEV\n");
 	snprintf(message,5,"DEV\n");
-	starputop_message_add(starputop_mt,message);
+	starpu_top_message_add(starpu_top_mt,message);
 
 
 	unsigned int i;
 	unsigned int i;
 	for(i=0;i<starpu_worker_get_count();i++)
 	for(i=0;i<starpu_worker_get_count();i++)
@@ -112,83 +113,83 @@ static void starputop_send_devices_info()
 		message=(char *)malloc(sizeof(char)*128);
 		message=(char *)malloc(sizeof(char)*128);
 		char dev_type[10];
 		char dev_type[10];
 		char dev_name[64];
 		char dev_name[64];
-		starputop_get_device_type(i,dev_type);
+		starpu_top_get_device_type(i,dev_type);
 		starpu_worker_get_name(i, dev_name,64);
 		starpu_worker_get_name(i, dev_name,64);
 		snprintf(message, 128, "%u;%s;%s\n", i, dev_type, dev_name);
 		snprintf(message, 128, "%u;%s;%s\n", i, dev_type, dev_name);
-		starputop_message_add(starputop_mt,message);    
+		starpu_top_message_add(starpu_top_mt,message);    
 	}
 	}
 
 
 	message=(char*)malloc(6*sizeof(char));                             
 	message=(char*)malloc(6*sizeof(char));                             
 	snprintf(message,6,"/DEV\n");                
 	snprintf(message,6,"/DEV\n");                
-	starputop_message_add(starputop_mt,message);  
+	starpu_top_message_add(starpu_top_mt,message);  
 }
 }
 
 
 
 
-void starputop_init_and_wait(const char* server_name){
+void starpu_top_init_and_wait(const char* server_name){
 	starpu_top=1;
 	starpu_top=1;
-	sem_init(&starputop_wait_for_go,0,0);
+	sem_init(&starpu_top_wait_for_go,0,0);
 	
 	
-	pthread_mutex_init(&starputop_wait_for_continue_mutex, NULL);
+	pthread_mutex_init(&starpu_top_wait_for_continue_mutex, NULL);
 	
 	
 	//profiling activation
 	//profiling activation
 	starpu_profiling_status_set(STARPU_PROFILING_ENABLE);
 	starpu_profiling_status_set(STARPU_PROFILING_ENABLE);
 
 
 	//init locked queue before adding the first message
 	//init locked queue before adding the first message
-	starputop_mt = starputop_message_queue_new();
-	STARPU_ASSERT(starputop_mt);
+	starpu_top_mt = starpu_top_message_queue_new();
+	STARPU_ASSERT(starpu_top_mt);
 
 
 	//waiting for UI to connect
 	//waiting for UI to connect
 	printf("%s:%d launching network threads\n", __FILE__, __LINE__);
 	printf("%s:%d launching network threads\n", __FILE__, __LINE__);
-	starputop_communications_threads_launcher();
+	starpu_top_communications_threads_launcher();
 
 
 	//sending server information (report to protocol)
 	//sending server information (report to protocol)
 	char* message = (char *) malloc(strlen("SERVERINFO\n")+1);
 	char* message = (char *) malloc(strlen("SERVERINFO\n")+1);
 	sprintf(message, "%s", "SERVERINFO\n");  
 	sprintf(message, "%s", "SERVERINFO\n");  
-	starputop_message_add(starputop_mt,message);
+	starpu_top_message_add(starpu_top_mt,message);
 	message = (char *) malloc(strlen(server_name)+2);
 	message = (char *) malloc(strlen(server_name)+2);
 	sprintf(message, "%s\n", server_name);
 	sprintf(message, "%s\n", server_name);
-	starputop_message_add(starputop_mt,message);
+	starpu_top_message_add(starpu_top_mt,message);
 	message = (char *) malloc(25);
 	message = (char *) malloc(25);
 	sprintf(message, "%lld\n", current_timestamp());
 	sprintf(message, "%lld\n", current_timestamp());
-	starputop_message_add(starputop_mt,message);
+	starpu_top_message_add(starpu_top_mt,message);
 	message = (char *) malloc(strlen("/SERVERINFO\n")+1);
 	message = (char *) malloc(strlen("/SERVERINFO\n")+1);
 	sprintf(message,"%s", "/SERVERINFO\n");
 	sprintf(message,"%s", "/SERVERINFO\n");
-	starputop_message_add(starputop_mt,message);
+	starpu_top_message_add(starpu_top_mt,message);
 
 
 
 
 	//sending data list
 	//sending data list
 	message = (char *) malloc(strlen("DATA\n")+1);
 	message = (char *) malloc(strlen("DATA\n")+1);
 	sprintf(message, "%s", "DATA\n");
 	sprintf(message, "%s", "DATA\n");
-	starputop_message_add(starputop_mt,message);
-	starputop_data * cur_data = starputop_first_data;
+	starpu_top_message_add(starpu_top_mt,message);
+	starpu_top_data * cur_data = starpu_top_first_data;
 	while(cur_data != NULL)
 	while(cur_data != NULL)
 	{
 	{
-		starputop_message_add(starputop_mt,message_for_topdata_init(cur_data));
+		starpu_top_message_add(starpu_top_mt,message_for_topdata_init(cur_data));
 		cur_data = cur_data->next;
 		cur_data = cur_data->next;
 	}
 	}
 	message = (char *) malloc(strlen("/DATA\n")+1);
 	message = (char *) malloc(strlen("/DATA\n")+1);
 	sprintf(message, "%s", "/DATA\n");
 	sprintf(message, "%s", "/DATA\n");
-	starputop_message_add(starputop_mt,message);
+	starpu_top_message_add(starpu_top_mt,message);
 	
 	
 	//sending parameter list
 	//sending parameter list
 	message = (char *) malloc(strlen("PARAMS\n")+1);
 	message = (char *) malloc(strlen("PARAMS\n")+1);
 	sprintf(message, "%s", "PARAMS\n");
 	sprintf(message, "%s", "PARAMS\n");
-	starputop_message_add(starputop_mt,message);
-	starputop_param * cur_param = starputop_first_param;
+	starpu_top_message_add(starpu_top_mt,message);
+	starpu_top_param * cur_param = starpu_top_first_param;
 	printf("%s:%d sending parameters\n", __FILE__, __LINE__);
 	printf("%s:%d sending parameters\n", __FILE__, __LINE__);
 	while(cur_param != NULL){
 	while(cur_param != NULL){
-	  starputop_message_add(starputop_mt,message_for_topparam_init(cur_param));
+	  starpu_top_message_add(starpu_top_mt,message_for_topparam_init(cur_param));
 	  cur_param = cur_param->next;
 	  cur_param = cur_param->next;
 	}
 	}
 	printf("%s:%d parameters sended\n", __FILE__, __LINE__);
 	printf("%s:%d parameters sended\n", __FILE__, __LINE__);
 	message = (char *) malloc(strlen("/PARAMS\n")+1);
 	message = (char *) malloc(strlen("/PARAMS\n")+1);
 	sprintf(message, "%s", "/PARAMS\n");
 	sprintf(message, "%s", "/PARAMS\n");
-	starputop_message_add(starputop_mt,message);
+	starpu_top_message_add(starpu_top_mt,message);
 	
 	
 	
 	
 	//sending DEVICE list
 	//sending DEVICE list
 	printf("%s:%d sending devices info\n", __FILE__, __LINE__);
 	printf("%s:%d sending devices info\n", __FILE__, __LINE__);
-	starputop_send_devices_info();
+	starpu_top_send_devices_info();
 	printf("%s:%d devices_info sended\n", __FILE__, __LINE__);
 	printf("%s:%d devices_info sended\n", __FILE__, __LINE__);
 	//copying data and params
 	//copying data and params
 	copy_data_and_param();
 	copy_data_and_param();
@@ -196,97 +197,97 @@ void starputop_init_and_wait(const char* server_name){
 	//sending READY message
 	//sending READY message
 	message = (char *) malloc(strlen("READY\n")+1);
 	message = (char *) malloc(strlen("READY\n")+1);
 	sprintf(message, "%s", "READY\n");
 	sprintf(message, "%s", "READY\n");
-	starputop_message_add(starputop_mt,message);
+	starpu_top_message_add(starpu_top_mt,message);
 	
 	
 	//This threads keeps locked while we don't receive an GO message from UI
 	//This threads keeps locked while we don't receive an GO message from UI
 	printf("%s:%d waiting for GO message\n", __FILE__, __LINE__);
 	printf("%s:%d waiting for GO message\n", __FILE__, __LINE__);
-	sem_wait(&starputop_wait_for_go);
+	sem_wait(&starpu_top_wait_for_go);
 }
 }
 
 
-void starputop_enqueue_data(starputop_data * data)
+void starpu_top_enqueue_data(starpu_top_data * data)
 {
 {
-	if(starputop_first_data == NULL)
+	if(starpu_top_first_data == NULL)
 	{
 	{
-		starputop_first_data = data;
+		starpu_top_first_data = data;
 	}
 	}
 	else
 	else
 	{
 	{
-		starputop_data * cur = starputop_first_data;
+		starpu_top_data * cur = starpu_top_first_data;
 		while(cur->next != NULL)
 		while(cur->next != NULL)
 			cur = cur->next;
 			cur = cur->next;
 		cur->next = data;
 		cur->next = data;
 	}
 	}
 }
 }
 
 
-starputop_data * starputop_add_data_boolean(
+starpu_top_data * starpu_top_add_data_boolean(
 			const char* data_name,
 			const char* data_name,
 			int active)
 			int active)
 {		
 {		
-	starputop_data * data = (starputop_data *) malloc(sizeof(starputop_data));
-	data->id = starputop_data_cpt++;
+	starpu_top_data * data = (starpu_top_data *) malloc(sizeof(starpu_top_data));
+	data->id = starpu_top_data_cpt++;
 	data->name = data_name;
 	data->name = data_name;
-	data->type = STARPUTOP_DATA_BOOLEAN;
+	data->type = STARPU_TOP_DATA_BOOLEAN;
 	data->active = active;
 	data->active = active;
 	data->next = NULL;
 	data->next = NULL;
 
 
-	starputop_enqueue_data(data);
+	starpu_top_enqueue_data(data);
 
 
 	return data;
 	return data;
 }
 }
 
 
-starputop_data * starputop_add_data_integer(
+starpu_top_data * starpu_top_add_data_integer(
 			const char* data_name,
 			const char* data_name,
 			int minimum_value,
 			int minimum_value,
 			int maximum_value,
 			int maximum_value,
 			int active)
 			int active)
 {	
 {	
-	starputop_data * data = (starputop_data *) malloc(sizeof(starputop_data));
-	data->id = starputop_data_cpt++;
+	starpu_top_data * data = (starpu_top_data *) malloc(sizeof(starpu_top_data));
+	data->id = starpu_top_data_cpt++;
 	data->name = data_name; 
 	data->name = data_name; 
-	data->type = STARPUTOP_DATA_INTEGER;
+	data->type = STARPU_TOP_DATA_INTEGER;
 	data->int_min_value = minimum_value;
 	data->int_min_value = minimum_value;
 	data->int_max_value = maximum_value;
 	data->int_max_value = maximum_value;
 	data->active = active;
 	data->active = active;
 	data->next = NULL;
 	data->next = NULL;
 
 
-	starputop_enqueue_data(data);
+	starpu_top_enqueue_data(data);
 
 
 	return data;
 	return data;
 }
 }
 
 
-starputop_data* starputop_add_data_float(
+starpu_top_data* starpu_top_add_data_float(
 			const char* data_name,
 			const char* data_name,
 			double minimum_value,
 			double minimum_value,
 			double maximum_value,
 			double maximum_value,
 			int active)
 			int active)
 {
 {
-	starputop_data * data = (starputop_data *) malloc(sizeof(starputop_data));
-	data->id = starputop_data_cpt++;
+	starpu_top_data * data = (starpu_top_data *) malloc(sizeof(starpu_top_data));
+	data->id = starpu_top_data_cpt++;
 	data->name = data_name;
 	data->name = data_name;
-	data->type = STARPUTOP_DATA_FLOAT;
+	data->type = STARPU_TOP_DATA_FLOAT;
 	data->double_min_value = minimum_value;
 	data->double_min_value = minimum_value;
 	data->double_max_value = maximum_value;
 	data->double_max_value = maximum_value;
 	data->active = active;
 	data->active = active;
 	data->next = NULL;
 	data->next = NULL;
 
 
-	starputop_enqueue_data(data);
+	starpu_top_enqueue_data(data);
 
 
 	return data;
 	return data;
 }
 }
 
 
-char *message_for_topdata_init(starputop_data* data)
+char *message_for_topdata_init(starpu_top_data* data)
 {
 {
 	char*message = (char *) malloc(256+strlen(data->name));
 	char*message = (char *) malloc(256+strlen(data->name));
 	switch(data->type)
 	switch(data->type)
 	{
 	{
-		case STARPUTOP_DATA_BOOLEAN:
+		case STARPU_TOP_DATA_BOOLEAN:
 			sprintf(message,
 			sprintf(message,
 					"BOOL;%d;%s;%d\n",
 					"BOOL;%d;%s;%d\n",
 					data->id,
 					data->id,
 					data->name,
 					data->name,
 					data->active ? 1 : 0);
 					data->active ? 1 : 0);
 			break;
 			break;
-		case STARPUTOP_DATA_INTEGER:
+		case STARPU_TOP_DATA_INTEGER:
 			sprintf(message,
 			sprintf(message,
 					"INT;%d;%s;%d;%d;%d\n",
 					"INT;%d;%s;%d;%d;%d\n",
 					data->id,
 					data->id,
@@ -295,7 +296,7 @@ char *message_for_topdata_init(starputop_data* data)
 					data->int_max_value,
 					data->int_max_value,
 					data->active ? 1 : 0);
 					data->active ? 1 : 0);
 			break;
 			break;
-		case STARPUTOP_DATA_FLOAT:
+		case STARPU_TOP_DATA_FLOAT:
 			sprintf(message,
 			sprintf(message,
 					"FLOAT;%d;%s;%f;%f;%d\n",
 					"FLOAT;%d;%s;%f;%f;%d\n",
 					data->id,
 					data->id,
@@ -308,14 +309,14 @@ char *message_for_topdata_init(starputop_data* data)
 	return message;
 	return message;
 }
 }
 
 
-char *message_for_topparam_init(starputop_param* param)
+char *message_for_topparam_init(starpu_top_param* param)
 {
 {
 	char*message = NULL;
 	char*message = NULL;
 	int i;
 	int i;
 	int length=0;
 	int length=0;
 	switch(param->type)
 	switch(param->type)
 	{
 	{
-	case STARPUTOP_PARAM_BOOLEAN:
+	case STARPU_TOP_PARAM_BOOLEAN:
 		message = (char *) malloc(256);
 		message = (char *) malloc(256);
 		sprintf(message,
 		sprintf(message,
 				"BOOL;%d;%s;%d\n",
 				"BOOL;%d;%s;%d\n",
@@ -323,7 +324,7 @@ char *message_for_topparam_init(starputop_param* param)
 				param->name,
 				param->name,
 				(*(int*)(param->value)) ? 1 : 0);
 				(*(int*)(param->value)) ? 1 : 0);
 		break;
 		break;
-	case STARPUTOP_PARAM_INTEGER:
+	case STARPU_TOP_PARAM_INTEGER:
 		message = (char *) malloc(256);
 		message = (char *) malloc(256);
 		sprintf(message,
 		sprintf(message,
 				"INT;%d;%s;%d;%d;%d\n",param->id,
 				"INT;%d;%s;%d;%d;%d\n",param->id,
@@ -332,7 +333,7 @@ char *message_for_topparam_init(starputop_param* param)
 				param->int_max_value,
 				param->int_max_value,
 				*(int*)(param->value));
 				*(int*)(param->value));
 		break;
 		break;
-	case STARPUTOP_PARAM_FLOAT:
+	case STARPU_TOP_PARAM_FLOAT:
 		message = (char *) malloc(256);
 		message = (char *) malloc(256);
 		sprintf(message,
 		sprintf(message,
 				"FLOAT;%d;%s;%f;%f;%f\n",
 				"FLOAT;%d;%s;%f;%f;%f\n",
@@ -342,7 +343,7 @@ char *message_for_topparam_init(starputop_param* param)
 				param->double_max_value,
 				param->double_max_value,
 				*(double*)(param->value));
 				*(double*)(param->value));
 		break;
 		break;
-	case STARPUTOP_PARAM_ENUM:
+	case STARPU_TOP_PARAM_ENUM:
 		//compute message lenght
 		//compute message lenght
 		for(i = 0; i < param->nb_values; i++)
 		for(i = 0; i < param->nb_values; i++)
 		{
 		{
@@ -372,15 +373,15 @@ char *message_for_topparam_init(starputop_param* param)
 	return message;
 	return message;
 }
 }
 
 
-void starputop_enqueue_param(starputop_param* param)
+void starpu_top_enqueue_param(starpu_top_param* param)
 {
 {
-	if(starputop_first_param == NULL)
+	if(starpu_top_first_param == NULL)
 	{
 	{
-		starputop_first_param = param;
+		starpu_top_first_param = param;
 	}
 	}
 	else
 	else
 	{
 	{
-		starputop_param * cur = starputop_first_param;
+		starpu_top_param * cur = starpu_top_first_param;
 		while(cur->next != NULL)
 		while(cur->next != NULL)
 			cur = cur->next;
 			cur = cur->next;
 		cur->next = param;
 		cur->next = param;
@@ -388,89 +389,89 @@ void starputop_enqueue_param(starputop_param* param)
 }
 }
 
 
 
 
-starputop_param* starputop_register_parameter_boolean(
+starpu_top_param* starpu_top_register_parameter_boolean(
 			const char* param_name,
 			const char* param_name,
 			int* parameter_field,
 			int* parameter_field,
-			void (*callback)(struct starputop_param_t*))
+			void (*callback)(struct starpu_top_param_t*))
 {
 {
     STARPU_ASSERT(!starpu_top_status_get());
     STARPU_ASSERT(!starpu_top_status_get());
-	starputop_param * param = (starputop_param *) malloc(sizeof(starputop_param));
+	starpu_top_param * param = (starpu_top_param *) malloc(sizeof(starpu_top_param));
 	param->callback = callback;
 	param->callback = callback;
 	param->name = param_name;
 	param->name = param_name;
-	param->id = starputop_param_cpt++;
-	param->type = STARPUTOP_PARAM_BOOLEAN;
+	param->id = starpu_top_param_cpt++;
+	param->type = STARPU_TOP_PARAM_BOOLEAN;
 	param->value = (void*)parameter_field;
 	param->value = (void*)parameter_field;
 	param->next = NULL;
 	param->next = NULL;
 	
 	
-	starputop_enqueue_param(param);
+	starpu_top_enqueue_param(param);
 	
 	
 	return param;
 	return param;
 }
 }
 
 
 
 
-starputop_param* starputop_register_parameter_integer(const char* param_name,
+starpu_top_param* starpu_top_register_parameter_integer(const char* param_name,
 			int* parameter_field,
 			int* parameter_field,
 			int minimum_value,
 			int minimum_value,
 			int maximum_value,
 			int maximum_value,
-			void (*callback)(struct starputop_param_t*))
+			void (*callback)(struct starpu_top_param_t*))
 {	
 {	
 	STARPU_ASSERT(!starpu_top_status_get());
 	STARPU_ASSERT(!starpu_top_status_get());
-	starputop_param * param = (starputop_param *) malloc(sizeof(starputop_param));
+	starpu_top_param * param = (starpu_top_param *) malloc(sizeof(starpu_top_param));
 	param->callback = callback;
 	param->callback = callback;
 	param->name = param_name;
 	param->name = param_name;
-	param->id = starputop_param_cpt++;
-	param->type = STARPUTOP_PARAM_INTEGER;
+	param->id = starpu_top_param_cpt++;
+	param->type = STARPU_TOP_PARAM_INTEGER;
 	param->value = (void*)parameter_field;
 	param->value = (void*)parameter_field;
 	param->int_min_value = minimum_value;
 	param->int_min_value = minimum_value;
 	param->int_max_value = maximum_value;
 	param->int_max_value = maximum_value;
 	param->next = NULL;
 	param->next = NULL;
 
 
-	starputop_enqueue_param(param);
+	starpu_top_enqueue_param(param);
 	
 	
 	return param;
 	return param;
 }
 }
-starputop_param* starputop_register_parameter_float(
+starpu_top_param* starpu_top_register_parameter_float(
 			const char* param_name,
 			const char* param_name,
 			double* parameter_field,
 			double* parameter_field,
 			double minimum_value,
 			double minimum_value,
 			double maximum_value,
 			double maximum_value,
-			void (*callback)(struct starputop_param_t*))
+			void (*callback)(struct starpu_top_param_t*))
 {
 {
 	STARPU_ASSERT(!starpu_top_status_get());
 	STARPU_ASSERT(!starpu_top_status_get());
-	starputop_param * param = (starputop_param *) malloc(sizeof(starputop_param));
+	starpu_top_param * param = (starpu_top_param *) malloc(sizeof(starpu_top_param));
 	param->callback = callback;
 	param->callback = callback;
 	param->name = param_name;
 	param->name = param_name;
-	param->id = starputop_param_cpt++;
-	param->type = STARPUTOP_PARAM_FLOAT;
+	param->id = starpu_top_param_cpt++;
+	param->type = STARPU_TOP_PARAM_FLOAT;
 	param->value = (void*)parameter_field;
 	param->value = (void*)parameter_field;
 	param->double_min_value = minimum_value;
 	param->double_min_value = minimum_value;
 	param->double_max_value = maximum_value;
 	param->double_max_value = maximum_value;
 	param->next = NULL;
 	param->next = NULL;
 
 
-	starputop_enqueue_param(param);
+	starpu_top_enqueue_param(param);
 
 
 	return param;
 	return param;
 }
 }
 
 
-starputop_param* starputop_register_parameter_enum(
+starpu_top_param* starpu_top_register_parameter_enum(
 			const char* param_name,
 			const char* param_name,
 			int* parameter_field,
 			int* parameter_field,
 			char** values,
 			char** values,
 			int nb_values,
 			int nb_values,
-			void (*callback)(struct starputop_param_t*))
+			void (*callback)(struct starpu_top_param_t*))
 {
 {
 	STARPU_ASSERT(!starpu_top_status_get());
 	STARPU_ASSERT(!starpu_top_status_get());
-	starputop_param * param = (starputop_param *) malloc(sizeof(starputop_param));
+	starpu_top_param * param = (starpu_top_param *) malloc(sizeof(starpu_top_param));
 	param->callback = callback;
 	param->callback = callback;
 	param->name = param_name;
 	param->name = param_name;
-	param->id = starputop_param_cpt++;
-	param->type = STARPUTOP_PARAM_ENUM;
+	param->id = starpu_top_param_cpt++;
+	param->type = STARPU_TOP_PARAM_ENUM;
 	param->value = (void*)parameter_field;
 	param->value = (void*)parameter_field;
 	param->enum_values = values;
 	param->enum_values = values;
 	param->nb_values = nb_values;
 	param->nb_values = nb_values;
 	param->next = NULL;
 	param->next = NULL;
 	
 	
-	starputop_enqueue_param(param);
+	starpu_top_enqueue_param(param);
 
 
 	return param;
 	return param;
 }
 }
@@ -478,7 +479,7 @@ starputop_param* starputop_register_parameter_enum(
 *****************UPDATE FUNC******************
 *****************UPDATE FUNC******************
 **********************************************/
 **********************************************/
 
 
-void starputop_update_data_boolean(const starputop_data* data, int value){
+void starpu_top_update_data_boolean(const starpu_top_data* data, int value){
 	if (!starpu_top_status_get())
 	if (!starpu_top_status_get())
 		return;
 		return;
 	if(data->active)
 	if(data->active)
@@ -489,10 +490,10 @@ void starputop_update_data_boolean(const starputop_data* data, int value){
 				data->id,
 				data->id,
 				(value?1:0),
 				(value?1:0),
 				current_timestamp());
 				current_timestamp());
-		starputop_message_add(starputop_mt,message);
+		starpu_top_message_add(starpu_top_mt,message);
 	}
 	}
 }
 }
-void starputop_update_data_integer(const starputop_data* data,int value){
+void starpu_top_update_data_integer(const starpu_top_data* data,int value){
 	if (!starpu_top_status_get())
 	if (!starpu_top_status_get())
 		return;
 		return;
 	if(data->active)
 	if(data->active)
@@ -503,10 +504,10 @@ void starputop_update_data_integer(const starputop_data* data,int value){
 				data->id,
 				data->id,
 				value,
 				value,
 				current_timestamp());
 				current_timestamp());
-		starputop_message_add(starputop_mt,message);
+		starpu_top_message_add(starpu_top_mt,message);
 	}
 	}
 }
 }
-void starputop_update_data_float(const starputop_data* data, double value){
+void starpu_top_update_data_float(const starpu_top_data* data, double value){
 	if (!starpu_top_status_get())
 	if (!starpu_top_status_get())
 		return;
 		return;
 	if(data->active)
 	if(data->active)
@@ -516,19 +517,19 @@ void starputop_update_data_float(const starputop_data* data, double value){
 				"U;%d;%f;%lld\n",
 				"U;%d;%f;%lld\n",
 				data->id, value,
 				data->id, value,
 				current_timestamp());
 				current_timestamp());
-		starputop_message_add(starputop_mt,message);
+		starpu_top_message_add(starpu_top_mt,message);
 	}
 	}
 }
 }
-void starputop_update_parameter(const starputop_param* param){
+void starpu_top_update_parameter(const starpu_top_param* param){
 	if (!starpu_top_status_get())
 	if (!starpu_top_status_get())
 		return;
 		return;
 	char*message = (char *) malloc(50);
 	char*message = (char *) malloc(50);
 
 
 	switch(param->type)
 	switch(param->type)
 	{
 	{
-		case STARPUTOP_PARAM_BOOLEAN:
-		case STARPUTOP_PARAM_INTEGER:
-		case STARPUTOP_PARAM_ENUM:
+		case STARPU_TOP_PARAM_BOOLEAN:
+		case STARPU_TOP_PARAM_INTEGER:
+		case STARPU_TOP_PARAM_ENUM:
 			sprintf(message,
 			sprintf(message,
 					"SET;%d;%d;%lld\n",
 					"SET;%d;%d;%lld\n",
 					param->id,
 					param->id,
@@ -536,7 +537,7 @@ void starputop_update_parameter(const starputop_param* param){
 					current_timestamp());
 					current_timestamp());
 			break;
 			break;
 		
 		
-		case STARPUTOP_PARAM_FLOAT:
+		case STARPU_TOP_PARAM_FLOAT:
 			sprintf(message,
 			sprintf(message,
 					"SET;%d;%f;%lld\n",
 					"SET;%d;%f;%lld\n",
 					param->id,
 					param->id,
@@ -545,16 +546,16 @@ void starputop_update_parameter(const starputop_param* param){
 			break;
 			break;
 	}
 	}
 	
 	
-	starputop_message_add(starputop_mt,message);	
+	starpu_top_message_add(starpu_top_mt,message);	
 }
 }
 
 
 /*********************************************
 /*********************************************
 *****************DEBUG FUNC******************
 *****************DEBUG FUNC******************
 **********************************************/
 **********************************************/
 
 
-void starputop_debug_log(const char* debug_message)
+void starpu_top_debug_log(const char* debug_message)
 {
 {
-	if(starputop_debug_on)
+	if(starpu_top_debug_on)
 	{
 	{
 		//length can be up to strlen*2, if message contains only unwanted chars
 		//length can be up to strlen*2, if message contains only unwanted chars
 		char * message = (char *) malloc(strlen(debug_message)*2+16);
 		char * message = (char *) malloc(strlen(debug_message)*2+16);
@@ -577,12 +578,12 @@ void starputop_debug_log(const char* debug_message)
 		cur++;
 		cur++;
 		*cur='\0';
 		*cur='\0';
 
 
-		starputop_message_add(starputop_mt,message);
+		starpu_top_message_add(starpu_top_mt,message);
 	}
 	}
 }
 }
-void starputop_debug_lock(const char* debug_message)
+void starpu_top_debug_lock(const char* debug_message)
 {
 {
-	if(starputop_debug_on)
+	if(starpu_top_debug_on)
 	{
 	{
 		char * message = (char *) malloc(strlen(debug_message)*2+16);
 		char * message = (char *) malloc(strlen(debug_message)*2+16);
 		sprintf(message,"LOCK;");
 		sprintf(message,"LOCK;");
@@ -601,12 +602,12 @@ void starputop_debug_lock(const char* debug_message)
 		*cur='\n';
 		*cur='\n';
 		*(cur+1)='\0';
 		*(cur+1)='\0';
 
 
-		starputop_message_add(starputop_mt,message);
+		starpu_top_message_add(starpu_top_mt,message);
 
 
 		//This threads keeps locked while we don't receive an STEP message
 		//This threads keeps locked while we don't receive an STEP message
-		pthread_mutex_lock(&starputop_wait_for_continue_mutex);
-		pthread_cond_wait(&starputop_wait_for_continue_cond,&starputop_wait_for_continue_mutex);
-		pthread_mutex_unlock(&starputop_wait_for_continue_mutex);
+		pthread_mutex_lock(&starpu_top_wait_for_continue_mutex);
+		pthread_cond_wait(&starpu_top_wait_for_continue_cond,&starpu_top_wait_for_continue_mutex);
+		pthread_mutex_unlock(&starpu_top_wait_for_continue_mutex);
 	}
 	}
 }
 }
 
 
@@ -620,19 +621,19 @@ unsigned long long int current_timestamp()
 {
 {
 	struct timespec now;
 	struct timespec now;
 	starpu_clock_gettime(&now);
 	starpu_clock_gettime(&now);
-	return starpu_timing_timespec_to_ms(&now);
+	return _starpu_top_timing_timespec_to_ms(&now);
 }
 }
 
 
-unsigned long long starpu_timing_timespec_to_ms(const struct timespec *ts)
+unsigned long long _starpu_top_timing_timespec_to_ms(const struct timespec *ts)
 {
 {
-  return (1000.0*ts->tv_sec) + (0.000001*ts->tv_nsec);
+	return (1000.0*ts->tv_sec) + (0.000001*ts->tv_nsec);
 }
 }
 
 
 /********************************************
 /********************************************
  **************INPUT PROCESSING**************
  **************INPUT PROCESSING**************
  *******************************************/
  *******************************************/
 
 
-starputop_message_type starputop_get_message_type(const char* message)
+starpu_top_message_type starpu_top_get_message_type(const char* message)
 {
 {
 	if(!strncmp("GO\n", message,3))
 	if(!strncmp("GO\n", message,3))
 		return TOP_TYPE_GO;
 		return TOP_TYPE_GO;
@@ -651,44 +652,44 @@ starputop_message_type starputop_get_message_type(const char* message)
 }
 }
 
 
 
 
-void starputop_unlock_starpu()
+void starpu_top_unlock_starpu()
 {
 {
-	sem_post(&starputop_wait_for_go);
+	sem_post(&starpu_top_wait_for_go);
 	printf("%s:%d starpu started\n", __FILE__, __LINE__);
 	printf("%s:%d starpu started\n", __FILE__, __LINE__);
 }
 }
 
 
-void starputop_change_data_active(char* message, int active)
+void starpu_top_change_data_active(char* message, int active)
 {
 {
 	char* debut = strstr(message, ";")+1;
 	char* debut = strstr(message, ";")+1;
 	char* fin = strstr(debut+1, "\n");
 	char* fin = strstr(debut+1, "\n");
 	*fin = '\0';
 	*fin = '\0';
 	int data_id = atoi(debut);
 	int data_id = atoi(debut);
 	printf("%s:%d data %d %s\n", __FILE__, __LINE__, data_id, active ? "ENABLED" : "DISABLE");
 	printf("%s:%d data %d %s\n", __FILE__, __LINE__, data_id, active ? "ENABLED" : "DISABLE");
-	starputop_datas[data_id]->active = active;
+	starpu_top_datas[data_id]->active = active;
 }
 }
 
 
-void starputop_change_parameter_value(const char* message){
+void starpu_top_change_parameter_value(const char* message){
 	const char*tmp = strstr(message, ";")+1;
 	const char*tmp = strstr(message, ";")+1;
 	int param_id = atoi(tmp);
 	int param_id = atoi(tmp);
-	starputop_param* param = starputop_params[param_id];
+	starpu_top_param* param = starpu_top_params[param_id];
 	tmp = strstr(tmp+1,";")+1;
 	tmp = strstr(tmp+1,";")+1;
 	int* val_ptr_int;
 	int* val_ptr_int;
 	double* val_ptr_double;
 	double* val_ptr_double;
 
 
 	switch(param->type)
 	switch(param->type)
 	{
 	{
-		case STARPUTOP_PARAM_BOOLEAN:
-		case STARPUTOP_PARAM_INTEGER:
+		case STARPU_TOP_PARAM_BOOLEAN:
+		case STARPU_TOP_PARAM_INTEGER:
 			val_ptr_int = (int*)param->value;
 			val_ptr_int = (int*)param->value;
 			*val_ptr_int = atoi(tmp);
 			*val_ptr_int = atoi(tmp);
 		break;
 		break;
 		
 		
-		case STARPUTOP_PARAM_FLOAT:
+		case STARPU_TOP_PARAM_FLOAT:
 			val_ptr_double = (double*)param->value;
 			val_ptr_double = (double*)param->value;
 			*val_ptr_double = atof(tmp);
 			*val_ptr_double = atof(tmp);
 		break;
 		break;
 
 
-		case STARPUTOP_PARAM_ENUM:
+		case STARPU_TOP_PARAM_ENUM:
 			val_ptr_int = (int*)param->value;
 			val_ptr_int = (int*)param->value;
 			*val_ptr_int = atoi(tmp);
 			*val_ptr_int = atoi(tmp);
 		break;
 		break;
@@ -698,56 +699,56 @@ void starputop_change_parameter_value(const char* message){
 		param->callback(param);
 		param->callback(param);
 }
 }
 
 
-void starputop_change_debug_mode(const char*message)
+void starpu_top_change_debug_mode(const char*message)
 {
 {
 	const char* debut = strstr(message, ";")+1;
 	const char* debut = strstr(message, ";")+1;
 	if(!strncmp("ON",debut, 2))
 	if(!strncmp("ON",debut, 2))
 	{
 	{
-		starputop_debug_on = 1;
+		starpu_top_debug_on = 1;
 		printf("%s:%d debug is now ON\n", __FILE__, __LINE__);
 		printf("%s:%d debug is now ON\n", __FILE__, __LINE__);
 	}
 	}
 	else
 	else
 	{
 	{
-		starputop_debug_on = 0;
+		starpu_top_debug_on = 0;
 		printf("%s:%d debug is now OFF\n", __FILE__, __LINE__);
 		printf("%s:%d debug is now OFF\n", __FILE__, __LINE__);
 	}
 	}
 
 
 	char * m = (char *) malloc(strlen(message)+1);
 	char * m = (char *) malloc(strlen(message)+1);
 	sprintf(m,"%s",message);
 	sprintf(m,"%s",message);
-	starputop_message_add(starputop_mt,m);
+	starpu_top_message_add(starpu_top_mt,m);
 }
 }
 
 
 /*
 /*
  * Unlock starpu if it was locked in debug state
  * Unlock starpu if it was locked in debug state
 */
 */
-void starputop_debug_next_step()
+void starpu_top_debug_next_step()
 {
 {
-	pthread_cond_signal(&starputop_wait_for_continue_cond);
+	pthread_cond_signal(&starpu_top_wait_for_continue_cond);
 }
 }
 
 
 
 
-void starputop_process_input_message(char *buffer)
+void starpu_top_process_input_message(char *buffer)
 {
 {
-	starputop_message_type message_type = starputop_get_message_type(buffer);
+	starpu_top_message_type message_type = starpu_top_get_message_type(buffer);
 	switch(message_type)
 	switch(message_type)
 	{
 	{
 		case TOP_TYPE_GO:
 		case TOP_TYPE_GO:
-			starputop_unlock_starpu();
+			starpu_top_unlock_starpu();
 		break;
 		break;
 		case TOP_TYPE_ENABLE:
 		case TOP_TYPE_ENABLE:
-			starputop_change_data_active(buffer, 1);
+			starpu_top_change_data_active(buffer, 1);
 		break;
 		break;
 		case TOP_TYPE_DISABLE:
 		case TOP_TYPE_DISABLE:
-			starputop_change_data_active(buffer, 0);
+			starpu_top_change_data_active(buffer, 0);
 		break;
 		break;
 		case TOP_TYPE_SET:
 		case TOP_TYPE_SET:
-			starputop_change_parameter_value(buffer);
+			starpu_top_change_parameter_value(buffer);
 		break;
 		break;
 		case TOP_TYPE_DEBUG:
 		case TOP_TYPE_DEBUG:
-			starputop_change_debug_mode(buffer);
+			starpu_top_change_debug_mode(buffer);
 		break;
 		break;
 		case TOP_TYPE_CONTINUE:
 		case TOP_TYPE_CONTINUE:
-			starputop_debug_next_step();
+			starpu_top_debug_next_step();
 		break;
 		break;
 		default:
 		default:
 			printf("%s:%d unknow message : '%s'\n", __FILE__, __LINE__, buffer);
 			printf("%s:%d unknow message : '%s'\n", __FILE__, __LINE__, buffer);

+ 24 - 24
src/top/starputop_connection.c

@@ -27,8 +27,8 @@
 #  include <netdb.h>
 #  include <netdb.h>
 #endif
 #endif
 
 
-#include <top/starputop_connection.h>
-#include <top/starputop_message_queue.h>
+#include <top/starpu_top_connection.h>
+#include <top/starpu_top_message_queue.h>
 #include <starpu_top.h>
 #include <starpu_top.h>
 #include <pthread.h>
 #include <pthread.h>
 #include <stdio.h>
 #include <stdio.h>
@@ -37,38 +37,38 @@
 #include <stdlib.h>
 #include <stdlib.h>
 #include <unistd.h>
 #include <unistd.h>
 
 
-const char *STARPUTOP_PORT = "2011";
-const int STARPUTOP_BUFFER_SIZE=1024;
+const char *STARPU_TOP_PORT = "2011";
+const int STARPU_TOP_BUFFER_SIZE=1024;
 
 
-extern starputop_message_queue_t*  starputop_mt;
+extern starpu_top_message_queue_t*  starpu_top_mt;
 
 
 //client socket after fopen
 //client socket after fopen
-FILE* starputop_socket_fd_read;
-FILE* starputop_socket_fd_write;
+FILE* starpu_top_socket_fd_read;
+FILE* starpu_top_socket_fd_write;
 //client socket (file descriptor)
 //client socket (file descriptor)
-int starputop_socket_fd;
+int starpu_top_socket_fd;
 
 
 
 
 void * message_from_ui(void * p)
 void * message_from_ui(void * p)
 {
 {
 	(void) p;
 	(void) p;
-	char str[STARPUTOP_BUFFER_SIZE];
+	char str[STARPU_TOP_BUFFER_SIZE];
 	while(1)
 	while(1)
 	{
 	{
-		char * check=fgets (str, STARPUTOP_BUFFER_SIZE, starputop_socket_fd_read);
+		char * check=fgets (str, STARPU_TOP_BUFFER_SIZE, starpu_top_socket_fd_read);
 
 
 		printf("Message from UI : %s",str);
 		printf("Message from UI : %s",str);
 		if (check)
 		if (check)
 		{
 		{
-			starputop_process_input_message(str);
+			starpu_top_process_input_message(str);
 		}
 		}
 		else
 		else
 		{
 		{
 			fprintf(stderr,"Connection dropped\n");
 			fprintf(stderr,"Connection dropped\n");
 			//unlocking StarPU.
 			//unlocking StarPU.
-			starputop_process_input_message("GO\n");
-			starputop_process_input_message("DEBUG;OFF\n");
-			starputop_process_input_message("STEP\n");
+			starpu_top_process_input_message("GO\n");
+			starpu_top_process_input_message("DEBUG;OFF\n");
+			starpu_top_process_input_message("STEP\n");
 			return NULL;
 			return NULL;
 		}
 		}
 	}
 	}
@@ -80,17 +80,17 @@ void * message_to_ui(void * p)
 	(void) p;
 	(void) p;
 	while(1)
 	while(1)
 	{
 	{
-		char* message = starputop_message_remove(starputop_mt);
+		char* message = starpu_top_message_remove(starpu_top_mt);
 		int len=strlen(message);
 		int len=strlen(message);
-		int check=fwrite(message, sizeof(char), len, starputop_socket_fd_write);
-		int check2=fflush(starputop_socket_fd_write);
+		int check=fwrite(message, sizeof(char), len, starpu_top_socket_fd_write);
+		int check2=fflush(starpu_top_socket_fd_write);
 		free(message);
 		free(message);
 		if (check!=len || check2==EOF )
 		if (check!=len || check2==EOF )
 		{
 		{
 			fprintf(stderr,"Connection dropped : message no longer send\n");
 			fprintf(stderr,"Connection dropped : message no longer send\n");
 			while(1)
 			while(1)
 			{
 			{
-				message=starputop_message_remove(starputop_mt);
+				message=starpu_top_message_remove(starpu_top_mt);
 				free(message);
 				free(message);
 			}
 			}
 		}
 		}
@@ -98,7 +98,7 @@ void * message_to_ui(void * p)
 	return NULL;
 	return NULL;
 }
 }
 
 
-void starputop_communications_threads_launcher()
+void starpu_top_communications_threads_launcher()
 {
 {
 	pthread_t from_ui;
 	pthread_t from_ui;
 	pthread_t to_ui;
 	pthread_t to_ui;
@@ -115,7 +115,7 @@ void starputop_communications_threads_launcher()
 	req.ai_socktype = SOCK_STREAM;
 	req.ai_socktype = SOCK_STREAM;
 	req.ai_protocol = 0;  
 	req.ai_protocol = 0;  
   
   
-	if ((code = getaddrinfo(NULL, STARPUTOP_PORT, &req, &ans)) != 0)
+	if ((code = getaddrinfo(NULL, STARPU_TOP_PORT, &req, &ans)) != 0)
 	{
 	{
 		fprintf(stderr, " getaddrinfo failed %d\n", code);
 		fprintf(stderr, " getaddrinfo failed %d\n", code);
 		exit(EXIT_FAILURE);
 		exit(EXIT_FAILURE);
@@ -134,22 +134,22 @@ void starputop_communications_threads_launcher()
 
 
 	socklen_t len = sizeof(from);
 	socklen_t len = sizeof(from);
 
 
-   	if ((starputop_socket_fd=accept(sock, (struct sockaddr *) &from, &len)) ==-1)
+   	if ((starpu_top_socket_fd=accept(sock, (struct sockaddr *) &from, &len)) ==-1)
 	{
 	{
 		fprintf(stderr, "accept error\n");
 		fprintf(stderr, "accept error\n");
 		perror("accept");
 		perror("accept");
 		exit(EXIT_FAILURE);
 		exit(EXIT_FAILURE);
 	}
 	}
 	
 	
-	if ( (starputop_socket_fd_read=fdopen(starputop_socket_fd, "r")) == NULL)
+	if ( (starpu_top_socket_fd_read=fdopen(starpu_top_socket_fd, "r")) == NULL)
 	{
 	{
 		perror("fdopen");
 		perror("fdopen");
 		exit(EXIT_FAILURE);
 		exit(EXIT_FAILURE);
 	}
 	}
 
 
-	starputop_socket_fd=dup(starputop_socket_fd);
+	starpu_top_socket_fd=dup(starpu_top_socket_fd);
 	
 	
-	if ((starputop_socket_fd_write=fdopen(starputop_socket_fd, "w")) == NULL)
+	if ((starpu_top_socket_fd_write=fdopen(starpu_top_socket_fd, "w")) == NULL)
 	{
 	{
 		perror("fdopen");
 		perror("fdopen");
 		exit(EXIT_FAILURE);
 		exit(EXIT_FAILURE);

+ 6 - 6
src/top/starputop_connection.h

@@ -15,17 +15,17 @@
  * See the GNU Lesser General Public License in COPYING.LGPL for more details.
  * See the GNU Lesser General Public License in COPYING.LGPL for more details.
  */
  */
 
 
-#ifndef __STARPUTOP_CONNECTION_H__
-#define __STARPUTOP_CONNECTION_H__
+#ifndef __STARPU_TOP_CONNECTION_H__
+#define __STARPU_TOP_CONNECTION_H__
 
 
 #include <stdlib.h>
 #include <stdlib.h>
-#include <top/starputop_message_queue.h>
+#include <top/starpu_top_message_queue.h>
 #include <starpu_top.h>
 #include <starpu_top.h>
 
 
 #ifdef __cplusplus
 #ifdef __cplusplus
 extern "C" {
 extern "C" {
 #endif
 #endif
-  extern starputop_message_queue_t*  starputop_mt;
+  extern starpu_top_message_queue_t*  starpu_top_mt;
 
 
 /*
 /*
  * This function initialize the two communications threads.
  * This function initialize the two communications threads.
@@ -34,11 +34,11 @@ extern "C" {
  * About mt : mt MUST be allocated before call. 
  * About mt : mt MUST be allocated before call. 
  * All messages in the queue are freed after used. 
  * All messages in the queue are freed after used. 
  */
  */
-  void starputop_communications_threads_launcher();
+  void starpu_top_communications_threads_launcher();
 
 
 #ifdef __cplusplus
 #ifdef __cplusplus
 }
 }
 #endif
 #endif
 
 
-#endif // __STARPUTOP_CONNECTION_H__
+#endif // __STARPU_TOP_CONNECTION_H__
 
 

+ 21 - 0
src/top/starpu_top_core.h

@@ -0,0 +1,21 @@
+/* StarPU --- Runtime system for heterogeneous multicore architectures.
+ *
+ * Copyright (C) 2011 William Braik, Yann Courtois, Jean-Marie Couteyen, Anthony Roy
+ * Copyright (C) 2011 Centre National de la Recherche Scientifique
+ *
+ * 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.
+ */
+
+/*
+ * Convert timespec to ms
+ */
+unsigned long long _starpu_top_timing_timespec_to_ms(const struct timespec *ts);

+ 11 - 11
src/top/starputop_message_queue.c

@@ -15,21 +15,21 @@
  * See the GNU Lesser General Public License in COPYING.LGPL for more details.
  * See the GNU Lesser General Public License in COPYING.LGPL for more details.
  */
  */
 
 
-#include  "starputop_message_queue.h"
+#include  "starpu_top_message_queue.h"
 #include  <string.h>
 #include  <string.h>
 #include  <stdio.h>
 #include  <stdio.h>
 #include  <stdlib.h>
 #include  <stdlib.h>
 
 
 //this global queue is used both by API and by network threads
 //this global queue is used both by API and by network threads
-starputop_message_queue_t*  starputop_mt = NULL;
+starpu_top_message_queue_t*  starpu_top_mt = NULL;
 
 
 
 
-/* Will always return the pointer to starputop_message_queue */
-starputop_message_queue_t* starputop_message_add(
-			starputop_message_queue_t* s,
+/* Will always return the pointer to starpu_top_message_queue */
+starpu_top_message_queue_t* starpu_top_message_add(
+			starpu_top_message_queue_t* s,
 			char* msg)
 			char* msg)
 {
 {
-	starputop_message_queue_item_t* p = (starputop_message_queue_item_t *) malloc( 1 * sizeof(*p) );
+	starpu_top_message_queue_item_t* p = (starpu_top_message_queue_item_t *) malloc( 1 * sizeof(*p) );
 	pthread_mutex_lock(&(s->mutex));
 	pthread_mutex_lock(&(s->mutex));
 	if( NULL == p )
 	if( NULL == p )
 	{
 	{
@@ -67,11 +67,11 @@ starputop_message_queue_t* starputop_message_add(
 }
 }
 
 
 //this is a queue and it is FIFO, so we will always remove the first element
 //this is a queue and it is FIFO, so we will always remove the first element
-char* starputop_message_remove(starputop_message_queue_t* s)
+char* starpu_top_message_remove(starpu_top_message_queue_t* s)
 {
 {
 	sem_wait(&(s->semaphore));
 	sem_wait(&(s->semaphore));
-	starputop_message_queue_item_t* h = NULL;
-	starputop_message_queue_item_t* p = NULL;
+	starpu_top_message_queue_item_t* h = NULL;
+	starpu_top_message_queue_item_t* p = NULL;
 
 
 	if( NULL == s )
 	if( NULL == s )
 	{
 	{
@@ -94,9 +94,9 @@ char* starputop_message_remove(starputop_message_queue_t* s)
 }
 }
 
 
 
 
-starputop_message_queue_t* starputop_message_queue_new(void)
+starpu_top_message_queue_t* starpu_top_message_queue_new(void)
 {
 {
-	starputop_message_queue_t* p = (starputop_message_queue_t *) malloc( 1 * sizeof(*p));
+	starpu_top_message_queue_t* p = (starpu_top_message_queue_t *) malloc( 1 * sizeof(*p));
 	if( NULL == p )
 	if( NULL == p )
 	{
 	{
 		fprintf(stderr, "LINE: %d, malloc() failed\n", __LINE__);
 		fprintf(stderr, "LINE: %d, malloc() failed\n", __LINE__);

+ 15 - 15
src/top/starputop_message_queue.h

@@ -19,32 +19,32 @@
 #include <semaphore.h> 
 #include <semaphore.h> 
 #include <pthread.h>
 #include <pthread.h>
 
 
-#ifndef __STARPUTOP_MESSAGE_QUEUE_H__
-#define __STARPUTOP_MESSAGE_QUEUE_H__
+#ifndef __STARPU_TOP_MESSAGE_QUEUE_H__
+#define __STARPU_TOP_MESSAGE_QUEUE_H__
 
 
-typedef struct starputop_message_queue_item
+typedef struct starpu_top_message_queue_item
 {
 {
 	char *message;
 	char *message;
-	struct starputop_message_queue_item* next;
-} starputop_message_queue_item_t;
+	struct starpu_top_message_queue_item* next;
+} starpu_top_message_queue_item_t;
 
 
-typedef struct starputop_message_queue
+typedef struct starpu_top_message_queue
 {
 {
-	struct starputop_message_queue_item* head;
-	struct starputop_message_queue_item* tail;
+	struct starpu_top_message_queue_item* head;
+	struct starpu_top_message_queue_item* tail;
 	sem_t semaphore;
 	sem_t semaphore;
 	pthread_mutex_t mutex;
 	pthread_mutex_t mutex;
-} starputop_message_queue_t;
+} starpu_top_message_queue_t;
 
 
 
 
-starputop_message_queue_t *starputop_message_add(
-			starputop_message_queue_t*,
+starpu_top_message_queue_t *starpu_top_message_add(
+			starpu_top_message_queue_t*,
 			char*);
 			char*);
 
 
-char* starputop_message_remove(starputop_message_queue_t*);
+char* starpu_top_message_remove(starpu_top_message_queue_t*);
 
 
-starputop_message_queue_t* starputop_message_queue_new();
-starputop_message_queue_t* starputop_message_queue_free(
-			starputop_message_queue_t*);
+starpu_top_message_queue_t* starpu_top_message_queue_new();
+starpu_top_message_queue_t* starpu_top_message_queue_free(
+			starpu_top_message_queue_t*);
 
 
 #endif
 #endif

+ 18 - 17
src/top/starputop_task.c

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  *
- * Copyright (C) 2011 William Braik, Yann Courtois, Jean-Marie Couteyen, Anthony
- * Roy
+ * Copyright (C) 2011 William Braik, Yann Courtois, Jean-Marie Couteyen, Anthony Roy
+ * Copyright (C) 2011 Centre National de la Recherche Scientifique
  *
  *
  * StarPU is free software; you can redistribute it and/or modify
  * 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
  * it under the terms of the GNU Lesser General Public License as published by
@@ -16,8 +16,9 @@
  */
  */
 
 
 #include <starpu_top.h>
 #include <starpu_top.h>
-#include <top/starputop_message_queue.h>
-#include <top/starputop_connection.h>
+#include <top/starpu_top_message_queue.h>
+#include <top/starpu_top_connection.h>
+#include <top/starpu_top_core.h>
 #include <core/task.h>
 #include <core/task.h>
 #include <stdio.h>
 #include <stdio.h>
 #include <string.h>
 #include <string.h>
@@ -28,7 +29,7 @@
  **************TASK RELATED FUNCTIONS********
  **************TASK RELATED FUNCTIONS********
  *******************************************/
  *******************************************/
 
 
-void starputop_task_started(
+void starpu_top_task_started(
 			struct starpu_task *task, 
 			struct starpu_task *task, 
 			int devid, 
 			int devid, 
 			const struct timespec *ts)
 			const struct timespec *ts)
@@ -40,12 +41,12 @@ void starputop_task_started(
 				"START;%llu;%d;%llu\n",
 				"START;%llu;%d;%llu\n",
 				taskid, 
 				taskid, 
 				devid, 
 				devid, 
-				starpu_timing_timespec_to_ms(ts));
+				_starpu_top_timing_timespec_to_ms(ts));
 
 
-	starputop_message_add(starputop_mt, str);
+	starpu_top_message_add(starpu_top_mt, str);
 }
 }
 
 
-void starputop_task_ended(
+void starpu_top_task_ended(
 			struct starpu_task *task, 
 			struct starpu_task *task, 
 			int devid, 
 			int devid, 
 			const struct timespec *ts)
 			const struct timespec *ts)
@@ -57,24 +58,24 @@ void starputop_task_ended(
 	snprintf(str, 64,
 	snprintf(str, 64,
 				"END;%llu;%llu\n", 
 				"END;%llu;%llu\n", 
 				taskid, 
 				taskid, 
-				starpu_timing_timespec_to_ms(ts));
+				_starpu_top_timing_timespec_to_ms(ts));
 
 
-	starputop_message_add(starputop_mt, str);
+	starpu_top_message_add(starpu_top_mt, str);
 }
 }
 
 
-void starputop_task_prevision_timespec(
+void starpu_top_task_prevision_timespec(
 			struct starpu_task *task,
 			struct starpu_task *task,
 			int devid, 
 			int devid, 
 			const struct timespec* start, 
 			const struct timespec* start, 
 			const struct timespec* end)
 			const struct timespec* end)
 {
 {
-	starputop_task_prevision(task, 
+	starpu_top_task_prevision(task, 
 							devid, 
 							devid, 
-							starpu_timing_timespec_to_ms(start),
-							starpu_timing_timespec_to_ms(end));
+							_starpu_top_timing_timespec_to_ms(start),
+							_starpu_top_timing_timespec_to_ms(end));
 }
 }
 
 
-void starputop_task_prevision(
+void starpu_top_task_prevision(
 			struct starpu_task *task, 
 			struct starpu_task *task, 
 			int devid, 
 			int devid, 
 			unsigned long long start, 
 			unsigned long long start, 
@@ -89,9 +90,9 @@ void starputop_task_prevision(
 				"PREV;%llu;%d;%llu;%llu;%llu\n",
 				"PREV;%llu;%d;%llu;%llu;%llu\n",
 				taskid,
 				taskid,
 				devid,
 				devid,
-				starpu_timing_timespec_to_ms(&now),
+				_starpu_top_timing_timespec_to_ms(&now),
 				start,
 				start,
 				end);
 				end);
 
 
-	starputop_message_add(starputop_mt, str);
+	starpu_top_message_add(starpu_top_mt, str);
 }
 }

+ 1 - 1
starpu-top/StarPU-Top-common.pri

@@ -28,7 +28,7 @@ SOURCES += $$SRCDIR/main.cpp \
     $$SRCDIR/aboutdialog.cpp
     $$SRCDIR/aboutdialog.cpp
 HEADERS += $$SRCDIR/mainwindow.h \
 HEADERS += $$SRCDIR/mainwindow.h \
 #STARPU-TOP
 #STARPU-TOP
-    $$SRCDIR/starputoptypes.h \
+    $$SRCDIR/starpu_top_types.h \
     $$SRCDIR/widgetwindowsmanager.h \
     $$SRCDIR/widgetwindowsmanager.h \
     $$SRCDIR/configurationmanager.h \
     $$SRCDIR/configurationmanager.h \
     $$SRCDIR/communicationthread.h \
     $$SRCDIR/communicationthread.h \

+ 1 - 1
starpu-top/aboutdialog.ui

@@ -112,7 +112,7 @@
       <string/>
       <string/>
      </property>
      </property>
      <property name="pixmap">
      <property name="pixmap">
-      <pixmap resource="resources.qrc">:/images/starputop.png</pixmap>
+      <pixmap resource="resources.qrc">:/images/starpu_top.png</pixmap>
      </property>
      </property>
      <property name="scaledContents">
      <property name="scaledContents">
       <bool>true</bool>
       <bool>true</bool>

+ 3 - 3
starpu-top/communicationmanager.cpp

@@ -70,7 +70,7 @@ void CommunicationManager::initializeSession()
 {
 {
     _dataDescriptions = new QList<DataDescription*> ();
     _dataDescriptions = new QList<DataDescription*> ();
     _paramDescriptions = new QList<ParamDescription*> ();
     _paramDescriptions = new QList<ParamDescription*> ();
-    _serverDevices = new QList<StarputopDevice> ;
+    _serverDevices = new QList<starpu_top_device> ;
 
 
     _serverInfoMsgCount = 0;
     _serverInfoMsgCount = 0;
     _state = COM_STATE_INIT;
     _state = COM_STATE_INIT;
@@ -665,7 +665,7 @@ void CommunicationManager::parseInitDevMessage(QString messageString)
         Q_ASSERT_X(ok == true, "CommunicationManager::parseInitDevMessage()",
         Q_ASSERT_X(ok == true, "CommunicationManager::parseInitDevMessage()",
                    "Bogus message received in INIT DEV");
                    "Bogus message received in INIT DEV");
 
 
-        StarputopDeviceType deviceType;
+        starpu_top_device_type deviceType;
 
 
         Q_ASSERT_X(
         Q_ASSERT_X(
                 deviceTypeString.compare(
                 deviceTypeString.compare(
@@ -701,7 +701,7 @@ void CommunicationManager::parseInitDevMessage(QString messageString)
             deviceType = SERVERDEVICE_GORDON;
             deviceType = SERVERDEVICE_GORDON;
         }
         }
 
 
-        StarputopDevice device;
+        starpu_top_device device;
         device.id = deviceId;
         device.id = deviceId;
         device.type = deviceType;
         device.type = deviceType;
         device.name = deviceNameString;
         device.name = deviceNameString;

+ 3 - 3
starpu-top/communicationmanager.h

@@ -27,7 +27,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 #define COMMUNICATIONMANAGER_H
 #define COMMUNICATIONMANAGER_H
 
 
 #include <QTcpSocket>
 #include <QTcpSocket>
-#include "starputoptypes.h"
+#include "starpu_top_types.h"
 
 
 class CommunicationManager : public QTcpSocket
 class CommunicationManager : public QTcpSocket
 { /* Receives protocol messages from server, parses them
 { /* Receives protocol messages from server, parses them
@@ -54,7 +54,7 @@ private:
     qlonglong _serverTimestamp;
     qlonglong _serverTimestamp;
     QList<DataDescription*> *_dataDescriptions;
     QList<DataDescription*> *_dataDescriptions;
     QList<ParamDescription*> *_paramDescriptions;
     QList<ParamDescription*> *_paramDescriptions;
-    QList<StarputopDevice> *_serverDevices;
+    QList<starpu_top_device> *_serverDevices;
     // Communication states
     // Communication states
     CommunicationState _state;
     CommunicationState _state;
     bool _initServerInfoCompleted;
     bool _initServerInfoCompleted;
@@ -125,7 +125,7 @@ signals:
     void serverInitCompleted(QString serverID,
     void serverInitCompleted(QString serverID,
                              QList<DataDescription*> *dataDescriptions,
                              QList<DataDescription*> *dataDescriptions,
                              QList<ParamDescription*> *paramDescriptions,
                              QList<ParamDescription*> *paramDescriptions,
-                             QList<StarputopDevice> *serverDevices);
+                             QList<starpu_top_device> *serverDevices);
     // Notify GUI with a protocol message
     // Notify GUI with a protocol message
     // Protocol error
     // Protocol error
     void protocolError(QString errorMessage);
     void protocolError(QString errorMessage);

+ 3 - 3
starpu-top/communicationthread.cpp

@@ -30,7 +30,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 #include "configurationmanager.h"
 #include "configurationmanager.h"
 #include "mainwindow.h"
 #include "mainwindow.h"
 #include "communicationmanager.h"
 #include "communicationmanager.h"
-#include "starputoptypes.h"
+#include "starpu_top_types.h"
 
 
 const int MAX_CONNECTION_ATTEMPTS = 10;
 const int MAX_CONNECTION_ATTEMPTS = 10;
 
 
@@ -103,12 +103,12 @@ void CommunicationThread::createNewCommunicationManager(void)
                      SIGNAL(serverInitCompleted(QString,
                      SIGNAL(serverInitCompleted(QString,
                                                 QList<DataDescription*>*,
                                                 QList<DataDescription*>*,
                                                 QList<ParamDescription*>*,
                                                 QList<ParamDescription*>*,
-                                                QList<StarputopDevice>*)),
+                                                QList<Starpu_TopDevice>*)),
                      _mainWindow, SLOT(initClient(
                      _mainWindow, SLOT(initClient(
                              QString,
                              QString,
                              QList<DataDescription*>*,
                              QList<DataDescription*>*,
                              QList<ParamDescription*>*,
                              QList<ParamDescription*>*,
-                             QList<StarputopDevice>*)));
+                             QList<Starpu_TopDevice>*)));
     // Output data
     // Output data
     QObject::connect(_mainWindow, SIGNAL(clientLaunched()),
     QObject::connect(_mainWindow, SIGNAL(clientLaunched()),
                      _communicationManager, SLOT(sendGoMessage()));
                      _communicationManager, SLOT(sendGoMessage()));

+ 1 - 1
starpu-top/configurationmanager.h

@@ -29,7 +29,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 #include <QSettings>
 #include <QSettings>
 
 
 static const QString CONFIG_FILE_DIR = ".";
 static const QString CONFIG_FILE_DIR = ".";
-static const QString CONFIG_FILE_NAME = "starputop.cfg";
+static const QString CONFIG_FILE_NAME = "starpu_top.cfg";
 
 
 class ConfigurationManager
 class ConfigurationManager
 { /* Contains and manages all the application settings
 { /* Contains and manages all the application settings

+ 1 - 1
starpu-top/dataaggregatorwidget.h

@@ -34,7 +34,7 @@ class QwtPlot;
 
 
 #include <QHash>
 #include <QHash>
 #include <QAction>
 #include <QAction>
-#include "starputoptypes.h"
+#include "starpu_top_types.h"
 #include "abstractwidgetwindow.h"
 #include "abstractwidgetwindow.h"
 
 
 class DataAggregatorWidget : public AbstractWidgetWindow
 class DataAggregatorWidget : public AbstractWidgetWindow

+ 1 - 1
starpu-top/datawidget.h

@@ -31,7 +31,7 @@ class WidgetWindowsManager;
 class QwtPlotCurve;
 class QwtPlotCurve;
 class QwtPlot;
 class QwtPlot;
 
 
-#include "starputoptypes.h"
+#include "starpu_top_types.h"
 #include "abstractwidgetwindow.h"
 #include "abstractwidgetwindow.h"
 
 
 class DataWidget : public AbstractWidgetWindow
 class DataWidget : public AbstractWidgetWindow

+ 2 - 2
starpu-top/extradist

@@ -9,7 +9,7 @@ EXTRA_DIST	+=	\
                 starpu-top/abstractwidgetwindow.cpp     \
                 starpu-top/abstractwidgetwindow.cpp     \
                 starpu-top/communicationthread.h        \
                 starpu-top/communicationthread.h        \
                 starpu-top/configurationmanager.cpp     \
                 starpu-top/configurationmanager.cpp     \
-                starpu-top/starputoptypes.h             \
+                starpu-top/starpu_top_types.h             \
                 starpu-top/mainwindow.ui                \
                 starpu-top/mainwindow.ui                \
                 starpu-top/mainwindow.cpp               \
                 starpu-top/mainwindow.cpp               \
                 starpu-top/sessionsetupmanager.cpp      \
                 starpu-top/sessionsetupmanager.cpp      \
@@ -18,7 +18,7 @@ EXTRA_DIST	+=	\
                 starpu-top/images/connect.png           \
                 starpu-top/images/connect.png           \
                 starpu-top/images/debugon.png           \
                 starpu-top/images/debugon.png           \
                 starpu-top/images/help.png              \
                 starpu-top/images/help.png              \
-                starpu-top/images/starputop.png         \
+                starpu-top/images/starpu_top.png         \
                 starpu-top/images/widget.png            \
                 starpu-top/images/widget.png            \
                 starpu-top/images/lock.png              \
                 starpu-top/images/lock.png              \
                 starpu-top/images/about.png             \
                 starpu-top/images/about.png             \

+ 9 - 9
starpu-top/ganttwidget.cpp

@@ -469,7 +469,7 @@ void GanttWidget::drawFromTime(QPainter *painter, qlonglong timestamp)
         borneBefore = 0;
         borneBefore = 0;
     }
     }
     _tasks = _taskManager->tasks(borneBefore, _timePresent);
     _tasks = _taskManager->tasks(borneBefore, _timePresent);
-    foreach(StarputopTask t, _tasks)
+    foreach(starpu_top_task t, _tasks)
     {
     {
 	drawWorkPU(painter,t);
 	drawWorkPU(painter,t);
     }
     }
@@ -526,7 +526,7 @@ void GanttWidget::drawIdlePU(QPainter *painter)
 }
 }
 
 
 /* draw forecasted working time for each processor */
 /* draw forecasted working time for each processor */
-void GanttWidget::drawPrevWorkPU(QPainter *painter, StarputopTask t)
+void GanttWidget::drawPrevWorkPU(QPainter *painter, starpu_top_task t)
 {
 {
     int starty = HEIGHT_TIME_AXIS + MARGIN;
     int starty = HEIGHT_TIME_AXIS + MARGIN;
     int widthAllowed = size().width() - WIDTH_PROGRAM - MARGIN
     int widthAllowed = size().width() - WIDTH_PROGRAM - MARGIN
@@ -623,7 +623,7 @@ void GanttWidget::drawPrevWorkPU(QPainter *painter, StarputopTask t)
  we haven't to test if they are displayable or not. We just have to calculate
  we haven't to test if they are displayable or not. We just have to calculate
  which part of time is displayable.
  which part of time is displayable.
  The task t has its begin or its end between time Before and timePresent */
  The task t has its begin or its end between time Before and timePresent */
-void GanttWidget::drawWorkPU(QPainter *painter, StarputopTask t)
+void GanttWidget::drawWorkPU(QPainter *painter, starpu_top_task t)
 {
 {
     int starty = HEIGHT_TIME_AXIS + MARGIN;
     int starty = HEIGHT_TIME_AXIS + MARGIN;
     int widthAllowed = size().width() - WIDTH_PROGRAM - MARGIN
     int widthAllowed = size().width() - WIDTH_PROGRAM - MARGIN
@@ -783,12 +783,12 @@ void GanttWidget::countPUs()
     _numPUs = length;
     _numPUs = length;
     delete _PUsByDevice;
     delete _PUsByDevice;
     delete _PUsByPos;
     delete _PUsByPos;
-    _PUsByDevice = new StarputopDevice[length];
-    _PUsByPos = new StarputopDevice[length];
+    _PUsByDevice = new starpu_top_device[length];
+    _PUsByPos = new starpu_top_device[length];
     int pos = 0;
     int pos = 0;
 
 
     /* CPUs */
     /* CPUs */
-    foreach(StarputopDevice sD,*_mainWindow->serverDevices())
+    foreach(starpu_top_device sD,*_mainWindow->serverDevices())
     {
     {
 	if(sD.type == 0)
 	if(sD.type == 0)
 	{
 	{
@@ -806,7 +806,7 @@ void GanttWidget::countPUs()
     }
     }
 
 
     /* GPUs */
     /* GPUs */
-    foreach (StarputopDevice sD , *_mainWindow->serverDevices())
+    foreach (starpu_top_device sD , *_mainWindow->serverDevices())
     {
     {
 	if(sD.type == 1 || sD.type == 2)
 	if(sD.type == 1 || sD.type == 2)
 	{
 	{
@@ -855,7 +855,7 @@ void GanttWidget::paint(QPainter *painter, QPaintEvent *event)
             }
             }
 
 
             _tasks = _taskManager->tasks(borneBefore, _timePresent);
             _tasks = _taskManager->tasks(borneBefore, _timePresent);
-            foreach (StarputopTask t, _tasks)
+            foreach (starpu_top_task t, _tasks)
             {
             {
                 drawWorkPU(painter,t);
                 drawWorkPU(painter,t);
             }
             }
@@ -863,7 +863,7 @@ void GanttWidget::paint(QPainter *painter, QPaintEvent *event)
             /* Future past */
             /* Future past */
             qlonglong borneAfter = _timePresent + _timeAfter;
             qlonglong borneAfter = _timePresent + _timeAfter;
             _tasks = _taskManager->prevTasks(_timePresent, borneAfter);
             _tasks = _taskManager->prevTasks(_timePresent, borneAfter);
-            foreach		(StarputopTask t, _tasks)
+            foreach		(starpu_top_task t, _tasks)
             {
             {
                 drawPrevWorkPU(painter,t);
                 drawPrevWorkPU(painter,t);
             }
             }

+ 6 - 6
starpu-top/ganttwidget.h

@@ -31,7 +31,7 @@ class TaskManager;
 
 
 #include <QGLWidget>
 #include <QGLWidget>
 #include <QPainter>
 #include <QPainter>
-#include "starputoptypes.h"
+#include "starpu_top_types.h"
 
 
 class GanttWidget : public QGLWidget
 class GanttWidget : public QGLWidget
 {
 {
@@ -58,9 +58,9 @@ protected:
     void drawTime(QPainter *painter);
     void drawTime(QPainter *painter);
     void drawProgram(QPainter *painter);
     void drawProgram(QPainter *painter);
     void resizeGL (int width,int height);
     void resizeGL (int width,int height);
-    void drawWorkPU(QPainter *painter, StarputopTask t);
+    void drawWorkPU(QPainter *painter, starpu_top_task t);
     void drawIdlePU(QPainter *painter);
     void drawIdlePU(QPainter *painter);
-    void drawPrevWorkPU(QPainter *painter, StarputopTask t);
+    void drawPrevWorkPU(QPainter *painter, starpu_top_task t);
     void defaultScreen(QPainter *painter);
     void defaultScreen(QPainter *painter);
     void drawPresentLine(QPainter *painter);
     void drawPresentLine(QPainter *painter);
     int computeTimeInterval(int timeTotal);
     int computeTimeInterval(int timeTotal);
@@ -84,7 +84,7 @@ private:
     qreal _coordxPresentLine;
     qreal _coordxPresentLine;
     int _numPUs;
     int _numPUs;
     bool _wasRunning;
     bool _wasRunning;
-    QList<StarputopTask> _tasks;
+    QList<starpu_top_task> _tasks;
     int _timeTotal;
     int _timeTotal;
     int _timeAfter;
     int _timeAfter;
     int _timeBefore;
     int _timeBefore;
@@ -92,8 +92,8 @@ private:
     QTimer *_timer;
     QTimer *_timer;
     qlonglong _timePresent;
     qlonglong _timePresent;
     qlonglong _timeToShow;
     qlonglong _timeToShow;
-    StarputopDevice *_PUsByDevice;
-    StarputopDevice *_PUsByPos;
+    starpu_top_device *_PUsByDevice;
+    starpu_top_device *_PUsByPos;
     int _numCPUs;
     int _numCPUs;
     int _numGPUs;
     int _numGPUs;
     bool _initCompleted;
     bool _initCompleted;

starpu-top/images/starputop.png → starpu-top/images/starpu_top.png


+ 1 - 1
starpu-top/interactivewidget.h

@@ -30,7 +30,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 #include <QCloseEvent>
 #include <QCloseEvent>
 #include <QLabel>
 #include <QLabel>
 #include <QHBoxLayout>
 #include <QHBoxLayout>
-#include "starputoptypes.h"
+#include "starpu_top_types.h"
 
 
 class MainWindow;
 class MainWindow;
 
 

+ 11 - 11
starpu-top/mainwindow.cpp

@@ -61,7 +61,7 @@ MainWindow::MainWindow(QWidget *parent) :
     _dataAggregatorWidgets = new QList<QPointer<DataAggregatorWidget> > ();
     _dataAggregatorWidgets = new QList<QPointer<DataAggregatorWidget> > ();
     _dataDescriptions = new QList<DataDescription*> ();
     _dataDescriptions = new QList<DataDescription*> ();
     _paramDescriptions = new QList<ParamDescription*> ();
     _paramDescriptions = new QList<ParamDescription*> ();
-    _serverDevices = new QList<StarputopDevice> ();
+    _serverDevices = new QList<starpu_top_device> ();
     _nbDataWidgets = _nbInteractiveWidgets = _nbDataAggregatorWidgets = 0;
     _nbDataWidgets = _nbInteractiveWidgets = _nbDataAggregatorWidgets = 0;
 
 
     // Init managers
     // Init managers
@@ -97,18 +97,18 @@ MainWindow::MainWindow(QWidget *parent) :
     QObject::connect(settingsAction, SIGNAL(triggered()), this,
     QObject::connect(settingsAction, SIGNAL(triggered()), this,
                      SLOT(on_actionPreferences_triggered()));
                      SLOT(on_actionPreferences_triggered()));
     connectButton->addAction(settingsAction);
     connectButton->addAction(settingsAction);
-    ui->menuStarputop->addAction(_actionConnect);
+    ui->menu_starpu_top->addAction(_actionConnect);
     // Action launch
     // Action launch
     _actionLaunch = ui->mainToolBar->addAction(QIcon(":/images/play.png"),
     _actionLaunch = ui->mainToolBar->addAction(QIcon(":/images/play.png"),
                                                tr("Launch StarPU"));
                                                tr("Launch StarPU"));
     _actionLaunch->setIconText("Launch StarPU");
     _actionLaunch->setIconText("Launch StarPU");
     _actionLaunch->setToolTip("Launch StarPU");
     _actionLaunch->setToolTip("Launch StarPU");
     _actionLaunch->setShortcut(QKeySequence("Ctrl+L"));
     _actionLaunch->setShortcut(QKeySequence("Ctrl+L"));
-    ui->menuStarputop->addAction(_actionLaunch);
+    ui->menu_starpu_top->addAction(_actionLaunch);
     QObject::connect(_actionLaunch, SIGNAL(triggered()), this,
     QObject::connect(_actionLaunch, SIGNAL(triggered()), this,
                      SLOT(on_actionLaunch_StarPU_triggered()));
                      SLOT(on_actionLaunch_StarPU_triggered()));
     ui->mainToolBar->addSeparator();
     ui->mainToolBar->addSeparator();
-    ui->menuStarputop->addSeparator();
+    ui->menu_starpu_top->addSeparator();
     // Action debug
     // Action debug
     _actionDebug = ui->mainToolBar->addAction(QIcon(":/images/debugon.png"),
     _actionDebug = ui->mainToolBar->addAction(QIcon(":/images/debugon.png"),
                                               tr("Enable debug"));
                                               tr("Enable debug"));
@@ -116,7 +116,7 @@ MainWindow::MainWindow(QWidget *parent) :
     _actionDebug->setToolTip("Enable debug");
     _actionDebug->setToolTip("Enable debug");
     _actionDebug->setShortcut(QKeySequence("Ctrl+D"));
     _actionDebug->setShortcut(QKeySequence("Ctrl+D"));
     _actionDebug->setCheckable(true);
     _actionDebug->setCheckable(true);
-    ui->menuStarputop->addAction(_actionDebug);
+    ui->menu_starpu_top->addAction(_actionDebug);
     QObject::connect(_actionDebug, SIGNAL(toggled(bool)),
     QObject::connect(_actionDebug, SIGNAL(toggled(bool)),
                      this, SLOT(on_actionDebug_triggered(bool)));
                      this, SLOT(on_actionDebug_triggered(bool)));
     // Action save session setup
     // Action save session setup
@@ -125,7 +125,7 @@ MainWindow::MainWindow(QWidget *parent) :
     _actionSaveSessionSetup->setIconText("Save session setup");
     _actionSaveSessionSetup->setIconText("Save session setup");
     _actionSaveSessionSetup->setToolTip("Save session setup");
     _actionSaveSessionSetup->setToolTip("Save session setup");
     _actionSaveSessionSetup->setShortcut(QKeySequence("Ctrl+S"));
     _actionSaveSessionSetup->setShortcut(QKeySequence("Ctrl+S"));
-    ui->menuStarputop->addAction(_actionSaveSessionSetup);
+    ui->menu_starpu_top->addAction(_actionSaveSessionSetup);
     QObject::connect(_actionSaveSessionSetup, SIGNAL(triggered()), this,
     QObject::connect(_actionSaveSessionSetup, SIGNAL(triggered()), this,
                      SLOT(on_actionSaveSessionSetup_triggered()));
                      SLOT(on_actionSaveSessionSetup_triggered()));
     // Action add data aggregator widget
     // Action add data aggregator widget
@@ -135,13 +135,13 @@ MainWindow::MainWindow(QWidget *parent) :
     _actionAddDataAggregatorWidget->setIconText("Add data aggregator widget");
     _actionAddDataAggregatorWidget->setIconText("Add data aggregator widget");
     _actionAddDataAggregatorWidget->setToolTip("Add data aggregator widget");
     _actionAddDataAggregatorWidget->setToolTip("Add data aggregator widget");
     _actionAddDataAggregatorWidget->setShortcut(QKeySequence("Ctrl+G"));
     _actionAddDataAggregatorWidget->setShortcut(QKeySequence("Ctrl+G"));
-    ui->menuStarputop->addAction(_actionAddDataAggregatorWidget);
+    ui->menu_starpu_top->addAction(_actionAddDataAggregatorWidget);
     QObject::connect(_actionAddDataAggregatorWidget, SIGNAL(triggered()), this,
     QObject::connect(_actionAddDataAggregatorWidget, SIGNAL(triggered()), this,
                      SLOT(on_actionAddDataAggregatorWidget_triggered()));
                      SLOT(on_actionAddDataAggregatorWidget_triggered()));
     ui->mainToolBar->addSeparator();
     ui->mainToolBar->addSeparator();
-    ui->menuStarputop->addSeparator();
+    ui->menu_starpu_top->addSeparator();
     // Action quit
     // Action quit
-    QAction *actionQuit = ui->menuStarputop->addAction(
+    QAction *actionQuit = ui->menu_starpu_top->addAction(
             QIcon(":/images/quit.png"), tr("Quit"));
             QIcon(":/images/quit.png"), tr("Quit"));
     actionQuit->setIconText("Quit");
     actionQuit->setIconText("Quit");
     actionQuit->setToolTip("Quit");
     actionQuit->setToolTip("Quit");
@@ -540,7 +540,7 @@ void MainWindow::synchronizeSessionTime(qlonglong serverTimestamp)
 void MainWindow::initClient(QString serverID,
 void MainWindow::initClient(QString serverID,
                             QList<DataDescription*> *dataDescriptions,
                             QList<DataDescription*> *dataDescriptions,
                             QList<ParamDescription*> *paramDescriptions,
                             QList<ParamDescription*> *paramDescriptions,
-                            QList<StarputopDevice> *serverDevices)
+                            QList<starpu_top_device> *serverDevices)
 {
 {
     _serverID = serverID;
     _serverID = serverID;
     _dataDescriptions = dataDescriptions;
     _dataDescriptions = dataDescriptions;
@@ -1213,7 +1213,7 @@ ParamDescription *MainWindow::paramDescriptionFromId(int paramId)
     return 0;
     return 0;
 }
 }
 
 
-const QList<StarputopDevice> *MainWindow::serverDevices() const
+const QList<starpu_top_device> *MainWindow::serverDevices() const
 {
 {
     return _serverDevices;
     return _serverDevices;
 }
 }

+ 4 - 4
starpu-top/mainwindow.h

@@ -49,7 +49,7 @@ class TaskManager;
 #include <QAbstractSocket>
 #include <QAbstractSocket>
 #include <QTime>
 #include <QTime>
 #include <QSpinBox>
 #include <QSpinBox>
-#include "starputoptypes.h"
+#include "starpu_top_types.h"
 
 
 namespace Ui
 namespace Ui
 {
 {
@@ -79,7 +79,7 @@ public:
     const QList<ParamDescription*> *paramDescriptions() const;
     const QList<ParamDescription*> *paramDescriptions() const;
     DataDescription *dataDescriptionFromId(int dataId);
     DataDescription *dataDescriptionFromId(int dataId);
     ParamDescription *paramDescriptionFromId(int interactiveId);
     ParamDescription *paramDescriptionFromId(int interactiveId);
-    const QList<StarputopDevice> *serverDevices() const;
+    const QList<starpu_top_device> *serverDevices() const;
     // Get different widgets metadata
     // Get different widgets metadata
     const QHash<DataWidgetType, QString> *dataWidgetNames() const;
     const QHash<DataWidgetType, QString> *dataWidgetNames() const;
     const QHash<DataType, QSet<DataWidgetType> >
     const QHash<DataType, QSet<DataWidgetType> >
@@ -166,7 +166,7 @@ private:
     // Different descriptions
     // Different descriptions
     QList<DataDescription*> *_dataDescriptions;
     QList<DataDescription*> *_dataDescriptions;
     QList<ParamDescription*> *_paramDescriptions;
     QList<ParamDescription*> *_paramDescriptions;
-    QList<StarputopDevice> *_serverDevices;
+    QList<starpu_top_device> *_serverDevices;
     int _nbDataWidgets;
     int _nbDataWidgets;
     int _nbDataAggregatorWidgets;
     int _nbDataAggregatorWidgets;
     int _nbInteractiveWidgets;
     int _nbInteractiveWidgets;
@@ -233,7 +233,7 @@ public slots:
     void initClient(QString serverID,
     void initClient(QString serverID,
                     QList<DataDescription*> *dataDescriptions,
                     QList<DataDescription*> *dataDescriptions,
                     QList<ParamDescription*> *paramDescriptions,
                     QList<ParamDescription*> *paramDescriptions,
-                    QList<StarputopDevice> *serverDevices);
+                    QList<starpu_top_device> *serverDevices);
     // Connection events handlers
     // Connection events handlers
     void connectionSucceeded();
     void connectionSucceeded();
     void connectionAborted(QString message);
     void connectionAborted(QString message);

+ 3 - 3
starpu-top/mainwindow.ui

@@ -21,7 +21,7 @@
   </property>
   </property>
   <property name="windowIcon">
   <property name="windowIcon">
    <iconset resource="resources.qrc">
    <iconset resource="resources.qrc">
-    <normaloff>:/images/starputop.png</normaloff>:/images/starputop.png</iconset>
+    <normaloff>:/images/starpu_top.png</normaloff>:/images/starpu_top.png</iconset>
   </property>
   </property>
   <widget class="QWidget" name="centralWidget">
   <widget class="QWidget" name="centralWidget">
    <layout class="QGridLayout" name="gridLayout_2">
    <layout class="QGridLayout" name="gridLayout_2">
@@ -42,7 +42,7 @@
      <height>21</height>
      <height>21</height>
     </rect>
     </rect>
    </property>
    </property>
-   <widget class="QMenu" name="menuStarputop">
+   <widget class="QMenu" name="menu_starpu_top">
     <property name="title">
     <property name="title">
      <string>StarPU-Top</string>
      <string>StarPU-Top</string>
     </property>
     </property>
@@ -59,7 +59,7 @@
     </property>
     </property>
     <addaction name="actionPreferences"/>
     <addaction name="actionPreferences"/>
    </widget>
    </widget>
-   <addaction name="menuStarputop"/>
+   <addaction name="menu_starpu_top"/>
    <addaction name="menuDisplay"/>
    <addaction name="menuDisplay"/>
    <addaction name="menuHelp"/>
    <addaction name="menuHelp"/>
   </widget>
   </widget>

+ 1 - 1
starpu-top/preferencesdialog.h

@@ -33,7 +33,7 @@ class SessionSetupManager;
 #include <QMetaType>
 #include <QMetaType>
 #include <QDialog>
 #include <QDialog>
 #include <QComboBox>
 #include <QComboBox>
-#include "starputoptypes.h"
+#include "starpu_top_types.h"
 
 
 namespace Ui
 namespace Ui
 {
 {

+ 1 - 1
starpu-top/resources.qrc

@@ -13,7 +13,7 @@
         <file>images/add.png</file>
         <file>images/add.png</file>
         <file>images/remove.png</file>
         <file>images/remove.png</file>
         <file>images/widget.png</file>
         <file>images/widget.png</file>
-        <file>images/starputop.png</file>
+        <file>images/starpu_top.png</file>
         <file>images/windows.png</file>
         <file>images/windows.png</file>
         <file>images/lock.png</file>
         <file>images/lock.png</file>
     </qresource>
     </qresource>

+ 1 - 1
starpu-top/sessionsetupmanager.h

@@ -28,7 +28,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 
 
 class MainWindow;
 class MainWindow;
 
 
-#include "starputoptypes.h"
+#include "starpu_top_types.h"
 #include <QSettings>
 #include <QSettings>
 
 
 static const QString SESSION_SETUPS_DIR = "./sessionsetups";
 static const QString SESSION_SETUPS_DIR = "./sessionsetups";

+ 7 - 7
starpu-top/starputoptypes.h

@@ -23,8 +23,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 */
 */
 
 
 
 
-#ifndef STARPUTOPTYPES_H
-#define STARPUTOPTYPES_H
+#ifndef STARPU_TOP_TYPES_H
+#define STARPU_TOP_TYPES_H
 
 
 #include <QString>
 #include <QString>
 #include <QStringList>
 #include <QStringList>
@@ -112,7 +112,7 @@ enum ParamType
     PARAM_TYPE_ENUM = 4,
     PARAM_TYPE_ENUM = 4,
 };
 };
 
 
-enum StarputopDeviceType
+enum starpu_top_device_type
 {
 {
     SERVERDEVICE_CPU = 0,
     SERVERDEVICE_CPU = 0,
     SERVERDEVICE_CUDA = 1,
     SERVERDEVICE_CUDA = 1,
@@ -124,9 +124,9 @@ enum StarputopDeviceType
 typedef struct
 typedef struct
 {
 {
     int id;
     int id;
-    StarputopDeviceType type;
+    starpu_top_device_type type;
     QString name;
     QString name;
-} StarputopDevice;
+} starpu_top_device;
 
 
 // Server tasks
 // Server tasks
 typedef struct
 typedef struct
@@ -135,7 +135,7 @@ typedef struct
     int deviceId;
     int deviceId;
     qlonglong timestampStart;
     qlonglong timestampStart;
     qlonglong timestampEnd;
     qlonglong timestampEnd;
-} StarputopTask;
+} starpu_top_task;
 
 
 // Descriptions
 // Descriptions
 typedef struct
 typedef struct
@@ -318,4 +318,4 @@ typedef struct
     QList<int> dataIds;
     QList<int> dataIds;
 } DataAggregatorWidgetSetup;
 } DataAggregatorWidgetSetup;
 
 
-#endif // STARPUTOPTYPES_H
+#endif // STARPU_TOP_TYPES_H

+ 7 - 7
starpu-top/taskmanager.cpp

@@ -171,10 +171,10 @@ void TaskManager::addTaskEnd(int taskId, qlonglong timestampEnd)
     }
     }
 }
 }
 
 
-QList<StarputopTask> TaskManager::tasks(qlonglong timestampStart,
-                                        qlonglong timestampEnd)
+QList<starpu_top_task> TaskManager::tasks(qlonglong timestampStart,
+					  qlonglong timestampEnd)
 {
 {
-    QList < StarputopTask > tasks;
+    QList < starpu_top_task > tasks;
 
 
     _selectTasksQuery.addBindValue(timestampStart);
     _selectTasksQuery.addBindValue(timestampStart);
     _selectTasksQuery.addBindValue(timestampEnd);
     _selectTasksQuery.addBindValue(timestampEnd);
@@ -206,7 +206,7 @@ QList<StarputopTask> TaskManager::tasks(qlonglong timestampStart,
             qlonglong timestampEnd =
             qlonglong timestampEnd =
                     _selectTasksQuery.value(endField).toLongLong();
                     _selectTasksQuery.value(endField).toLongLong();
 
 
-            StarputopTask task;
+            starpu_top_task task;
             task.taskId = taskId;
             task.taskId = taskId;
             task.deviceId = deviceId;
             task.deviceId = deviceId;
             task.timestampStart = timestampStart;
             task.timestampStart = timestampStart;
@@ -220,10 +220,10 @@ QList<StarputopTask> TaskManager::tasks(qlonglong timestampStart,
     return tasks;
     return tasks;
 }
 }
 
 
-QList<StarputopTask> TaskManager::prevTasks(qlonglong timestampStart,
+QList<starpu_top_task> TaskManager::prevTasks(qlonglong timestampStart,
                                             qlonglong timestampEnd)
                                             qlonglong timestampEnd)
 {
 {
-    QList < StarputopTask > prevTasks;
+    QList < starpu_top_task > prevTasks;
 
 
     _selectPrevTasksQuery.addBindValue(timestampStart);
     _selectPrevTasksQuery.addBindValue(timestampStart);
     _selectPrevTasksQuery.addBindValue(timestampEnd);
     _selectPrevTasksQuery.addBindValue(timestampEnd);
@@ -255,7 +255,7 @@ QList<StarputopTask> TaskManager::prevTasks(qlonglong timestampStart,
             qlonglong timestampEnd =
             qlonglong timestampEnd =
                     _selectPrevTasksQuery.value(endField).toLongLong();
                     _selectPrevTasksQuery.value(endField).toLongLong();
 
 
-            StarputopTask prevTask;
+            starpu_top_task prevTask;
             prevTask.taskId = taskId;
             prevTask.taskId = taskId;
             prevTask.deviceId = deviceId;
             prevTask.deviceId = deviceId;
             prevTask.timestampStart = timestampStart;
             prevTask.timestampStart = timestampStart;

+ 3 - 3
starpu-top/taskmanager.h

@@ -26,7 +26,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 #ifndef TASKMANAGER_H
 #ifndef TASKMANAGER_H
 #define TASKMANAGER_H
 #define TASKMANAGER_H
 
 
-#include "starputoptypes.h"
+#include "starpu_top_types.h"
 #include <QDebug>
 #include <QDebug>
 #include <QtSql/QSqlDatabase>
 #include <QtSql/QSqlDatabase>
 #include <QtSql/QSqlQuery>
 #include <QtSql/QSqlQuery>
@@ -46,9 +46,9 @@ public:
     void addTaskStart(int taskId, int deviceId, qlonglong timestampStart);
     void addTaskStart(int taskId, int deviceId, qlonglong timestampStart);
     void addTaskEnd(int taskId, qlonglong timestampEnd);
     void addTaskEnd(int taskId, qlonglong timestampEnd);
     // Getters
     // Getters
-    QList<StarputopTask> tasks(qlonglong timestampStart,
+    QList<starpu_top_task> tasks(qlonglong timestampStart,
                                qlonglong timestampEnd);
                                qlonglong timestampEnd);
-    QList<StarputopTask> prevTasks(qlonglong timestampStart,
+    QList<starpu_top_task> prevTasks(qlonglong timestampStart,
                                    qlonglong timestampEnd);
                                    qlonglong timestampEnd);
 
 
 private:
 private:

+ 1 - 1
tools/dev/starpu_funcs.cocci

@@ -16,7 +16,7 @@
 @starpufunc@
 @starpufunc@
 position p;
 position p;
 type t;
 type t;
-identifier f ~= "^starpu_";
+identifier f ~= "starpu";
 @@
 @@
 
 
 t f@p( ... );
 t f@p( ... );