瀏覽代碼

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

Nathalie Furmento 11 年之前
父節點
當前提交
19880b9f8e
共有 1 個文件被更改,包括 7 次插入0 次删除
  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();
 	_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_irecv_common(data_handle, source, mpi_tag, comm, 1, callback, arg, sequential_consistency, 0, 0);
 
 
 	_STARPU_MPI_LOG_OUT();
 	_STARPU_MPI_LOG_OUT();