root/ompi/mca/osc/rdma/osc_rdma_passive_target.h

/* [<][>][^][v][top][bottom][index][help] */

INCLUDED FROM


   1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
   2 /*
   3  * Copyright (c) 2014-2015 Los Alamos National Security, LLC.  All rights
   4  *                         reserved.
   5  * $COPYRIGHT$
   6  *
   7  * Additional copyrights may follow
   8  *
   9  * $HEADER$
  10  */
  11 
  12 #if !defined(OSC_RDMA_PASSIVE_TARGET_H)
  13 #define OSC_RDMA_PASSIVE_TARGET_H
  14 
  15 #include "osc_rdma.h"
  16 #include "osc_rdma_sync.h"
  17 #include "osc_rdma_lock.h"
  18 
  19 /**
  20  * @brief lock the target in the window using network/cpu atomics
  21  *
  22  * @param[in] lock_type        mpi lock type (MPI_LOCK_SHARED, MPI_LOCK_EXCLUSIVE)
  23  * @param[in] target           target process
  24  * @param[in] assert           asserts
  25  * @param[in] win              mpi window
  26  *
  27  * @returns OMPI_SUCCESS on success
  28  * @returns OMPI_ERR_RMA_SYNC if there is a conflicting RMA epoch
  29  */
  30 int ompi_osc_rdma_lock_atomic (int lock_type, int target, int assert, ompi_win_t *win);
  31 
  32 /**
  33  * @brief unlock the target in the window using network/cpu atomics
  34  *
  35  * @param[in] target           target process
  36  * @param[in] win              mpi window
  37  *
  38  * @returns OMPI_SUCCESS on success
  39  * @returns OMPI_ERR_RMA_SYNC if the target is not locked
  40  */
  41 int ompi_osc_rdma_unlock_atomic (int target, ompi_win_t *win);
  42 
  43 /**
  44  * @brief lock all targets in window using network/cpu atomics
  45  *
  46  * @param[in] assert           asserts
  47  * @param[in] win              mpi window
  48  *
  49  * @returns OMPI_SUCCESS on success
  50  * @returns OMPI_ERR_RMA_SYNC if there is a conflicting RMA epoch
  51  */
  52 int ompi_osc_rdma_lock_all_atomic (int assert, struct ompi_win_t *win);
  53 
  54 /**
  55  * @brief unlock all targets in window using network/cpu atomics
  56  *
  57  * @param[in] assert           asserts
  58  * @param[in] win              mpi window
  59  *
  60  * @returns OMPI_SUCCESS on success
  61  * @returns OMPI_ERR_RMA_SYNC if the window is not in a lock all access epoch
  62  */
  63 int ompi_osc_rdma_unlock_all_atomic (struct ompi_win_t *win);
  64 
  65 /**
  66  * @brief synchronize the public and private copies of the window
  67  *
  68  * @param[in] win              mpi window
  69  *
  70  * @returns OMPI_SUCCESS on success
  71  *
  72  * Just acts as a memory barrier since this module only supports a unified memory
  73  * model.
  74  */
  75 int ompi_osc_rdma_sync (struct ompi_win_t *win);
  76 
  77 /**
  78  * @brief flush rdma transactions to a target
  79  *
  80  * @param[in] target           target process
  81  * @param[in] win              mpi window
  82  *
  83  * @returns OMPI_SUCCESS on success
  84  * @returns OMPI_ERR_RMA_SYNC if the target is not locked
  85  */
  86 int ompi_osc_rdma_flush (int target, struct ompi_win_t *win);
  87 
  88 /**
  89  * @brief flush rdma transactions to all target(s)
  90  *
  91  * @param[in] win              mpi window
  92  *
  93  * @returns OMPI_SUCCESS on success
  94  * @returns OMPI_ERR_RMA_SYNC if no processes are locked
  95  *
  96  * osc/rdma does not make a distinction between local and remote rma
  97  * completion. this could change in a future release as small messages
  98  * may be internally buffered.
  99  */
 100 int ompi_osc_rdma_flush_all (struct ompi_win_t *win);
 101 
 102 /**
 103  * @brief flush rdma transactions to a target (local completion)
 104  *
 105  * @param[in] target           target process
 106  * @param[in] win              mpi window
 107  *
 108  * @returns OMPI_SUCCESS on success
 109  * @returns OMPI_ERR_RMA_SYNC if the target is not locked
 110  *
 111  * osc/rdma does not make a distinction between local and remote rma
 112  * completion. this could change in a future release as small messages
 113  * may be internally buffered.
 114  */
 115 int ompi_osc_rdma_flush_local (int target, struct ompi_win_t *win);
 116 
 117 /**
 118  * @brief flush rdma transactions to all target(s) (local completion)
 119  *
 120  * @param[in] win              mpi window
 121  *
 122  * @returns OMPI_SUCCESS on success
 123  * @returns OMPI_ERR_RMA_SYNC if no processes are locked
 124  *
 125  * osc/rdma does not make a distinction between local and remote rma
 126  * completion. this could change in a future release as small messages
 127  * may be internally buffered.
 128  */
 129 int ompi_osc_rdma_flush_local_all (struct ompi_win_t *win);
 130 
 131 #endif

/* [<][>][^][v][top][bottom][index][help] */