소스 검색

simgrid: moving mpi thread sleep to a better place and letting the mutex for the others

Luka Stanisic 8 년 전
부모
커밋
f0e20ee3f2
1개의 변경된 파일5개의 추가작업 그리고 3개의 파일을 삭제
  1. 5 3
      mpi/src/starpu_mpi.c

+ 5 - 3
mpi/src/starpu_mpi.c

@@ -1355,9 +1355,6 @@ static void *_starpu_mpi_progress_thread_func(void *arg)
 		STARPU_PTHREAD_MUTEX_UNLOCK(&detached_requests_mutex);
 #endif /* STARPU_MPI_ACTIVITY */
 
-#ifdef STARPU_SIMGRID
-		MSG_process_sleep(0.000010);
-#endif
 		if (block)
 		{
 			_STARPU_MPI_DEBUG(3, "NO MORE REQUESTS TO HANDLE\n");
@@ -1508,6 +1505,11 @@ static void *_starpu_mpi_progress_thread_func(void *arg)
 				//_STARPU_MPI_DEBUG(4, "Nothing received, continue ..\n");
 			}
 		}
+#ifdef STARPU_SIMGRID
+		STARPU_PTHREAD_MUTEX_UNLOCK(&mutex);
+		MSG_process_sleep(0.000010);
+		STARPU_PTHREAD_MUTEX_LOCK(&mutex);
+#endif
 	}
 
 	if (envelope_request_submitted)