Ignore:
Timestamp:
05/31/17 10:51:06 (7 years ago)
Author:
yushan
Message:

bug fixed in mpi_comm_split. Key needs to be specifify.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/branch_yushan_merged/extern/src_ep_dev/ep_test.cpp

    r1134 r1149  
    1515namespace ep_lib { 
    1616 
    17         int MPI_Test(MPI_Request *request, int *flag, MPI_Status *status) 
    18         { 
    19                 Debug("MPI_Test with EP"); 
     17  int MPI_Test(MPI_Request *request, int *flag, MPI_Status *status) 
     18  { 
     19    Debug("MPI_Test with EP"); 
    2020 
    2121    *flag = false; 
     
    5656    if(request->type == 3)  // imrecv 
    5757    { 
    58       ::MPI_Request mpi_request = static_cast< ::MPI_Request >(request->mpi_request); 
     58      ::MPI_Request *mpi_request = static_cast< ::MPI_Request* >(&(request->mpi_request)); 
    5959      ::MPI_Status mpi_status; 
    60       ::MPI_Test(&mpi_request, flag, &mpi_status); 
     60       
     61      ::MPI_Errhandler_set(MPI_COMM_WORLD_STD, MPI_ERRORS_RETURN); 
     62      int error_code = ::MPI_Test(mpi_request, flag, &mpi_status); 
     63      if (error_code != MPI_SUCCESS) { 
     64       
     65         char error_string[BUFSIZ]; 
     66         int length_of_error_string, error_class; 
     67       
     68         ::MPI_Error_class(error_code, &error_class); 
     69         ::MPI_Error_string(error_class, error_string, &length_of_error_string); 
     70         printf("%s\n", error_string); 
     71      } 
     72       
    6173      if(*flag) 
    6274      { 
     
    7991    } 
    8092                 
    81         } 
     93  } 
    8294 
    8395 
    84         int MPI_Testall(int count, MPI_Request *array_of_requests, int *flag, MPI_Status *array_of_statuses) 
    85         { 
    86           Debug("MPI_Testall with EP"); 
     96  int MPI_Testall(int count, MPI_Request *array_of_requests, int *flag, MPI_Status *array_of_statuses) 
     97  { 
     98    Debug("MPI_Testall with EP"); 
    8799    *flag = true; 
    88100    int i=0; 
     
    92104      i++; 
    93105    } 
    94         } 
     106  } 
    95107 
    96108 
Note: See TracChangeset for help on using the changeset viewer.