Is there a timeout for mecanism in MPI?

All this name. My team and I are currently working on a project, and we use MPI. In one place, we search for MPI_send for a resource with a timeout. If the resource is available, we return 1, and if not, and the timeout ends, we return 0. We tried to use signals like SIGALRM, but this does not work, because each new request cancels the old ones, setting a new alarm.

Thanks for your reply!

+5
source share
2 answers

You should investigate non-blocking point-to-point communication primitives such as MPI_Isend, MPI_Irecvand MPI_Iprobe. Then you can implement the timeout yourself and use MPI_Cancelif you want.

+7
source

There is no standard way to accomplish this.

Implementing a send / recv pair with non-blocking calls (e.g. MPI_Isend, MPI_Irecv) and using MPI_Test and MPI_Cancel is one possible solution.

Depending on the nature of the nature of the resource and the number of times in the program this functionality is required, you can also consider implementing MPI_ISend as an "ongoing request" object. There is additional information here: Permanent communication .

, , , . , MPI_ *. , MPI_Send/MPI_Recv.

+2

All Articles