Ignore:
Timestamp:
06/08/18 19:34:51 (3 years ago)
Author:
yushan
Message:

save dev

File:
1 edited

Legend:

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

    r1520 r1533  
    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; 
    4548    delete *request; 
     49    *request=0; 
    4650     
    47  
    4851    return Request_Check(); 
    4952 
     
    8790    for(int i=0; i<count; i++) 
    8891    { 
    89       array_of_statuses[i].mpi_status = &mpi_status[i]; 
     92      array_of_statuses[i].mpi_status = new ::MPI_Status(mpi_status[i]); 
    9093      array_of_statuses[i].ep_src = array_of_requests[i]->ep_src; 
    9194      array_of_statuses[i].ep_tag = array_of_requests[i]->ep_tag; 
     
    97100      delete array_of_requests[i]->mpi_request; 
    98101      delete array_of_requests[i]; 
     102      array_of_requests[i] = 0; 
    99103    } 
    100104 
Note: See TracChangeset for help on using the changeset viewer.