Ignore:
Timestamp:
06/08/17 17:31:50 (7 years ago)
Author:
yushan
Message:

Bug fixed in MPI_(All)Gatherv with displs

File:
1 edited

Legend:

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

    r1151 r1164  
    355355    void *local_gather_recvbuf; 
    356356    void *master_recvbuf; 
    357     if(ep_rank_loc == 0 && mpi_rank == root_mpi_rank && root_ep_loc != 0) master_recvbuf = new void*[sizeof(recvbuf)]; 
     357    if(ep_rank_loc == 0 && mpi_rank == root_mpi_rank && root_ep_loc != 0)  
     358    { 
     359      master_recvbuf = new void*[datasize*ep_size*count]; 
     360    } 
    358361 
    359362    if(ep_rank_loc==0) 
     
    404407    { 
    405408      innode_memcpy(0, master_recvbuf, root_ep_loc, recvbuf, count*ep_size, datatype, comm); 
    406       if(ep_rank_loc == 0 ) delete[] master_recvbuf; 
    407409    } 
    408410 
     
    411413    if(ep_rank_loc==0) 
    412414    { 
    413  
    414415      if(datatype == MPI_INT) 
    415416      { 
     
    436437        delete[] static_cast<unsigned long*>(local_gather_recvbuf); 
    437438      } 
    438     } 
    439  
    440  
     439       
     440      if(root_ep_loc != 0 && mpi_rank == root_mpi_rank) delete[] master_recvbuf; 
     441    } 
    441442  } 
    442443 
Note: See TracChangeset for help on using the changeset viewer.