Nathalie Furmento 8 роки тому
батько
коміт
626fb31c65
2 змінених файлів з 4 додано та 3 видалено
  1. 3 1
      mpi/src/starpu_mpi.c
  2. 1 2
      mpi/src/starpu_mpi_comm.c

+ 3 - 1
mpi/src/starpu_mpi.c

@@ -1371,9 +1371,9 @@ static void *_starpu_mpi_progress_thread_func(void *arg)
 		}
 
 		/* get one request */
-		struct _starpu_mpi_req *req;
 		while (!_starpu_mpi_req_list_empty(ready_requests))
 		{
+			struct _starpu_mpi_req *req;
 			req = _starpu_mpi_req_list_pop_back(ready_requests);
 
 			/* handling a request is likely to block for a while
@@ -1688,7 +1688,9 @@ int starpu_mpi_initialize_extended(int *rank, int *world_size)
 
 int starpu_mpi_shutdown(void)
 {
+#ifndef STARPU_SIMGRID
 	void *value;
+#endif
 	int rank, world_size;
 
 	/* We need to get the rank before calling MPI_Finalize to pass to _starpu_mpi_comm_amounts_display() */

+ 1 - 2
mpi/src/starpu_mpi_comm.c

@@ -134,12 +134,11 @@ int _starpu_mpi_comm_test_recv(MPI_Status *status, struct _starpu_mpi_envelope *
 	STARPU_PTHREAD_MUTEX_LOCK(&_starpu_mpi_comms_mutex);
 	while (1)
 	{
-		int flag, res;
-
 		struct _starpu_mpi_comm *_comm = _starpu_mpi_comms[i]; // get the ith _comm;
 
 		if (_comm->posted)
 		{
+			int flag, res;
 			/* test whether an envelope has arrived. */
 #ifdef STARPU_SIMGRID
 			MSG_process_sleep(0.000001);