瀏覽代碼

mpi: re-indent code

Nathalie Furmento 8 年之前
父節點
當前提交
4d68f15840

+ 0 - 1
mpi/Makefile.am

@@ -24,7 +24,6 @@ versincludedir = $(includedir)/starpu/$(STARPU_EFFECTIVE_VERSION)
 versinclude_HEADERS = 					\
 	include/starpu_mpi.h				\
 	include/starpu_mpi_lb.h				\
-	include/starpu_mpi.h				\
 	include/fstarpu_mpi_mod.f90
 
 showcheck:

+ 98 - 98
mpi/src/load_balancer/load_balancer.c

@@ -28,39 +28,39 @@ static void (*saved_post_exec_hook)(struct starpu_task *task) = NULL;
 
 static void post_exec_hook_wrapper(struct starpu_task *task)
 {
-    //fprintf(stderr,"I am called ! \n");
-    if (defined_policy && defined_policy->finished_task_entry_point)
-        defined_policy->finished_task_entry_point();
-    if (saved_post_exec_hook)
-        saved_post_exec_hook(task);
+	//fprintf(stderr,"I am called ! \n");
+	if (defined_policy && defined_policy->finished_task_entry_point)
+		defined_policy->finished_task_entry_point();
+	if (saved_post_exec_hook)
+		saved_post_exec_hook(task);
 }
 
-static struct load_balancer_policy *predefined_policies[] = 
+static struct load_balancer_policy *predefined_policies[] =
 {
-    &load_heat_propagation_policy,
-    NULL
+	&load_heat_propagation_policy,
+	NULL
 };
 
 void starpu_mpi_lb_init(struct starpu_mpi_lb_conf *itf)
 {
-    const char *policy_name = starpu_getenv("STARPU_MPI_LB");
-    if (!policy_name && itf)
-        policy_name = itf->name;
-
-    if (!policy_name || (strcmp(policy_name, "help") == 0))
-    {
-        fprintf(stderr,"Warning : load balancing is disabled for this run.\n");
-        fprintf(stderr,"Use the STARPU_MPI_LB = <name> environment variable to use a load balancer.\n");
-        fprintf(stderr,"Available load balancers :\n");
-        struct load_balancer_policy **policy;
-        for(policy=predefined_policies ; *policy!=NULL ; policy++)
-        {
-            struct load_balancer_policy *p = *policy;
-            fprintf(stderr," - %s\n", p->policy_name);
-        }
-        return;
-    }
-    
+	const char *policy_name = starpu_getenv("STARPU_MPI_LB");
+	if (!policy_name && itf)
+		policy_name = itf->name;
+
+	if (!policy_name || (strcmp(policy_name, "help") == 0))
+	{
+		fprintf(stderr,"Warning : load balancing is disabled for this run.\n");
+		fprintf(stderr,"Use the STARPU_MPI_LB = <name> environment variable to use a load balancer.\n");
+		fprintf(stderr,"Available load balancers :\n");
+		struct load_balancer_policy **policy;
+		for(policy=predefined_policies ; *policy!=NULL ; policy++)
+		{
+			struct load_balancer_policy *p = *policy;
+			fprintf(stderr," - %s\n", p->policy_name);
+		}
+		return;
+	}
+
 	struct load_balancer_policy **policy;
 	for(policy=predefined_policies ; *policy!=NULL ; policy++)
 	{
@@ -71,86 +71,86 @@ void starpu_mpi_lb_init(struct starpu_mpi_lb_conf *itf)
 			{
 				/* we found a policy with the requested name */
 				defined_policy = p;
-                break;
+				break;
 			}
 		}
 	}
 
