Ignore:
Timestamp:
05/28/18 09:54:32 (6 years ago)
Author:
yushan
Message:

save dev

File:
1 edited

Legend:

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

    r1381 r1500  
    2020  { 
    2121 
    22     if(!comm.is_ep && comm.mpi_comm) 
     22    if(!comm->is_ep && comm->mpi_comm) 
    2323    { 
    24       return ::MPI_Allgather(const_cast<void*>(sendbuf), sendcount, to_mpi_type(sendtype), recvbuf, recvcount, to_mpi_type(recvtype), to_mpi_comm(comm.mpi_comm)); 
     24      return ::MPI_Allgather(const_cast<void*>(sendbuf), sendcount, to_mpi_type(sendtype), recvbuf, recvcount, to_mpi_type(recvtype), to_mpi_comm(comm->mpi_comm)); 
    2525    } 
    2626 
     
    3737 
    3838 
    39     int ep_rank = comm.ep_comm_ptr->size_rank_info[0].first; 
    40     int ep_rank_loc = comm.ep_comm_ptr->size_rank_info[1].first; 
    41     int mpi_rank = comm.ep_comm_ptr->size_rank_info[2].first; 
    42     int ep_size = comm.ep_comm_ptr->size_rank_info[0].second; 
    43     int num_ep = comm.ep_comm_ptr->size_rank_info[1].second; 
    44     int mpi_size = comm.ep_comm_ptr->size_rank_info[2].second; 
     39    int ep_rank = comm->ep_comm_ptr->size_rank_info[0].first; 
     40    int ep_rank_loc = comm->ep_comm_ptr->size_rank_info[1].first; 
     41    int mpi_rank = comm->ep_comm_ptr->size_rank_info[2].first; 
     42    int ep_size = comm->ep_comm_ptr->size_rank_info[0].second; 
     43    int num_ep = comm->ep_comm_ptr->size_rank_info[1].second; 
     44    int mpi_size = comm->ep_comm_ptr->size_rank_info[2].second; 
    4545 
    4646    bool is_master = ep_rank_loc==0; 
     
    7070      int local_sendcount = num_ep * count; 
    7171 
    72       ::MPI_Allgather(&local_sendcount, 1, to_mpi_type(MPI_INT), mpi_recvcounts, 1, to_mpi_type(MPI_INT), to_mpi_comm(comm.mpi_comm)); 
     72      ::MPI_Allgather(&local_sendcount, 1, to_mpi_type(MPI_INT), mpi_recvcounts, 1, to_mpi_type(MPI_INT), to_mpi_comm(comm->mpi_comm)); 
    7373 
    7474      mpi_displs[0] = 0; 
     
    7979 
    8080     
    81       ::MPI_Allgatherv(local_recvbuf, num_ep * count, to_mpi_type(datatype), tmp_recvbuf, mpi_recvcounts, mpi_displs, to_mpi_type(datatype), to_mpi_comm(comm.mpi_comm)); 
     81      ::MPI_Allgatherv(local_recvbuf, num_ep * count, to_mpi_type(datatype), tmp_recvbuf, mpi_recvcounts, mpi_displs, to_mpi_type(datatype), to_mpi_comm(comm->mpi_comm)); 
    8282 
    8383 
     
    8686      for(int i=0; i<ep_size; i++) 
    8787      { 
    88         offset = mpi_displs[comm.rank_map->at(i).second] + comm.rank_map->at(i).first * sendcount;  
     88        offset = mpi_displs[comm->rank_map->at(i).second] + comm->rank_map->at(i).first * sendcount;  
    8989        memcpy(recvbuf + i*sendcount*datasize, tmp_recvbuf+offset*datasize, sendcount*datasize); 
    9090      } 
Note: See TracChangeset for help on using the changeset viewer.