From: degomme Date: Thu, 28 Mar 2019 22:01:21 +0000 (+0100) Subject: activate a test to improve coverage a bit X-Git-Tag: v3_22~23 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/c9943e3f2291c2815801df17d4641eb89a52fb83?ds=sidebyside activate a test to improve coverage a bit --- diff --git a/src/smpi/bindings/smpi_pmpi_request.cpp b/src/smpi/bindings/smpi_pmpi_request.cpp index ff6c1c6943..790d371190 100644 --- a/src/smpi/bindings/smpi_pmpi_request.cpp +++ b/src/smpi/bindings/smpi_pmpi_request.cpp @@ -816,6 +816,8 @@ int PMPI_Grequest_complete( MPI_Request request){ int PMPI_Request_get_status( MPI_Request request, int *flag, MPI_Status *status){ if(request==MPI_REQUEST_NULL){ + *flag=1; + simgrid::smpi::Status::empty(status); return MPI_ERR_REQUEST; } else if (flag==NULL || status ==NULL){ return MPI_ERR_ARG; diff --git a/src/smpi/mpi/smpi_request.cpp b/src/smpi/mpi/smpi_request.cpp index 451a57c489..30c21a461e 100644 --- a/src/smpi/mpi/smpi_request.cpp +++ b/src/smpi/mpi/smpi_request.cpp @@ -805,8 +805,6 @@ void Request::finish_wait(MPI_Request* request, MPI_Status * status) status->MPI_ERROR = req->truncated_ != 0 ? MPI_ERR_TRUNCATE : MPI_SUCCESS; // this handles the case were size in receive differs from size in send status->count = req->real_size_; -// int flag; -// Request::get_status(req,&flag,status); } req->print_request("Finishing"); @@ -1095,7 +1093,7 @@ int Request::get_status(MPI_Request req, int* flag, MPI_Status * status){ if(req != MPI_REQUEST_NULL && req->action_ != nullptr) { req->iprobe(req->src_, req->tag_, req->comm_, flag, status); - if(flag) + if(*flag) return MPI_SUCCESS; } if (req != MPI_REQUEST_NULL && @@ -1106,7 +1104,8 @@ int Request::get_status(MPI_Request req, int* flag, MPI_Status * status){ } *flag=1; - if(status != MPI_STATUS_IGNORE) { + if(req != MPI_REQUEST_NULL && + status != MPI_STATUS_IGNORE) { int src = req->src_ == MPI_ANY_SOURCE ? req->real_src_ : req->src_; status->MPI_SOURCE = req->comm_->group()->rank(src); status->MPI_TAG = req->tag_ == MPI_ANY_TAG ? req->real_tag_ : req->tag_; diff --git a/teshsuite/smpi/mpich3-test/pt2pt/CMakeLists.txt b/teshsuite/smpi/mpich3-test/pt2pt/CMakeLists.txt index 6fef6962b0..50ad8f502c 100644 --- a/teshsuite/smpi/mpich3-test/pt2pt/CMakeLists.txt +++ b/teshsuite/smpi/mpich3-test/pt2pt/CMakeLists.txt @@ -10,9 +10,9 @@ if(enable_smpi AND enable_smpi_MPICH3_testsuite) include_directories("${CMAKE_CURRENT_SOURCE_DIR}/../include/") foreach(file anyall bottom eagerdt huge_anysrc huge_underflow inactivereq isendself isendirecv isendselfprobe issendselfcancel cancelanysrc pingping probenull - dtype_send greq1 probe-unexp sendall sendflood sendrecv1 sendrecv2 sendrecv3 waitany-null waittestnull many_isend manylmt recv_any scancel scancel2 rcancel) + dtype_send greq1 probe-unexp rqstatus sendall sendflood sendrecv1 sendrecv2 sendrecv3 waitany-null waittestnull many_isend manylmt recv_any scancel scancel2 rcancel) # not compiled files: big_count_status bsend1 bsend2 bsend3 bsend4 bsend5 bsendalign bsendfrag bsendpending mprobe - # cancelrecv icsend large_message pscancel rqfreeb rqstatus sendself scancel_unmatch + # cancelrecv icsend large_message pscancel rqfreeb sendself scancel_unmatch add_executable(${file} EXCLUDE_FROM_ALL ${file}.c) add_dependencies(tests ${file}) target_link_libraries(${file} simgrid mtest_c) diff --git a/teshsuite/smpi/mpich3-test/pt2pt/testlist b/teshsuite/smpi/mpich3-test/pt2pt/testlist index 030f2ec3e0..7f151b5278 100644 --- a/teshsuite/smpi/mpich3-test/pt2pt/testlist +++ b/teshsuite/smpi/mpich3-test/pt2pt/testlist @@ -24,8 +24,7 @@ isendirecv 10 #bsendfrag 2 #needs MPI_Intercomm_create #icsend 4 -#needs MPI_Request_get_status -#rqstatus 2 +rqstatus 2 #needs MPI_Pack, MPI_Buffer_attach, MPI_Buffer_detach, MPI_Irsend, MPI_Ibsend #rqfreeb 4 #needs MPI_Grequest_start MPI_Grequest_complete