Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
activate a test to improve coverage a bit
authordegomme <adegomme@users.noreply.github.com>
Thu, 28 Mar 2019 22:01:21 +0000 (23:01 +0100)
committerdegomme <adegomme@users.noreply.github.com>
Fri, 29 Mar 2019 00:05:41 +0000 (01:05 +0100)
src/smpi/bindings/smpi_pmpi_request.cpp
src/smpi/mpi/smpi_request.cpp
teshsuite/smpi/mpich3-test/pt2pt/CMakeLists.txt
teshsuite/smpi/mpich3-test/pt2pt/testlist

index ff6c1c6..790d371 100644 (file)
@@ -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){
 
 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;
     return MPI_ERR_REQUEST;
   } else if (flag==NULL || status ==NULL){
     return MPI_ERR_ARG;
index 451a57c..30c21a4 100644 (file)
@@ -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_;
       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");
     }
 
     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(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 && 
       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;
   }
 
   *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_;
     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_;
index 6fef696..50ad8f5 100644 (file)
@@ -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
   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
     # 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)
     add_executable(${file} EXCLUDE_FROM_ALL ${file}.c)
     add_dependencies(tests ${file})
     target_link_libraries(${file} simgrid mtest_c)
index 030f2ec..7f151b5 100644 (file)
@@ -24,8 +24,7 @@ isendirecv 10
 #bsendfrag 2
 #needs MPI_Intercomm_create
 #icsend 4
 #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
 #needs MPI_Pack, MPI_Buffer_attach, MPI_Buffer_detach, MPI_Irsend, MPI_Ibsend
 #rqfreeb 4
 #needs MPI_Grequest_start MPI_Grequest_complete