Просмотр исходного кода

port r14751 from 1.1: Add barrier to make sure we synchronize caches even when the local node does not have any request (and thus we don't take any lock)

Samuel Thibault лет назад: 10
Родитель
Сommit
a7168c467b
2 измененных файлов с 2 добавлено и 0 удалено
  1. 1 0
      src/datawizard/coherency.h
  2. 1 0
      src/datawizard/data_request.c

+ 1 - 0
src/datawizard/coherency.h

@@ -51,6 +51,7 @@ struct _starpu_data_replicate {
 	/* describes the state of the local data in term of coherency */
 	enum _starpu_cache_state	state;
 
+	/* How many requests or tasks are currently working with this replicate */
 	int refcnt;
 
 	/* A buffer that is used for SCRATCH or reduction cannnot be used with

+ 1 - 0
src/datawizard/data_request.c

@@ -179,6 +179,7 @@ int _starpu_wait_data_request_completion(struct _starpu_data_request *r, unsigne
 
 	do
 	{
+		STARPU_SYNCHRONIZE();
 		STARPU_HG_DISABLE_CHECKING(r->completed);
 		completed = r->completed;
 		STARPU_HG_ENABLE_CHECKING(r->completed);