IPPL (Independent Parallel Particle Layer)
IPPL
Loading...
Searching...
No Matches
Request.cpp
Go to the documentation of this file.
1//
2// Class Request
3// A communication request handle for non-blocking communication.
4//
6
7namespace ippl {
8 namespace mpi {
9
11 if (request_m != MPI_REQUEST_NULL) {
12 this->free();
13 }
14 }
15
17 int flag = 0;
18
19 Status status;
20
21 // MPI_STATUS_IGNORE
22 MPI_Request_get_status(request_m, &flag, status);
23
24 if (flag != 0) {
25 // valid Status instance
26 MPI_Test(&request_m, &flag, status);
27 } else {
28 // Although we free the request, any ongoing communication
29 // associated with this request is allowed to complete.
30 this->free();
31 }
32
33 return (flag != 0);
34 }
35 } // namespace mpi
36} // namespace ippl
Definition Archive.h:20
MPI_Request request_m
Definition Request.h:35