Andra Hugo 13 年之前
父節點
當前提交
3d45089fef

+ 3 - 3
doc/chapters/sched_ctx_hypervisor.texi

@@ -118,7 +118,7 @@ the maximum idle time allowed for workers that have just been moved from other c
 This macro is used when calling sched_ctx_hypervisor_ioctl and must be followed by 1 argument (int) indicating the tag
 This macro is used when calling sched_ctx_hypervisor_ioctl and must be followed by 1 argument (int) indicating the tag
 an executed task should have such that this configuration should be taken into account.
 an executed task should have such that this configuration should be taken into account.
 @end defmac
 @end defmac
-
+@end deftypefun
 @node Resizing strategies
 @node Resizing strategies
 @section Resizing strategies
 @section Resizing strategies
 
 
@@ -199,11 +199,10 @@ or
 
 
 @cartouche
 @cartouche
 @smallexample
 @smallexample
-@{starpu_insert_task(&codelet,
+starpu_insert_task(&codelet,
 		    ...,
 		    ...,
 		    STARPU_FLOPS, 100,
 		    STARPU_FLOPS, 100,
                     0);
                     0);
-@}
 @end smallexample
 @end smallexample
 @end cartouche
 @end cartouche
 
 
@@ -328,6 +327,7 @@ The structure confirming the last resize finished and a new one can be done
 
 
 @deftp {Data Type} {struct resize_ack}
 @deftp {Data Type} {struct resize_ack}
 This structures checks if the workers moved to another context are actually taken into account in that context
 This structures checks if the workers moved to another context are actually taken into account in that context
+@table @asis
 @item @code{int receiver_sched_ctx}
 @item @code{int receiver_sched_ctx}
 The context receiving the new workers
 The context receiving the new workers
 @item @code{int *moved_workers}
 @item @code{int *moved_workers}

+ 2 - 1
include/starpu_util.h

@@ -247,7 +247,8 @@ int starpu_data_cpy(starpu_data_handle_t dst_handle, starpu_data_handle_t src_ha
 #define STARPU_PRIORITY		(1<<8)	/* Priority associated to the task */
 #define STARPU_PRIORITY		(1<<8)	/* Priority associated to the task */
 #define STARPU_EXECUTE_ON_NODE	(1<<9)	/* Used by MPI to define which task is going to execute the codelet */
 #define STARPU_EXECUTE_ON_NODE	(1<<9)	/* Used by MPI to define which task is going to execute the codelet */
 #define STARPU_EXECUTE_ON_DATA	(1<<10)	/* Used by MPI to define which task is going to execute the codelet */
 #define STARPU_EXECUTE_ON_DATA	(1<<10)	/* Used by MPI to define which task is going to execute the codelet */
-#define STARPU_HYPERVISOR_TAG	(1<<11)	/* Used to checkpoint a task after whose execution we'll execute  a code */
+#define STARPU_HYPERVISOR_TAG	(1<<11)	/* Used to tag a task after whose execution we'll execute  a code */
+#define STARPU_HYPERVISOR_FLOPS	(1<<12)	/* Used to specify the number of flops needed to be executed by a task */
 
 
 /* Wrapper to create a task. */
 /* Wrapper to create a task. */
 int starpu_insert_task(struct starpu_codelet *cl, ...);
 int starpu_insert_task(struct starpu_codelet *cl, ...);

+ 0 - 2
sched_ctx_hypervisor/include/sched_ctx_hypervisor.h

@@ -105,8 +105,6 @@ void sched_ctx_hypervisor_set_config(unsigned sched_ctx, void *config);
 
 
 struct policy_config* sched_ctx_hypervisor_get_config(unsigned sched_ctx);
 struct policy_config* sched_ctx_hypervisor_get_config(unsigned sched_ctx);
 
 
-void sched_ctx_hypervisor_steal_workers(unsigned sched_ctx, int *workers, int nworkers, int task_tag);
-
 int* sched_ctx_hypervisor_get_sched_ctxs();
 int* sched_ctx_hypervisor_get_sched_ctxs();
 
 
 int sched_ctx_hypervisor_get_nsched_ctxs();
 int sched_ctx_hypervisor_get_nsched_ctxs();

+ 8 - 1
src/util/starpu_insert_task_utils.c

@@ -242,10 +242,17 @@ int _starpu_insert_task_create_and_submit(char *arg_buffer, struct starpu_codele
 		{
 		{
 			(void)va_arg(varg_list, starpu_data_handle_t);
 			(void)va_arg(varg_list, starpu_data_handle_t);
 		}
 		}
-		else if (arg_type==STARPU_HYPERVISOR_TAG) {
+		else if (arg_type==STARPU_HYPERVISOR_TAG) 
+		{
 			int hypervisor_tag = va_arg(varg_list, int);
 			int hypervisor_tag = va_arg(varg_list, int);
 			(*task)->hypervisor_tag = hypervisor_tag;
 			(*task)->hypervisor_tag = hypervisor_tag;
 		}
 		}
+		else if (arg_type==STARPU_HYPERVISOR_FLOPS) 
+		{
+			int flops = va_arg(varg_list, int);
+			(*task)->flops = flops;
+		}
+
 	}
 	}
 
 
 	va_end(varg_list);
 	va_end(varg_list);