File: osc_rdma_passive_target.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 (132 lines) | stat: -rw-r--r-- 3,979 bytes parent folder | download | duplicates (2)
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
/*
 * Copyright (c) 2014-2015 Los Alamos National Security, LLC.  All rights
 *                         reserved.
 * Copyright (c) 2021      Google, LLC. All rights reserved.
 * $COPYRIGHT$
 *
 * Additional copyrights may follow
 *
 * $HEADER$
 */

#ifndef OSC_RDMA_PASSIVE_TARGET_H
#define OSC_RDMA_PASSIVE_TARGET_H

#include "osc_rdma.h"
#include "osc_rdma_sync.h"
#include "osc_rdma_lock.h"

/**
 * @brief lock the target in the window using network/cpu atomics
 *
 * @param[in] lock_type        mpi lock type (MPI_LOCK_SHARED, MPI_LOCK_EXCLUSIVE)
 * @param[in] target           target process
 * @param[in] mpi_assert       asserts
 * @param[in] win              mpi window
 *
 * @returns OMPI_SUCCESS on success
 * @returns OMPI_ERR_RMA_SYNC if there is a conflicting RMA epoch
 */
int ompi_osc_rdma_lock_atomic (int lock_type, int target, int mpi_assert, ompi_win_t *win);

/**
 * @brief unlock the target in the window using network/cpu atomics
 *
 * @param[in] target           target process
 * @param[in] win              mpi window
 *
 * @returns OMPI_SUCCESS on success
 * @returns OMPI_ERR_RMA_SYNC if the target is not locked
 */
int ompi_osc_rdma_unlock_atomic (int target, ompi_win_t *win);

/**
 * @brief lock all targets in window using network/cpu atomics
 *
 * @param[in] mpi_assert       asserts
 * @param[in] win              mpi window
 *
 * @returns OMPI_SUCCESS on success
 * @returns OMPI_ERR_RMA_SYNC if there is a conflicting RMA epoch
 */
int ompi_osc_rdma_lock_all_atomic (int mpi_assert, struct ompi_win_t *win);

/**
 * @brief unlock all targets in window using network/cpu atomics
 *
 * @param[in] mpi_assert       asserts
 * @param[in] win              mpi window
 *
 * @returns OMPI_SUCCESS on success
 * @returns OMPI_ERR_RMA_SYNC if the window is not in a lock all access epoch
 */
int ompi_osc_rdma_unlock_all_atomic (struct ompi_win_t *win);

/**
 * @brief synchronize the public and private copies of the window
 *
 * @param[in] win              mpi window
 *
 * @returns OMPI_SUCCESS on success
 *
 * Just acts as a memory barrier since this module only supports a unified memory
 * model.
 */
int ompi_osc_rdma_sync (struct ompi_win_t *win);

/**
 * @brief flush rdma transactions to a target
 *
 * @param[in] target           target process
 * @param[in] win              mpi window
 *
 * @returns OMPI_SUCCESS on success
 * @returns OMPI_ERR_RMA_SYNC if the target is not locked
 */
int ompi_osc_rdma_flush (int target, struct ompi_win_t *win);

/**
 * @brief flush rdma transactions to all target(s)
 *
 * @param[in] win              mpi window
 *
 * @returns OMPI_SUCCESS on success
 * @returns OMPI_ERR_RMA_SYNC if no processes are locked
 *
 * osc/rdma does not make a distinction between local and remote rma
 * completion. this could change in a future release as small messages
 * may be internally buffered.
 */
int ompi_osc_rdma_flush_all (struct ompi_win_t *win);

/**
 * @brief flush rdma transactions to a target (local completion)
 *
 * @param[in] target           target process
 * @param[in] win              mpi window
 *
 * @returns OMPI_SUCCESS on success
 * @returns OMPI_ERR_RMA_SYNC if the target is not locked
 *
 * osc/rdma does not make a distinction between local and remote rma
 * completion. this could change in a future release as small messages
 * may be internally buffered.
 */
int ompi_osc_rdma_flush_local (int target, struct ompi_win_t *win);

/**
 * @brief flush rdma transactions to all target(s) (local completion)
 *
 * @param[in] win              mpi window
 *
 * @returns OMPI_SUCCESS on success
 * @returns OMPI_ERR_RMA_SYNC if no processes are locked
 *
 * osc/rdma does not make a distinction between local and remote rma
 * completion. this could change in a future release as small messages
 * may be internally buffered.
 */
int ompi_osc_rdma_flush_local_all (struct ompi_win_t *win);

#endif /* OSC_RDMA_PASSIVE_TARGET_H */