Ignore:
Timestamp:
12/21/17 14:50:18 (6 years ago)
Author:
yushan
Message:

dev EP-RMA : MPI_Win_allocate

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/branch_openmp/extern/ep_dev/main.cpp

    r1385 r1388  
    637637  { 
    638638    printf("Proc %d is client\n", mpi_rank); 
    639     num_threads = 2; 
     639    num_threads = 2+mpi_rank; 
    640640  } 
    641641  else 
     
    730730                         1, MPI_INT, MPI_SUM, ep_win); 
    731731    } 
    732  
    733      
     732     
     733    MPI_Win_fence(0, ep_win); 
     734 
     735    MPI_Win ep_win_allocated; 
     736    int* baseptr = new int[10]; 
     737    MPI_Aint base_size = 4; 
     738 
     739    MPI_Win_allocate (base_size, sizeof(int), info, comm, baseptr, &ep_win_allocated); 
     740 
     741    MPI_Win_fence(0, ep_win_allocated); 
     742 
     743    MPI_Win_free(&ep_win_allocated); 
     744    delete[] baseptr; 
     745 
    734746    MPI_Win_free(&ep_win); 
    735747    printf("rank = %d, buf = %d, local_buf = %d, result_buf = %d\n", rank, buf, local_buf, result_buf); 
Note: See TracChangeset for help on using the changeset viewer.