Ignore:
Timestamp:
06/05/18 19:14:40 (3 years ago)
Author:
yushan
Message:

Test_client 6*8 clients 2 servers OK. TO DO : intercomm->intracomm, comm_free_intercomm

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/branch_openmp/extern/ep_dev/ep_wait.cpp

    r1503 r1522  
    2525    if((*request)->type !=1 && (*request)->type !=2 && (*request)->type !=3)  
    2626    { 
    27       printf("Error in request type\n"); 
     27      printf("MPI_Wait : Error in request type\n"); 
    2828  
    2929      exit(1); 
     
    3232    while((*request)->type == 2) Request_Check(); 
    3333     
    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); 
    3537 
    36      
     38    status->mpi_status = new ::MPI_Status(mpi_status); 
    3739    status->ep_src = (*request)->ep_src; 
    3840    status->ep_tag = (*request)->ep_tag; 
     
    4244 
    4345    memcheck("delete "<< (*request)->mpi_request << " : in ep_lib::MPI_Wait, delete (*request)->mpi_request"); 
     46 
    4447    delete (*request)->mpi_request; 
    45     Request_Check(); 
    46  
    47     return MPI_SUCCESS; 
     48    delete *request; 
     49    *request=0; 
     50     
     51    return Request_Check(); 
    4852 
    4953  }   /*end of mpi_wait*/ 
     
    8690    for(int i=0; i<count; i++) 
    8791    { 
    88       array_of_statuses[i].mpi_status = &mpi_status[i]; 
     92      array_of_statuses[i].mpi_status = new ::MPI_Status(mpi_status[i]); 
    8993      array_of_statuses[i].ep_src = array_of_requests[i]->ep_src; 
    9094      array_of_statuses[i].ep_tag = array_of_requests[i]->ep_tag; 
    9195      array_of_statuses[i].ep_datatype = array_of_requests[i]->ep_datatype; 
     96       
    9297      array_of_requests[i]->state = 2; 
     98       
    9399      memcheck("delete "<< array_of_requests[i]->mpi_request <<" : in ep_lib::MPI_Waitall, array_of_requests["<<i<<"]->mpi_request"); 
    94100      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; 
    100103    } 
    101104 
     
    103106    delete[] mpi_status; 
    104107     
    105     Request_Check(); 
    106      
    107      
    108     return MPI_SUCCESS; 
     108    return Request_Check(); 
    109109  }  /* end of mpi_waitall*/ 
    110110 
Note: See TracChangeset for help on using the changeset viewer.