Ignore:
Timestamp:
07/17/17 17:50:14 (4 years ago)
Author:
yushan
Message:

fix previous commit. One situation was not considered

File:
1 edited

Legend:

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

    r1209 r1218  
    521521    mpi_size = comm.ep_comm_ptr->size_rank_info[2].second; 
    522522     
     523    if(ep_size == mpi_size)  // needed by servers 
     524      return ::MPI_Allgatherv(sendbuf, sendcount, static_cast< ::MPI_Datatype>(datatype), recvbuf, recvcounts, displs, 
     525                              static_cast< ::MPI_Datatype>(datatype), static_cast< ::MPI_Comm>(comm.mpi_comm)); 
    523526 
    524527    int recv_plus_displs[ep_size]; 
    525528    for(int i=0; i<ep_size; i++) recv_plus_displs[i] = recvcounts[i] + displs[i]; 
     529 
    526530 
    527531    for(int j=0; j<mpi_size; j++) 
     
    530534         recv_plus_displs[j*num_ep + num_ep -1] < displs[j*num_ep + num_ep -2])   
    531535      {   
    532         //printf("proc %d/%d Call special implementation of mpi_allgatherv.\n", ep_rank, ep_size); 
     536        printf("proc %d/%d Call special implementation of mpi_allgatherv.\n", ep_rank, ep_size); 
     537        for(int k=0; k<ep_size; k++) 
     538          printf("recv_plus_displs[%d] = %d\t displs[%d] = %d\n", k, recv_plus_displs[k], k, displs[k]); 
     539 
    533540        return MPI_Allgatherv_special(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm); 
    534541      } 
     
    539546           recv_plus_displs[j*num_ep+i] < displs[j*num_ep+i-1]) 
    540547        { 
    541           //printf("proc %d/%d Call special implementation of mpi_allgatherv.\n", ep_rank, ep_size); 
     548          printf("proc %d/%d Call special implementation of mpi_allgatherv.\n", ep_rank, ep_size); 
    542549          return MPI_Allgatherv_special(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm); 
    543550        } 
Note: See TracChangeset for help on using the changeset viewer.