Browse Source

mpi/src/starpu_mpi.c: starpu_mpi_irecv_detached_sequential_consistency() checks if the data defines a tag

Nathalie Furmento 11 years ago
parent
commit
19880b9f8e
1 changed files with 7 additions and 0 deletions
  1. 7 0
      mpi/src/starpu_mpi.c

+ 7 - 0
mpi/src/starpu_mpi.c

@@ -547,6 +547,13 @@ int starpu_mpi_irecv_detached_sequential_consistency(starpu_data_handle_t data_h
 {
 	_STARPU_MPI_LOG_IN();
 
+	// We check if a tag is defined for the data handle, if not,
+	// we define the one given for the communication.
+	// A tag is necessary for the internal mpi engine.
+	int tag = starpu_data_get_tag(data_handle);
+	if (tag == -1)
+		starpu_data_set_tag(data_handle, mpi_tag);
+
 	_starpu_mpi_irecv_common(data_handle, source, mpi_tag, comm, 1, callback, arg, sequential_consistency, 0, 0);
 
 	_STARPU_MPI_LOG_OUT();