diff options
author | Thomas Radke <tradke@aei.mpg.de> | 2005-05-12 16:18:00 +0000 |
---|---|---|
committer | Thomas Radke <tradke@aei.mpg.de> | 2005-05-12 16:18:00 +0000 |
commit | 7fe20050481f464482e8d8b1103c87fb6fa26469 (patch) | |
tree | a602e0b371c55320af2167e48c62309d6f9192e0 /Carpet/CarpetLib | |
parent | e9c884aff981ff8b3b2708959f04c7f465f06636 (diff) |
CarpetLib: bugfix when using collective commbuffers
Using ready mode sends in the collective buffers communication scheme was wrong
because it is not guaranteed that the corresponding receive operations have
been posted already on other processors at that point.
Now standard mode non-blocking sends, MPI_Isend(), are used (again).
darcs-hash:20050512161846-776a0-09b27a8a9928d6c45751634c4e8f6c3af9e2dbec.gz
Diffstat (limited to 'Carpet/CarpetLib')
-rw-r--r-- | Carpet/CarpetLib/src/commstate.cc | 2 | ||||
-rw-r--r-- | Carpet/CarpetLib/src/gdata.cc | 16 |
2 files changed, 9 insertions, 9 deletions
diff --git a/Carpet/CarpetLib/src/commstate.cc b/Carpet/CarpetLib/src/commstate.cc index 874a2a661..887a9bcd7 100644 --- a/Carpet/CarpetLib/src/commstate.cc +++ b/Carpet/CarpetLib/src/commstate.cc @@ -97,7 +97,7 @@ void comm_state::step () // The sizes of the collective communication buffers are known // so now allocate them. // The receive operations are also posted here already - // so that we can use ready mode sends (MPI_Irsend()) later. + // (a clever MPI layer may take advantage of such early posting). num_posted_recvs = num_completed_recvs = 0; for (size_t i = 0; i < collbufs.size(); i++) { diff --git a/Carpet/CarpetLib/src/gdata.cc b/Carpet/CarpetLib/src/gdata.cc index b83657fa1..7673eb2c0 100644 --- a/Carpet/CarpetLib/src/gdata.cc +++ b/Carpet/CarpetLib/src/gdata.cc @@ -426,10 +426,10 @@ void gdata::copy_into_sendbuffer (comm_state& state, // post the send if the buffer is full if (fillstate == state.collbufs[proc()].sendbufsize*state.vartypesize) { - MPI_Irsend (state.collbufs[proc()].sendbufbase, - state.collbufs[proc()].sendbufsize, - state.datatype, proc(), 0, dist::comm, - &state.srequests[proc()]); + MPI_Isend (state.collbufs[proc()].sendbufbase, + state.collbufs[proc()].sendbufsize, + state.datatype, proc(), 0, dist::comm, + &state.srequests[proc()]); } } } @@ -791,10 +791,10 @@ void gdata // post the send if the buffer is full if (fillstate == state.collbufs[proc()].sendbufsize*state.vartypesize) { - MPI_Irsend (state.collbufs[proc()].sendbufbase, - state.collbufs[proc()].sendbufsize, - state.datatype, proc(), 0, dist::comm, - &state.srequests[proc()]); + MPI_Isend (state.collbufs[proc()].sendbufbase, + state.collbufs[proc()].sendbufsize, + state.datatype, proc(), 0, dist::comm, + &state.srequests[proc()]); } } } |