-    if (!defined_policy)
-    {
-        fprintf(stderr,"Error : no load balancer with the name %s. Load balancing will be disabled for this run.\n", policy_name);
-        return;
-    }
-
-    if (defined_policy->init(itf))
-    {
-        fprintf(stderr,"Error in load_balancer->init: invalid starpu_mpi_lb_conf. Load balancing will be disabled for this run.\n");
-        return;
-    }
-
-    /* starpu_register_hook(submitted_task, defined_policy->submitted_task_entry_point); */
-    if (defined_policy->submitted_task_entry_point)
-        starpu_mpi_pre_submit_hook_register(defined_policy->submitted_task_entry_point);
-
-    /* starpu_register_hook(finished_task, defined_policy->finished_task_entry_point); */
-    if (defined_policy->finished_task_entry_point)
-    {
-        STARPU_ASSERT(saved_post_exec_hook == NULL);
-        struct starpu_sched_policy **predefined_sched_policies = starpu_sched_get_predefined_policies();
-        struct starpu_sched_policy **sched_policy;
-        const char *sched_policy_name = starpu_getenv("STARPU_SCHED");
-
-        if (!sched_policy_name)
-            sched_policy_name = "eager";
-
-        for(sched_policy=predefined_sched_policies ; *sched_policy!=NULL ; sched_policy++)
-        {
-            struct starpu_sched_policy *sched_p = *sched_policy;
-            if (strcmp(sched_policy_name, sched_p->policy_name) == 0)
-            {
-                /* We found the scheduling policy with the requested name */
-                saved_post_exec_hook = sched_p->post_exec_hook;
-                break;
-            }
-        }
-        starpu_sched_policy_set_post_exec_hook(post_exec_hook_wrapper, sched_policy_name);
+	if (!defined_policy)
+	{
+		fprintf(stderr,"Error : no load balancer with the name %s. Load balancing will be disabled for this run.\n", policy_name);
+		return;
+	}
+
+	if (defined_policy->init(itf))
+	{
+		fprintf(stderr,"Error in load_balancer->init: invalid starpu_mpi_lb_conf. Load balancing will be disabled for this run.\n");
+		return;
+	}
+
+	/* starpu_register_hook(submitted_task, defined_policy->submitted_task_entry_point); */
+	if (defined_policy->submitted_task_entry_point)
+		starpu_mpi_pre_submit_hook_register(defined_policy->submitted_task_entry_point);
+
+	/* starpu_register_hook(finished_task, defined_policy->finished_task_entry_point); */
+	if (defined_policy->finished_task_entry_point)
+	{
+		STARPU_ASSERT(saved_post_exec_hook == NULL);
+		struct starpu_sched_policy **predefined_sched_policies = starpu_sched_get_predefined_policies();
+		struct starpu_sched_policy **sched_policy;
+		const char *sched_policy_name = starpu_getenv("STARPU_SCHED");
+
+		if (!sched_policy_name)
+			sched_policy_name = "eager";
+
+		for(sched_policy=predefined_sched_policies ; *sched_policy!=NULL ; sched_policy++)
+		{
+			struct starpu_sched_policy *sched_p = *sched_policy;
+			if (strcmp(sched_policy_name, sched_p->policy_name) == 0)
+			{
+				/* We found the scheduling policy with the requested name */
+				saved_post_exec_hook = sched_p->post_exec_hook;
+				break;
+			}
+		}
+		starpu_sched_policy_set_post_exec_hook(post_exec_hook_wrapper, sched_policy_name);
 	}
 }
 
 void starpu_mpi_lb_shutdown()
 {
-    if (!defined_policy)
-        return;
-
-    if (defined_policy && defined_policy->deinit())
-        return;
-
-    /* starpu_unregister_hook(submitted_task, defined_policy->submitted_task_entry_point); */
-    if (defined_policy->submitted_task_entry_point)
-        starpu_mpi_pre_submit_hook_unregister();
-
-    /* starpu_unregister_hook(finished_task, defined_policy->finished_task_entry_point); */
-    if (defined_policy->finished_task_entry_point && saved_post_exec_hook != NULL)
-    {
-        struct starpu_sched_policy **predefined_sched_policies = starpu_sched_get_predefined_policies();
-        struct starpu_sched_policy **sched_policy;
-        const char *sched_policy_name = starpu_getenv("STARPU_SCHED");
-
-        if (!sched_policy_name)
-            sched_policy_name = "eager";
-
-        for(sched_policy=predefined_sched_policies ; *sched_policy!=NULL ; sched_policy++)
-        {
-            struct starpu_sched_policy *sched_p = *sched_policy;
-            if (strcmp(sched_policy_name, sched_p->policy_name) == 0)
-            {
-                /* We found the scheduling policy with the requested name */
-                sched_p->post_exec_hook = saved_post_exec_hook;
-                saved_post_exec_hook = NULL;
-                break;
-            }
-        }
+	if (!defined_policy)
+		return;
+
+	if (defined_policy && defined_policy->deinit())
+		return;
+
+	/* starpu_unregister_hook(submitted_task, defined_policy->submitted_task_entry_point); */
+	if (defined_policy->submitted_task_entry_point)
+		starpu_mpi_pre_submit_hook_unregister();
+
+	/* starpu_unregister_hook(finished_task, defined_policy->finished_task_entry_point); */
+	if (defined_policy->finished_task_entry_point && saved_post_exec_hook != NULL)
+	{
+		struct starpu_sched_policy **predefined_sched_policies = starpu_sched_get_predefined_policies();
+		struct starpu_sched_policy **sched_policy;
+		const char *sched_policy_name = starpu_getenv("STARPU_SCHED");
+
+		if (!sched_policy_name)
+			sched_policy_name = "eager";
+
+		for(sched_policy=predefined_sched_policies ; *sched_policy!=NULL ; sched_policy++)
+		{
+			struct starpu_sched_policy *sched_p = *sched_policy;
+			if (strcmp(sched_policy_name, sched_p->policy_name) == 0)
+			{
+				/* We found the scheduling policy with the requested name */
+				sched_p->post_exec_hook = saved_post_exec_hook;
+				saved_post_exec_hook = NULL;
+				break;
+			}
+		}
 	}
-    STARPU_ASSERT(saved_post_exec_hook == NULL);
-    defined_policy = NULL;
+	STARPU_ASSERT(saved_post_exec_hook == NULL);
+	defined_policy = NULL;
 }

+ 43 - 44
mpi/src/load_balancer/policy/data_movements_interface.c

@@ -24,10 +24,10 @@ int **data_movements_get_ref_tags_table(starpu_data_handle_t handle)
 	struct data_movements_interface *dm_interface =
 		(struct data_movements_interface *) starpu_data_get_interface_on_node(handle, STARPU_MAIN_RAM);
 
-    if (dm_interface->tags)
-        return &dm_interface->tags;
-    else
-        return NULL;
+	if (dm_interface->tags)
+		return &dm_interface->tags;
+	else
+		return NULL;
 }
 
 int **data_movements_get_ref_ranks_table(starpu_data_handle_t handle)
