瀏覽代碼

We need to record our ID in the trace before the main thread makes any MPI call

Samuel Thibault 7 年之前
父節點
當前提交
4173c73f06
共有 2 個文件被更改,包括 14 次插入22 次删除
  1. 7 11
      mpi/src/mpi/starpu_mpi_mpi.c
  2. 7 11
      mpi/src/nmad/starpu_mpi_nmad.c

+ 7 - 11
mpi/src/mpi/starpu_mpi_mpi.c

@@ -1270,23 +1270,19 @@ static void *_starpu_mpi_progress_thread_func(void *arg)
 	starpu_pthread_queue_register(&wait, &dontsleep);
 #endif
 
+#ifdef STARPU_USE_FXT
+	_starpu_fxt_wait_initialisation();
+	/* We need to record our ID in the trace before the main thread makes any MPI call */
+	_STARPU_MPI_TRACE_START(argc_argv->rank, argc_argv->world_size);
+	starpu_profiling_set_id(argc_argv->rank);
+#endif //STARPU_USE_FXT
+
 	/* notify the main thread that the progression thread is ready */
 	STARPU_PTHREAD_MUTEX_LOCK(&progress_mutex);
 	running = 1;
 	STARPU_PTHREAD_COND_SIGNAL(&progress_cond);
 	STARPU_PTHREAD_MUTEX_UNLOCK(&progress_mutex);
 
-#ifdef STARPU_USE_FXT
-	_starpu_fxt_wait_initialisation();
-#endif //STARPU_USE_FXT
-
-	{
-		_STARPU_MPI_TRACE_START(argc_argv->rank, argc_argv->world_size);
-#ifdef STARPU_USE_FXT
-		starpu_profiling_set_id(argc_argv->rank);
-#endif //STARPU_USE_FXT
-	}
-
 	_starpu_mpi_add_sync_point_in_fxt();
 	STARPU_PTHREAD_MUTEX_LOCK(&progress_mutex);
 

+ 7 - 11
mpi/src/nmad/starpu_mpi_nmad.c

@@ -615,23 +615,19 @@ static void *_starpu_mpi_progress_thread_func(void *arg)
 	_starpu_mpi_select_node_init();
 	_starpu_mpi_datatype_init();
 
+#ifdef STARPU_USE_FXT
+	_starpu_fxt_wait_initialisation();
+	/* We need to record our ID in the trace before the main thread makes any MPI call */
+	_STARPU_MPI_TRACE_START(argc_argv->rank, argc_argv->world_size);
+	starpu_profiling_set_id(argc_argv->rank);
+#endif //STARPU_USE_FXT
+
 	/* notify the main thread that the progression thread is ready */
 	STARPU_PTHREAD_MUTEX_LOCK(&progress_mutex);
 	running = 1;
 	STARPU_PTHREAD_COND_SIGNAL(&progress_cond);
 	STARPU_PTHREAD_MUTEX_UNLOCK(&progress_mutex);
 
-#ifdef STARPU_USE_FXT
-	_starpu_fxt_wait_initialisation();
-#endif //STARPU_USE_FXT
-
-	{
-		_STARPU_MPI_TRACE_START(argc_argv->rank, argc_argv->world_size);
-#ifdef STARPU_USE_FXT
-		starpu_profiling_set_id(argc_argv->rank);
-#endif //STARPU_USE_FXT
-	}
-
 	_starpu_mpi_add_sync_point_in_fxt();
 
 	while (1)