Skip to content
Snippets Groups Projects
Commit 85e75e83 authored by Peter W. Draper's avatar Peter W. Draper
Browse files

Helps if we have messages to receive

parent 1f6aa199
No related branches found
No related tags found
2 merge requests!11Draft: Fast one-sided MPI version,!8Draft: RDMA version with wrapped infinity calls
......@@ -171,6 +171,9 @@ static void *recv_thread(void *arg) {
ticks lmint = INT_MAX;
ticks lmaxt = 0;
/* No. of receives to process. */
todo_recv = nr_recv;
/* We loop while new requests are being send and we still have messages
* to receive. */
while (todo_recv > 0) {
......@@ -180,11 +183,11 @@ static void *recv_thread(void *arg) {
if (log != NULL && !log->done) {
ticks tics = getticks();
MPI_Win_lock(MPI_LOCK_SHARED, log->otherrank, 0,
MPI_Win_lock(MPI_LOCK_EXCLUSIVE, log->otherrank, 0,
mpi_window[log->subtype]);
int arrived = 0;
message("Checking at %zd", log->offset);
//message("Checking at %zd", log->offset);
if (mpi_ptr[log->subtype][log->size] == DONE) arrived = 1;
// XXX match this to the expected receive...
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment