Browse Source

make sure the buffer we are dropping does not contain data

Samuel Thibault 11 years ago
parent
commit
ce1dc108c3
1 changed files with 1 additions and 0 deletions
  1. 1 0
      src/datawizard/filters.c

+ 1 - 0
src/datawizard/filters.c

@@ -333,6 +333,7 @@ void starpu_data_unpartition(starpu_data_handle_t root_handle, unsigned gatherin
 		for (worker = 0; worker < nworkers; worker++)
 		for (worker = 0; worker < nworkers; worker++)
 		{
 		{
 			struct _starpu_data_replicate *local = &child_handle->per_worker[worker];
 			struct _starpu_data_replicate *local = &child_handle->per_worker[worker];
+			STARPU_ASSERT(local->state == STARPU_INVALID);
 			if (local->allocated && local->automatically_allocated)
 			if (local->allocated && local->automatically_allocated)
 				_starpu_request_mem_chunk_removal(child_handle, local, starpu_worker_get_memory_node(worker), sizes[child]);
 				_starpu_request_mem_chunk_removal(child_handle, local, starpu_worker_get_memory_node(worker), sizes[child]);
 		}
 		}