|
@@ -118,7 +118,7 @@ void _starpu_mpi_exchange_data_before_execution(starpu_data_handle_t data, enum
|
|
{
|
|
{
|
|
/* The node is going to execute the codelet, but it does not own the data, it needs to receive the data from the owner node */
|
|
/* The node is going to execute the codelet, but it does not own the data, it needs to receive the data from the owner node */
|
|
void *already_received = _starpu_mpi_cache_received_data_set(data, mpi_rank);
|
|
void *already_received = _starpu_mpi_cache_received_data_set(data, mpi_rank);
|
|
- if (already_received == NULL || (mode & STARPU_W))
|
|
|
|
|
|
+ if (already_received == NULL)
|
|
{
|
|
{
|
|
_STARPU_MPI_DEBUG(1, "Receiving data %p from %d\n", data, mpi_rank);
|
|
_STARPU_MPI_DEBUG(1, "Receiving data %p from %d\n", data, mpi_rank);
|
|
starpu_mpi_irecv_detached(data, mpi_rank, data_tag, comm, NULL, NULL);
|
|
starpu_mpi_irecv_detached(data, mpi_rank, data_tag, comm, NULL, NULL);
|
|
@@ -130,7 +130,7 @@ void _starpu_mpi_exchange_data_before_execution(starpu_data_handle_t data, enum
|
|
{
|
|
{
|
|
/* The node owns the data, but another node is going to execute the codelet, the node needs to send the data to the executee node. */
|
|
/* The node owns the data, but another node is going to execute the codelet, the node needs to send the data to the executee node. */
|
|
void *already_sent = _starpu_mpi_cache_sent_data_set(data, xrank);
|
|
void *already_sent = _starpu_mpi_cache_sent_data_set(data, xrank);
|
|
- if (already_sent == NULL || (mode & STARPU_W))
|
|
|
|
|
|
+ if (already_sent == NULL)
|
|
{
|
|
{
|
|
_STARPU_MPI_DEBUG(1, "Sending data %p to %d\n", data, xrank);
|
|
_STARPU_MPI_DEBUG(1, "Sending data %p to %d\n", data, xrank);
|
|
_SEND_DATA(data, mode, xrank, data_tag, comm, NULL, NULL);
|
|
_SEND_DATA(data, mode, xrank, data_tag, comm, NULL, NULL);
|