Feature #341

Call MPI_Testany from time to time to improve performance

Added by Moritz Hanke about 2 years ago.

Status:New Start date:08/25/2017
Priority:Normal Due date:
Assignee:- % Done:


Target version:-


While doing some tests with YAC, I noticed that: when setting up a list of MPI_Isends, the performance improved, if from time to time MPI_Testany is called (MPI_Testsome did produce better results).

We should check whether YAXT could also benefit from this.

The following is a pseudo code showing the idea, which is based an the Routine psmile_bsend written by Hubert Ritzdorf for OASIS4.

int num_open_requests = 0
MPI_Requests requests[total_num_send_recv_msgs]
for all send/recv msgs
  MPI_Request * request = &requests[num_open_requests++]
  set up MPI_Isend/MPI_Irecv
  int flag = 1, idx
  while (flag && (num_open_requests >= 64))
    MPI_Testany(num_open_requests, requests, &idx, &flag, MPI_STATUS_IGNORE)
    if (flag && (idx != MPI_UNDEFINED))
      requests[idx] = requests[--num_open_requests]
MPI_Waitall(num_open_requests, requests, MPI_STATUSES_IGNORE)

Also available in: Atom PDF