@@ -35,10 +35,10 @@ int **data_movements_get_ref_ranks_table(starpu_data_handle_t handle)
 	struct data_movements_interface *dm_interface =
 		(struct data_movements_interface *) starpu_data_get_interface_on_node(handle, STARPU_MAIN_RAM);
 
-    if (dm_interface->ranks)
-        return &dm_interface->ranks;
-    else
-        return NULL;
+	if (dm_interface->ranks)
+		return &dm_interface->ranks;
+	else
+		return NULL;
 }
 
 int *data_movements_get_tags_table(starpu_data_handle_t handle)
@@ -70,30 +70,29 @@ int data_movements_reallocate_tables(starpu_data_handle_t handle, int size)
 	struct data_movements_interface *dm_interface =
 		(struct data_movements_interface *) starpu_data_get_interface_on_node(handle, STARPU_MAIN_RAM);
 
+	if (dm_interface->size)
+	{
+		STARPU_ASSERT(dm_interface->tags);
+		free(dm_interface->tags);
+		dm_interface->tags = NULL;
 
-    if (dm_interface->size)
-    {
-        STARPU_ASSERT(dm_interface->tags);
-        free(dm_interface->tags);
-        dm_interface->tags = NULL;
-
-        STARPU_ASSERT(dm_interface->ranks);
-        free(dm_interface->ranks);
-        dm_interface->ranks = NULL;
-    }
-    else
-    {
-        STARPU_ASSERT(!dm_interface->tags);
-        STARPU_ASSERT(!dm_interface->ranks);
-    }
+		STARPU_ASSERT(dm_interface->ranks);
+		free(dm_interface->ranks);
+		dm_interface->ranks = NULL;
+	}
+	else
+	{
+		STARPU_ASSERT(!dm_interface->tags);
+		STARPU_ASSERT(!dm_interface->ranks);
+	}
 
-    dm_interface->size = size;
+	dm_interface->size = size;
 
-    if (dm_interface->size)
-    {
-        dm_interface->tags = malloc(size*sizeof(int));
-        dm_interface->ranks = malloc(size*sizeof(int));
-    }
+	if (dm_interface->size)
+	{
+		dm_interface->tags = malloc(size*sizeof(int));
+		dm_interface->ranks = malloc(size*sizeof(int));
+	}
 
 	return 0 ;
 }
@@ -184,14 +183,14 @@ static int data_movements_pack_data(starpu_data_handle_t handle, unsigned node,
 	{
 		char *data;
 		starpu_malloc_flags((void**) &data, *count, 0);
-        assert(data);
+		assert(data);
 		*ptr = data;
 		memcpy(data, &dm_interface->size, sizeof(int));
-        if (dm_interface->size)
-        {
-            memcpy(data+sizeof(int), dm_interface->tags, (dm_interface->size*sizeof(int)));
-            memcpy(data+sizeof(int)+(dm_interface->size*sizeof(int)), dm_interface->ranks, dm_interface->size*sizeof(int));
-        }
+		if (dm_interface->size)
+		{
+			memcpy(data+sizeof(int), dm_interface->tags, (dm_interface->size*sizeof(int)));
+			memcpy(data+sizeof(int)+(dm_interface->size*sizeof(int)), dm_interface->ranks, dm_interface->size*sizeof(int));
+		}
 	}
 
 	return 0;
@@ -205,17 +204,17 @@ static int data_movements_unpack_data(starpu_data_handle_t handle, unsigned node
 	struct data_movements_interface *dm_interface = (struct data_movements_interface *)
 		starpu_data_get_interface_on_node(handle, node);
 
-    int size = 0;
+	int size = 0;
 	memcpy(&size, data, sizeof(int));
 	STARPU_ASSERT(count == (2 * size * sizeof(int)) + sizeof(int));
-    
-    data_movements_reallocate_tables(handle, size);
-
-    if (dm_interface->size)
-    {
-        memcpy(dm_interface->tags, data+sizeof(int), dm_interface->size*sizeof(int));
-        memcpy(dm_interface->ranks, data+sizeof(int)+(dm_interface->size*sizeof(int)), dm_interface->size*sizeof(int));
-    }
+
+	data_movements_reallocate_tables(handle, size);
+
+	if (dm_interface->size)
+	{
+		memcpy(dm_interface->tags, data+sizeof(int), dm_interface->size*sizeof(int));
+		memcpy(dm_interface->ranks, data+sizeof(int)+(dm_interface->size*sizeof(int)), dm_interface->size*sizeof(int));
+	}
 
     return 0;
 }

+ 3 - 3
mpi/src/load_balancer/policy/data_movements_interface.h

@@ -22,11 +22,11 @@
 /* interface for data_movements */
 struct data_movements_interface
 {
-    /* Data tags table */
+	/* Data tags table */
 	int *tags;
-    /* Ranks table (where to move the corresponding data) */
+	/* Ranks table (where to move the corresponding data) */
 	int *ranks;
-    /* Size of the tables */
+	/* Size of the tables */
 	int size;
 };
 

+ 9 - 9
mpi/src/load_balancer/policy/load_balancer_policy.h

@@ -30,15 +30,15 @@ extern "C" {
  * these entry points of the runtime system. */
 struct load_balancer_policy
 {
-    int (*init)(struct starpu_mpi_lb_conf *);
-    int (*deinit)();
-    void (*submitted_task_entry_point)();
-    void (*finished_task_entry_point)();
-
-    /* Name of the load balancing policy. The selection of the load balancer is
-     * performed through the use of the STARPU_MPI_LB=name environment
-     * variable.
-     */
+	int (*init)(struct starpu_mpi_lb_conf *);
+	int (*deinit)();
+	void (*submitted_task_entry_point)();
+	void (*finished_task_entry_point)();
+
+	/* Name of the load balancing policy. The selection of the load balancer is
+	 * performed through the use of the STARPU_MPI_LB=name environment
+	 * variable.
+	 */
 	const char *policy_name;
 };
 

+ 31 - 28
mpi/src/load_balancer/policy/load_data_interface.c

@@ -40,7 +40,7 @@ int load_data_get_current_phase(starpu_data_handle_t handle)
 	struct load_data_interface *ld_interface =
 		(struct load_data_interface *) starpu_data_get_interface_on_node(handle, STARPU_MAIN_RAM);
 
-    return ld_interface->phase;
+	return ld_interface->phase;
 }
 
 int load_data_get_nsubmitted_tasks(starpu_data_handle_t handle)
@@ -48,7 +48,7 @@ int load_data_get_nsubmitted_tasks(starpu_data_handle_t handle)
 	struct load_data_interface *ld_interface =
 		(struct load_data_interface *) starpu_data_get_interface_on_node(handle, STARPU_MAIN_RAM);
 
-    return ld_interface->nsubmitted_tasks;
+	return ld_interface->nsubmitted_tasks;
 }
 
 int load_data_get_nfinished_tasks(starpu_data_handle_t handle)
