A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
protect MPI_Test, Iprobe and Probe the same way
[simgrid.git]
/
src
/
smpi
/
bindings
/
smpi_pmpi_request.cpp
diff --git
a/src/smpi/bindings/smpi_pmpi_request.cpp
b/src/smpi/bindings/smpi_pmpi_request.cpp
index
4e98afb
..
004d156
100644
(file)
--- a/
src/smpi/bindings/smpi_pmpi_request.cpp
+++ b/
src/smpi/bindings/smpi_pmpi_request.cpp
@@
-511,8
+511,10
@@
int PMPI_Test(MPI_Request * request, int *flag, MPI_Status * status)
if (request == nullptr || flag == nullptr) {
retval = MPI_ERR_ARG;
} else if (*request == MPI_REQUEST_NULL) {
if (request == nullptr || flag == nullptr) {
retval = MPI_ERR_ARG;
} else if (*request == MPI_REQUEST_NULL) {
- *flag= true;
- simgrid::smpi::Status::empty(status);
+ if (status != MPI_STATUS_IGNORE){
+ *flag= true;
+ simgrid::smpi::Status::empty(status);
+ }
retval = MPI_SUCCESS;
} else {
int my_proc_id = ((*request)->comm() != MPI_COMM_NULL) ? simgrid::s4u::this_actor::get_pid() : -1;
retval = MPI_SUCCESS;
} else {
int my_proc_id = ((*request)->comm() != MPI_COMM_NULL) ? simgrid::s4u::this_actor::get_pid() : -1;
@@
-567,8
+569,10
@@
int PMPI_Probe(int source, int tag, MPI_Comm comm, MPI_Status* status) {
} else if (comm == MPI_COMM_NULL) {
retval = MPI_ERR_COMM;
} else if (source == MPI_PROC_NULL) {
} else if (comm == MPI_COMM_NULL) {
retval = MPI_ERR_COMM;
} else if (source == MPI_PROC_NULL) {
- simgrid::smpi::Status::empty(status);
- status->MPI_SOURCE = MPI_PROC_NULL;
+ if (status != MPI_STATUS_IGNORE){
+ simgrid::smpi::Status::empty(status);
+ status->MPI_SOURCE = MPI_PROC_NULL;
+ }
retval = MPI_SUCCESS;
} else {
simgrid::smpi::Request::probe(source, tag, comm, status);
retval = MPI_SUCCESS;
} else {
simgrid::smpi::Request::probe(source, tag, comm, status);
@@
-588,8
+592,10
@@
int PMPI_Iprobe(int source, int tag, MPI_Comm comm, int* flag, MPI_Status* statu
retval = MPI_ERR_COMM;
} else if (source == MPI_PROC_NULL) {
*flag=true;
retval = MPI_ERR_COMM;
} else if (source == MPI_PROC_NULL) {
*flag=true;
- simgrid::smpi::Status::empty(status);
- status->MPI_SOURCE = MPI_PROC_NULL;
+ if (status != MPI_STATUS_IGNORE){
+ simgrid::smpi::Status::empty(status);
+ status->MPI_SOURCE = MPI_PROC_NULL;
+ }
retval = MPI_SUCCESS;
} else {
simgrid::smpi::Request::iprobe(source, tag, comm, flag, status);
retval = MPI_SUCCESS;
} else {
simgrid::smpi::Request::iprobe(source, tag, comm, flag, status);