Antoine JEGO 4 lat temu
rodzic
commit
b51572239d
2 zmienionych plików z 3 dodań i 2 usunięć
  1. 1 0
      mpi/src/starpu_mpi.c
  2. 2 2
      mpi/src/starpu_mpi_task_insert.c

+ 1 - 0
mpi/src/starpu_mpi.c

@@ -394,6 +394,7 @@ void _starpu_mpi_data_clear(starpu_data_handle_t data_handle)
 	_starpu_mpi_cache_data_clear(data_handle);
 	_starpu_spin_destroy(&data->coop_lock);
 	free(data->redux_map);
+	data->redux_map = NULL;
 	free(data);
 }
 

+ 2 - 2
mpi/src/starpu_mpi_task_insert.c

@@ -618,7 +618,7 @@ int _starpu_mpi_task_build_v(MPI_Comm comm, struct starpu_codelet *codelet, stru
 
 int _starpu_mpi_task_postbuild_v(MPI_Comm comm, int xrank, int do_execute, struct starpu_data_descr *descrs, int nb_data, int prio)
 {
-	int me, i, rrank;
+	int me, i;
 
 	_STARPU_TRACE_TASK_MPI_POST_START();
 	starpu_mpi_comm_rank(comm, &me);
@@ -628,7 +628,7 @@ int _starpu_mpi_task_postbuild_v(MPI_Comm comm, int xrank, int do_execute, struc
 		if ((descrs[i].mode & STARPU_REDUX || descrs[i].mode & STARPU_MPI_REDUX) && descrs[i].handle)
 		{
 			struct _starpu_mpi_data *mpi_data = (struct _starpu_mpi_data *) descrs[i].handle->mpi_data;
-			rrank = starpu_mpi_data_get_rank(descrs[i].handle);
+			int rrank = starpu_mpi_data_get_rank(descrs[i].handle);
 			int size;
 			starpu_mpi_comm_size(comm, &size);
 			if (mpi_data->redux_map == NULL)