Browse Source

Bug fix: the home node was not set. We also rename the data_home field into
home_node which is perhaps a bit clearer.

Cédric Augonnet 15 years ago
parent
commit
e2e9ab577e

+ 1 - 1
src/datawizard/coherency.h

@@ -96,7 +96,7 @@ struct starpu_data_state_t {
 	struct starpu_data_interface_ops_t *ops;
 
 	/* where is the data home ? -1 if none yet */
-	int data_home;
+	int home_node;
 
 	/* what is the default write-back mask for that data ? */
 	uint32_t wb_mask;

+ 1 - 0
src/datawizard/filters.c

@@ -124,6 +124,7 @@ void starpu_data_partition(starpu_data_handle initial_handle, starpu_filter *f)
 		children->is_not_important = initial_handle->is_not_important;
 
 		children->wb_mask = initial_handle->wb_mask;
+		children->home_node = initial_handle->home_node;
 
 		/* initialize the chunk lock */
 		children->req_list = starpu_data_requester_list_new();

+ 3 - 1
src/datawizard/interfaces/data_interface.c

@@ -55,6 +55,8 @@ static void _starpu_register_new_data(starpu_data_handle handle,
 
 	handle->wb_mask = wb_mask;
 
+	handle->home_node = home_node;
+
 	/* that new data is invalid from all nodes perpective except for the
 	 * home node */
 	unsigned node;
@@ -185,7 +187,7 @@ void starpu_data_unregister(starpu_data_handle handle)
 
 	/* Fetch data in the home of the data to ensure we have a valid copy
 	 * where we registered it */
-	int home_node = handle->data_home; 
+	int home_node = handle->home_node; 
 	if (home_node >= 0)
 	{
 		struct unregister_callback_arg arg;