Ignore:
Timestamp:
06/08/18 15:59:53 (6 years ago)
Author:
yushan
Message:

save dev

File:
1 edited

Legend:

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

    r1525 r1527  
    99  int MPI_Barrier(MPI_Comm comm) 
    1010  { 
    11     if(comm->is_intercomm) return MPI_Barrier_intercomm(comm); 
    1211 
    1312    if(comm->is_ep)  
    1413    { 
    15       return MPI_Barrier_intracomm(comm); 
     14      return MPI_Barrier_endpoint(comm); 
    1615    } 
    1716 
     
    2120  } 
    2221 
    23   int MPI_Barrier_intracomm(MPI_Comm comm) 
     22  int MPI_Barrier_endpoint(MPI_Comm comm) 
    2423  { 
    2524    int ep_rank_loc = comm->ep_comm_ptr->size_rank_info[1].first; 
     
    3534 
    3635    MPI_Barrier_local(comm); 
    37  
    38     return 0; 
    3936  } 
    4037 
    41   int MPI_Barrier2(MPI_Comm comm) 
    42   { 
    43     int ep_rank_loc = comm->ep_comm_ptr->size_rank_info[1].first; 
    44  
    45     MPI_Barrier_local(comm); 
    46  
    47     if(ep_rank_loc == 0) 
    48     { 
    49       ::MPI_Comm mpi_comm = to_mpi_comm(comm->mpi_comm); 
    50  
    51       ::MPI_Barrier(mpi_comm); 
    52     } 
    53  
    54     MPI_Barrier_local(comm); 
    55  
    56     return 0; 
    57   } 
    58  
    59   int MPI_Barrier_intercomm(MPI_Comm comm) 
    60   { 
    61     MPI_Barrier_local(comm); 
    62  
    63     if(comm->ep_comm_ptr->intercomm->size_rank_info[1].first == 0) 
    64       ::MPI_Barrier(to_mpi_comm(comm->ep_comm_ptr->intercomm->mpi_inter_comm)); 
    65  
    66     MPI_Barrier_local(comm); 
    67   } 
    6838 
    6939  int MPI_Barrier_mpi(MPI_Comm comm) 
Note: See TracChangeset for help on using the changeset viewer.