Ignore:
Timestamp:
06/12/18 11:54:13 (6 years ago)
Author:
yushan
Message:

update intercomm_merge and remove redundant files

File:
1 edited

Legend:

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

    r1520 r1539  
    3535      for(int i=0; i<num_ep; i++) 
    3636        memcpy(recvbuf + datasize * i * count, comm->my_buffer->void_buffer[i], datasize * count); 
    37  
    38       //printf("local_recvbuf = %d %d \n", static_cast<int*>(recvbuf)[0], static_cast<int*>(recvbuf)[1] ); 
    3937    } 
    4038 
     
    4442  int MPI_Gather(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm) 
    4543  { 
    46     if(!comm->is_ep) 
    47     { 
    48       return ::MPI_Gather(const_cast<void*>(sendbuf), sendcount, to_mpi_type(sendtype), recvbuf, recvcount, to_mpi_type(recvtype), 
    49                    root, to_mpi_comm(comm->mpi_comm)); 
    50     } 
     44    if(!comm->is_ep) return ::MPI_Gather(const_cast<void*>(sendbuf), sendcount, to_mpi_type(sendtype), recvbuf, recvcount, to_mpi_type(recvtype), 
     45                                         root, to_mpi_comm(comm->mpi_comm)); 
     46    if(comm->is_intercomm) return MPI_Gather_intercomm(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm); 
    5147 
    5248    assert(sendcount == recvcount && sendtype == recvtype); 
     
    10399    if(is_root) 
    104100    { 
    105       // printf("tmp_recvbuf = %d %d %d %d %d %d %d %d\n", static_cast<int*>(tmp_recvbuf)[0], static_cast<int*>(tmp_recvbuf)[1], 
    106       //                                                   static_cast<int*>(tmp_recvbuf)[2], static_cast<int*>(tmp_recvbuf)[3], 
    107       //                                                   static_cast<int*>(tmp_recvbuf)[4], static_cast<int*>(tmp_recvbuf)[5], 
    108       //                                                   static_cast<int*>(tmp_recvbuf)[6], static_cast<int*>(tmp_recvbuf)[7] ); 
    109  
    110101      int offset; 
    111102      for(int i=0; i<ep_size; i++) 
     
    128119  } 
    129120 
     121 
     122  int MPI_Gather_intercomm(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm) 
     123  { 
     124    printf("MPI_Gather_intercomm not yet implemented\n"); 
     125    MPI_Abort(comm, 0); 
     126  } 
    130127} 
Note: See TracChangeset for help on using the changeset viewer.