@@ -56,7 +56,7 @@ int load_data_get_nfinished_tasks(starpu_data_handle_t handle)
 	struct load_data_interface *ld_interface =
 		(struct load_data_interface *) starpu_data_get_interface_on_node(handle, STARPU_MAIN_RAM);
 
-    return ld_interface->nfinished_tasks;
+	return ld_interface->nfinished_tasks;
 }
 
 int load_data_inc_nsubmitted_tasks(starpu_data_handle_t handle)
@@ -64,7 +64,7 @@ int load_data_inc_nsubmitted_tasks(starpu_data_handle_t handle)
 	struct load_data_interface *ld_interface =
 		(struct load_data_interface *) starpu_data_get_interface_on_node(handle, STARPU_MAIN_RAM);
 
-    (ld_interface->nsubmitted_tasks)++;
+	(ld_interface->nsubmitted_tasks)++;
 
 	return 0;
 }
@@ -74,7 +74,7 @@ int load_data_inc_nfinished_tasks(starpu_data_handle_t handle)
 	struct load_data_interface *ld_interface =
 		(struct load_data_interface *) starpu_data_get_interface_on_node(handle, STARPU_MAIN_RAM);
 
-    (ld_interface->nfinished_tasks)++;
+	(ld_interface->nfinished_tasks)++;
 
 	return 0;
 }
@@ -84,7 +84,7 @@ int load_data_next_phase(starpu_data_handle_t handle)
 	struct load_data_interface *ld_interface =
 		(struct load_data_interface *) starpu_data_get_interface_on_node(handle, STARPU_MAIN_RAM);
 
