Changeset 1522 for XIOS/dev/branch_openmp/extern/ep_dev/ep_wait.cpp
- Timestamp:
- 06/05/18 19:14:40 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/branch_openmp/extern/ep_dev/ep_wait.cpp
r1503 r1522 25 25 if((*request)->type !=1 && (*request)->type !=2 && (*request)->type !=3) 26 26 { 27 printf(" Error in request type\n");27 printf("MPI_Wait : Error in request type\n"); 28 28 29 29 exit(1); … … 32 32 while((*request)->type == 2) Request_Check(); 33 33 34 ::MPI_Wait(to_mpi_request_ptr(*request), to_mpi_status_ptr(status)); 34 ::MPI_Status mpi_status; 35 36 ::MPI_Wait(to_mpi_request_ptr(*request), &mpi_status); 35 37 36 38 status->mpi_status = new ::MPI_Status(mpi_status); 37 39 status->ep_src = (*request)->ep_src; 38 40 status->ep_tag = (*request)->ep_tag; … … 42 44 43 45 memcheck("delete "<< (*request)->mpi_request << " : in ep_lib::MPI_Wait, delete (*request)->mpi_request"); 46 44 47 delete (*request)->mpi_request; 45 Request_Check(); 46 47 return MPI_SUCCESS; 48 delete *request; 49 *request=0; 50 51 return Request_Check(); 48 52 49 53 } /*end of mpi_wait*/ … … 86 90 for(int i=0; i<count; i++) 87 91 { 88 array_of_statuses[i].mpi_status = &mpi_status[i];92 array_of_statuses[i].mpi_status = new ::MPI_Status(mpi_status[i]); 89 93 array_of_statuses[i].ep_src = array_of_requests[i]->ep_src; 90 94 array_of_statuses[i].ep_tag = array_of_requests[i]->ep_tag; 91 95 array_of_statuses[i].ep_datatype = array_of_requests[i]->ep_datatype; 96 92 97 array_of_requests[i]->state = 2; 98 93 99 memcheck("delete "<< array_of_requests[i]->mpi_request <<" : in ep_lib::MPI_Waitall, array_of_requests["<<i<<"]->mpi_request"); 94 100 delete array_of_requests[i]->mpi_request; 95 if(array_of_requests[i]->type == 1) 96 { 97 memcheck("delete "<< array_of_requests[i] <<" : in ep_lib::MPI_Waitall, array_of_requests["<<i<<"]"); 98 delete array_of_requests[i]; 99 } 101 delete array_of_requests[i]; 102 array_of_requests[i] = 0; 100 103 } 101 104 … … 103 106 delete[] mpi_status; 104 107 105 Request_Check(); 106 107 108 return MPI_SUCCESS; 108 return Request_Check(); 109 109 } /* end of mpi_waitall*/ 110 110
Note: See TracChangeset
for help on using the changeset viewer.