From 354cf81777a7a6cef7fd34437e049709dbbeb14b Mon Sep 17 00:00:00 2001 From: jpekkila Date: Mon, 20 Jan 2020 19:15:20 +0200 Subject: [PATCH] MPI_Request was saved to address pointing to local memory, fixed --- src/core/device.cc | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/core/device.cc b/src/core/device.cc index 88bee2e..8723af6 100644 --- a/src/core/device.cc +++ b/src/core/device.cc @@ -1283,11 +1283,8 @@ acTransferCommData(const Device device, // PackedData dst = data->dsts_host[b_idx]; const int3 pid3d = getPid3D(pid, decomp); - MPI_Request recv_req; MPI_Irecv(dst.data, count, datatype, getPid(pid3d - neighbor, decomp), - b_idx, MPI_COMM_WORLD, &recv_req); - - data->recv_reqs[b_idx] = recv_req; + b_idx, MPI_COMM_WORLD, &data->recv_reqs[b_idx]); } } } @@ -1321,13 +1318,10 @@ acTransferCommData(const Device device, // // PackedData dst = data->dsts_host[b_idx]; const int3 pid3d = getPid3D(pid, decomp); - MPI_Request send_req; cudaStreamSynchronize(data->streams[a_idx]); MPI_Isend(src.data, count, datatype, getPid(pid3d + neighbor, decomp), - b_idx, MPI_COMM_WORLD, &send_req); - - data->send_reqs[b_idx] = send_req; + b_idx, MPI_COMM_WORLD, &data->send_reqs[b_idx]); } } }