-    ld_interface->phase++;
+	ld_interface->phase++;
 
 	return 0;
 }
@@ -94,7 +94,7 @@ int load_data_update_elapsed_time(starpu_data_handle_t handle)
 	struct load_data_interface *ld_interface =
 		(struct load_data_interface *) starpu_data_get_interface_on_node(handle, STARPU_MAIN_RAM);
 
-    ld_interface->elapsed_time = starpu_timing_now() - ld_interface->start;
+	ld_interface->elapsed_time = starpu_timing_now() - ld_interface->start;
 
 	return 0;
 }
@@ -112,8 +112,8 @@ int load_data_update_wakeup_cond(starpu_data_handle_t handle)
 	struct load_data_interface *ld_interface =
 		(struct load_data_interface *) starpu_data_get_interface_on_node(handle, STARPU_MAIN_RAM);
 
-    int previous_threshold = ld_interface->wakeup_task_threshold;
-    ld_interface->wakeup_task_threshold += (ld_interface->nsubmitted_tasks - previous_threshold) * ld_interface->wakeup_ratio;
+	int previous_threshold = ld_interface->wakeup_task_threshold;
+	ld_interface->wakeup_task_threshold += (ld_interface->nsubmitted_tasks - previous_threshold) * ld_interface->wakeup_ratio;
 
 	return 0;
 }
@@ -123,7 +123,7 @@ int load_data_wakeup_cond(starpu_data_handle_t handle)
 	struct load_data_interface *ld_interface =
 		(struct load_data_interface *) starpu_data_get_interface_on_node(handle, STARPU_MAIN_RAM);
 
-    return ((ld_interface->wakeup_task_threshold > 0) && (ld_interface->nfinished_tasks == ld_interface->wakeup_task_threshold));
+	return ((ld_interface->wakeup_task_threshold > 0) && (ld_interface->nfinished_tasks == ld_interface->wakeup_task_threshold));
 }
 
 static void load_data_register_data_handle(starpu_data_handle_t handle, unsigned home_node, void *data_interface)
@@ -141,29 +141,29 @@ static void load_data_register_data_handle(starpu_data_handle_t handle, unsigned
 		local_interface->phase = ld_interface->phase;
 		local_interface->nsubmitted_tasks = ld_interface->nsubmitted_tasks;
 		local_interface->nfinished_tasks = ld_interface->nsubmitted_tasks;
-        local_interface->wakeup_task_threshold = ld_interface->wakeup_task_threshold;
-        local_interface->wakeup_ratio = ld_interface->wakeup_ratio;
-        local_interface->sleep_task_threshold = ld_interface->sleep_task_threshold;
+		local_interface->wakeup_task_threshold = ld_interface->wakeup_task_threshold;
+		local_interface->wakeup_ratio = ld_interface->wakeup_ratio;
+		local_interface->sleep_task_threshold = ld_interface->sleep_task_threshold;
 	}
 }
 
 static starpu_ssize_t load_data_allocate_data_on_node(void *data_interface, unsigned node)
 {
-    (void) data_interface;
-    (void) node;
+	(void) data_interface;
+	(void) node;
 
-    return 0;
+	return 0;
 }
 
 static void load_data_free_data_on_node(void *data_interface, unsigned node)
 {
-    (void) data_interface;
-    (void) node;
+	(void) data_interface;
+	(void) node;
 }
 
 static size_t load_data_get_size(starpu_data_handle_t handle)
 {
-    (void) handle;
+	(void) handle;
 	return (sizeof(struct load_data_interface));
 }
 
