Browse Source

Make _starpu_data_wait_until_available take a synchronization name, so that the node in the DAG becomes understandable

Samuel Thibault 11 years ago
parent
commit
8e3d4676f4

+ 2 - 2
src/core/dependencies/implicit_data_deps.c

@@ -518,7 +518,7 @@ void _starpu_unlock_post_sync_tasks(starpu_data_handle_t handle)
 
 /* If sequential consistency mode is enabled, this function blocks until the
  * handle is available in the requested access mode. */
-int _starpu_data_wait_until_available(starpu_data_handle_t handle, enum starpu_data_access_mode mode)
+int _starpu_data_wait_until_available(starpu_data_handle_t handle, enum starpu_data_access_mode mode, const char *sync_name)
 {
 	/* If sequential consistency is enabled, wait until data is available */
 	STARPU_PTHREAD_MUTEX_LOCK(&handle->sequential_consistency_mutex);
@@ -527,7 +527,7 @@ int _starpu_data_wait_until_available(starpu_data_handle_t handle, enum starpu_d
 	{
 		struct starpu_task *sync_task, *new_task;
 		sync_task = starpu_task_create();
-		sync_task->name = "sync_task_seq_cons";
+		sync_task->name = sync_name;
 		sync_task->detach = 0;
 		sync_task->destroy = 1;
 

+ 2 - 2
src/core/dependencies/implicit_data_deps.h

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
- * Copyright (C) 2010, 2012  Université de Bordeaux 1
+ * Copyright (C) 2010, 2012, 2014  Université de Bordeaux 1
  * Copyright (C) 2010, 2011  Centre National de la Recherche Scientifique
  *
  * StarPU is free software; you can redistribute it and/or modify
@@ -31,7 +31,7 @@ void _starpu_add_post_sync_tasks(struct starpu_task *post_sync_task, starpu_data
 void _starpu_unlock_post_sync_tasks(starpu_data_handle_t handle);
 
 /* This function blocks until the handle is available in the requested mode */
-int _starpu_data_wait_until_available(starpu_data_handle_t handle, enum starpu_data_access_mode mode);
+int _starpu_data_wait_until_available(starpu_data_handle_t handle, enum starpu_data_access_mode mode, const char *sync_name);
 
 #endif // __IMPLICIT_DATA_DEPS_H__
 

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

@@ -594,7 +594,7 @@ static void _starpu_data_unregister(starpu_data_handle_t handle, unsigned cohere
 		STARPU_ASSERT_MSG(_starpu_worker_may_perform_blocking_calls(), "starpu_data_unregister must not be called from a task or callback, perhaps you can use starpu_data_unregister_submit instead");
 
 		/* If sequential consistency is enabled, wait until data is available */
-		_starpu_data_wait_until_available(handle, STARPU_RW);
+		_starpu_data_wait_until_available(handle, STARPU_RW, "starpu_data_unregister");
 	}
 
 	if (coherent && !nowait)