Ignore:
Timestamp:
01/10/18 15:33:27 (4 years ago)
Author:
yushan
Message:

dev EP-RMA : MPI_Compare_and_swap

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

Legend:

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

    r1393 r1395  
    2828  int MPI_Fetch_and_op(const void *origin_addr, void *result_addr, MPI_Datatype datatype, int target_rank,  
    2929                      MPI_Aint target_disp, MPI_Op op, MPI_Win win); 
     30 
     31  int MPI_Compare_and_swap(const void *origin_addr, const void *compare_addr, void *result_addr, MPI_Datatype datatype,  
     32                           int target_rank, MPI_Aint target_disp, MPI_Win win); 
     33 
    3034} 
    3135 
  • XIOS/dev/branch_openmp/extern/ep_dev/main.cpp

    r1393 r1395  
    742742    MPI_Win_fence(0, ep_win); 
    743743 
     744    if(rank == 7) 
     745    { 
     746      MPI_Aint displs = 0; 
     747      MPI_Compare_and_swap(&local_buf, &buf, &result_buf, MPI_INT, size-1, displs, ep_win); 
     748    } 
     749 
     750    MPI_Win_fence(0, ep_win); 
     751 
     752    //::MPI_Compare_and_swap(origin_addr, compare_addr, result_addr, to_mpi_type(datatype), target_mpi_rank, to_mpi_aint(target_disp), to_mpi_win(win.server_win[target_local_rank])); 
     753 
    744754    MPI_Win ep_win_allocated; 
    745755    int* baseptr = new int[10]; 
Note: See TracChangeset for help on using the changeset viewer.