@@ -171,7 +171,10 @@ static uint32_t load_data_footprint(starpu_data_handle_t handle)
 {
 	struct load_data_interface *ld_interface =
 		(struct load_data_interface *) starpu_data_get_interface_on_node(handle, STARPU_MAIN_RAM);
-	return starpu_hash_crc32c_be(ld_interface->start, starpu_hash_crc32c_be(ld_interface->elapsed_time, starpu_hash_crc32c_be(ld_interface->nsubmitted_tasks, starpu_hash_crc32c_be(ld_interface->sleep_task_threshold, ld_interface->wakeup_task_threshold))));
+	return starpu_hash_crc32c_be(ld_interface->start,
+				     starpu_hash_crc32c_be(ld_interface->elapsed_time,
+							   starpu_hash_crc32c_be(ld_interface->nsubmitted_tasks,
+										 starpu_hash_crc32c_be(ld_interface->sleep_task_threshold, ld_interface->wakeup_task_threshold))));
 }
 
 static int load_data_pack_data(starpu_data_handle_t handle, unsigned node, void **ptr, starpu_ssize_t *count)
@@ -204,7 +207,7 @@ static int load_data_unpack_data(starpu_data_handle_t handle, unsigned node, voi
 	STARPU_ASSERT(count == sizeof(struct load_data_interface));
 	memcpy(ld_interface, data, count);
 
-    return 0;
+	return 0;
 }
 
 static int copy_any_to_any(void *src_interface, unsigned src_node,
@@ -213,8 +216,8 @@ static int copy_any_to_any(void *src_interface, unsigned src_node,
 {
 	(void) src_interface;
 	(void) dst_interface;
-    (void) src_node;
-    (void) dst_node;
+	(void) src_node;
+	(void) dst_node;
 	(void) async_data;
 
 	return 0;
@@ -246,12 +249,12 @@ void load_data_data_register(starpu_data_handle_t *handleptr, unsigned home_node
 	struct load_data_interface load_data =
 	{
 		.start = starpu_timing_now(),
-        .elapsed_time = 0,
-        .phase = 0,
-        .nsubmitted_tasks = 0,
-        .nfinished_tasks = 0,
+		.elapsed_time = 0,
+		.phase = 0,
+		.nsubmitted_tasks = 0,
+		.nfinished_tasks = 0,
 		.sleep_task_threshold = sleep_task_threshold,
-        .wakeup_task_threshold = 0,
+		.wakeup_task_threshold = 0,
 		.wakeup_ratio = wakeup_ratio
 	};
 

+ 15 - 15
mpi/src/load_balancer/policy/load_data_interface.h

@@ -22,24 +22,24 @@
 /* interface for load_data */
 struct load_data_interface
 {
-    /* Starting time of the execution */
-    double start;
-    /* Elapsed time until the start time and the time when event "launch a load
-     * balancing phase" is triggered */
+	/* Starting time of the execution */
+	double start;
+	/* Elapsed time until the start time and the time when event "launch a load
+	 * balancing phase" is triggered */
 	double elapsed_time;
-    /* Current submission phase, i.e how many balanced steps have already
-     * happened so far. */
-    int phase;
-    /* Number of currently submitted tasks */
-    int nsubmitted_tasks;
-    /* Number of currently finished tasks */
-    int nfinished_tasks;
-    /* Task threshold to sleep the submission thread */
+	/* Current submission phase, i.e how many balanced steps have already
+	 * happened so far. */
+	int phase;
+	/* Number of currently submitted tasks */
+	int nsubmitted_tasks;
+	/* Number of currently finished tasks */
+	int nfinished_tasks;
+	/* Task threshold to sleep the submission thread */
 	int sleep_task_threshold;
-    /* Task threshold to wake-up the submission thread */
+	/* Task threshold to wake-up the submission thread */
 	int wakeup_task_threshold;
-    /* Ratio of submitted tasks to wait for completion before waking up the
-     * submission thread */
+	/* Ratio of submitted tasks to wait for completion before waking up the
+	 * submission thread */
 	double wakeup_ratio;
 };
 

文件差異過大導致無法顯示
+ 473 - 483
mpi/src/load_balancer/policy/load_heat_propagation.c