Changeset 1393


Ignore:
Timestamp:
01/10/18 15:23:37 (3 years ago)
Author:
yushan
Message:

dev EP-RMA : MPI_Tetch_and_op

Location:
XIOS/dev/branch_openmp/extern/ep_dev
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/branch_openmp/extern/ep_dev/ep_lib_win.hpp

    r1388 r1393  
    2525   
    2626  int MPI_Win_allocate (MPI_Aint size, int disp_unit, MPI_Info info, MPI_Comm comm, void *baseptr, MPI_Win *win); 
     27 
     28  int MPI_Fetch_and_op(const void *origin_addr, void *result_addr, MPI_Datatype datatype, int target_rank,  
     29                      MPI_Aint target_disp, MPI_Op op, MPI_Win win); 
    2730} 
    2831 
  • XIOS/dev/branch_openmp/extern/ep_dev/main.cpp

    r1388 r1393  
    637637  { 
    638638    printf("Proc %d is client\n", mpi_rank); 
    639     num_threads = 2+mpi_rank; 
     639    num_threads = 2;//+mpi_rank; 
    640640  } 
    641641  else 
     
    732732     
    733733    MPI_Win_fence(0, ep_win); 
     734     
     735    if(rank == 6) 
     736    { 
     737      MPI_Aint displs = 0; 
     738      MPI_Fetch_and_op(&local_buf, &result_buf, MPI_INT, size-1, displs, 
     739                       MPI_SUM, ep_win); 
     740    } 
     741 
     742    MPI_Win_fence(0, ep_win); 
    734743 
    735744    MPI_Win ep_win_allocated; 
Note: See TracChangeset for help on using the changeset viewer.