File: osc_rdma_dynamic.h

package info (click to toggle)
openmpi 5.0.7-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 202,312 kB
  • sloc: ansic: 612,441; makefile: 42,495; sh: 11,230; javascript: 9,244; f90: 7,052; java: 6,404; perl: 5,154; python: 1,856; lex: 740; fortran: 61; cpp: 20; tcl: 12
file content (60 lines) | stat: -rw-r--r-- 1,999 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
/*
 * Copyright (c) 2014-2015 Los Alamos National Security, LLC.  All rights
 *                         reserved.
 * $COPYRIGHT$
 *
 * Additional copyrights may follow
 *
 * $HEADER$
 */

#include "osc_rdma.h"

/**
 * @brief attach a region to a window
 *
 * @param[in] win   mpi window
 * @param[in] base  base pointer of region
 * @param[in] len   region size
 *
 * @returns OMPI_SUCCESS on success
 * @returns OMPI_ERR_RMA_FLAVOR if the window is not a dynamic window
 * @returns OMPI_ERR_RMA_ATTACH if the region could not be attached
 *
 * This function attaches a region to the local window. After this call
 * completes the region will be available for RMA access by all peers in
 * the window.
 */
int ompi_osc_rdma_attach (struct ompi_win_t *win, void *base, size_t len);

/**
 * @brief detach a region from a window
 *
 * @param[in] win   mpi window
 * @param[in] base  base pointer of region specified to ompi_osc_rdma_attach()
 *
 * @returns OMPI_SUCCESS on success
 * @returns OMPI_ERR_RMA_FLAVOR if the window is not a dynamic window
 * @returns OMPI_ERROR if the region is not attached
 *
 * This function requires that a region with the same base has been attached
 * using the ompi_osc_rdma_attach() function.
 */
int ompi_osc_rdma_detach (struct ompi_win_t *win, const void *base);

/**
 * @brief find dynamic region associated with a peer, base, and len
 *
 * @param[in]  module   osc rdma module
 * @param[in]  peer     peer object for remote peer
 * @param[in]  base     base pointer for region
 * @param[in]  len      length of region
 * @param[out] region   region structure for the region
 *
 * @returns OMPI_SUCCESS on success
 * @returns OMPI_ERR_OUT_OF_RESOURCE on resource failure
 * @returns OMPI_ERR_RMA_RANGE if no region matches
 */
int ompi_osc_rdma_find_dynamic_region (ompi_osc_rdma_module_t *module, ompi_osc_rdma_peer_t *peer, uint64_t base, size_t len,
				       ompi_osc_rdma_region_t **region);