OpenMPI 0.1.1

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

- File List
- Globals

common_ugni_ep.h
1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
2 /*
3 * Copyright (c) 2011-2012 Los Alamos National Security, LLC. All rights
4 * reserved.
5 * Copyright (c) 2011 UT-Battelle, LLC. All rights reserved.
6 * $COPYRIGHT$
7 *
8 * Additional copyrights may follow
9 *
10 * $HEADER$
11 */
12
13 #if !defined(MPI_COMMON_UGNI_EP_H)
14 #define MPI_COMMON_UGNI_EP_H
15
16 enum ompi_common_ugni_endpoint_state_t {
17 OMPI_COMMON_UGNI_INIT = 0,
18 OMPI_COMMON_UGNI_BOUND,
19 OMPI_COMMON_UGNI_CONNECTING,
20 OMPI_COMMON_UGNI_CONNECTED
21 };
22 typedef enum ompi_common_ugni_endpoint_state_t ompi_common_ugni_endpoint_state_t;
23
24 struct ompi_common_ugni_device_t;
25
26 struct ompi_common_ugni_endpoint_t {
27 opal_object_t super;
28 gni_ep_handle_t ep_handle; /**< uGNI handle for this endpoint */
29 ompi_common_ugni_endpoint_state_t state; /**< bind/connection state */
30 uint32_t ep_rem_addr, ep_rem_id; /**< remote information */
31 struct ompi_common_ugni_device_t *dev; /**< device this endpoint is using */
32 opal_mutex_t lock;
33 int bind_count; /**< bind reference count */
34 void *btl_ctx; /**< btl context for this endpoint */
35 };
36 typedef struct ompi_common_ugni_endpoint_t ompi_common_ugni_endpoint_t;
37
38 OBJ_CLASS_DECLARATION(ompi_common_ugni_endpoint_t);
39
40 /*
41 * Get (and retain) a reference to an endpoint to peer_proc. This endpoint
42 * needs to be returned with ompi_common_ugni_endpoint_return.
43 *
44 * @param[IN] dev uGNI device this endpoint should be bound to.
45 * @param[IN] peer_proc remote peer the endpoint will be connected to.
46 * @param[OUT] ep uGNI endpoint for the peer
47 */
48 int ompi_common_ugni_endpoint_for_proc (struct ompi_common_ugni_device_t *dev, ompi_proc_t *peer_proc,
49 ompi_common_ugni_endpoint_t **ep);
50
51 /*
52 * Allocate and bind a uGNI endpoint handle to the remote peer.
53 *
54 * @param[IN] ep uGNI endpoint to bind
55 */
56 int ompi_common_ugni_endpoint_bind (ompi_common_ugni_endpoint_t *ep);
57
58 /*
59 * Unbind and free the uGNI endpoint handle associated with this endpoint.
60 *
61 * @param[IN] ep uGNI endpoint to unbind
62 */
63 int ompi_common_ugni_endpoint_unbind (ompi_common_ugni_endpoint_t *ep);
64
65 /*
66 * Return (and possibly free) an endpoint. The endpoint may not be used
67 * once it is returned.
68 *
69 * @param[IN] ep uGNI endpoint to return
70 */
71 void ompi_common_ugni_endpoint_return (ompi_common_ugni_endpoint_t *ep);
72
73 #endif /* MPI_COMMON_UGNI_EP_H */
ompi_common_ugni_endpoint_t::dev
struct ompi_common_ugni_device_t * dev
device this endpoint is using
Definition: common_ugni_ep.h:31
ompi_common_ugni_endpoint_t::btl_ctx
void * btl_ctx
btl context for this endpoint
Definition: common_ugni_ep.h:34
opal_mutex_t
Definition: mutex_unix.h:53
ompi_proc_t
Remote Open MPI process structure.
Definition: proc.h:56
ompi_common_ugni_endpoint_t::ep_rem_id
uint32_t ep_rem_id
remote information
Definition: common_ugni_ep.h:30
ompi_common_ugni_device_t
Definition: common_ugni.h:42
ompi_common_ugni_endpoint_t::bind_count
int bind_count
bind reference count
Definition: common_ugni_ep.h:33
ompi_common_ugni_endpoint_t::ep_handle
gni_ep_handle_t ep_handle
uGNI handle for this endpoint
Definition: common_ugni_ep.h:28
opal_object_t
Base object.
Definition: opal_object.h:182
ompi_common_ugni_endpoint_t
Definition: common_ugni_ep.h:26
OBJ_CLASS_DECLARATION
#define OBJ_CLASS_DECLARATION(NAME)
Declaration for class descriptor.
Definition: opal_object.h:236
ompi_common_ugni_endpoint_t::state
ompi_common_ugni_endpoint_state_t state
bind/connection state
Definition: common_ugni_ep.h:29