OpenMPI 0.1.1

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

- File List
- Globals

btl_gm_endpoint.h
1 /*
2 * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
3 * University Research and Technology
4 * Corporation. All rights reserved.
5 * Copyright (c) 2004-2005 The University of Tennessee and The University
6 * of Tennessee Research Foundation. All rights
7 * reserved.
8 * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
9 * University of Stuttgart. All rights reserved.
10 * Copyright (c) 2004-2005 The Regents of the University of California.
11 * All rights reserved.
12 * $COPYRIGHT$
13 *
14 * Additional copyrights may follow
15 *
16 * $HEADER$
17 */
18
19 #ifndef MCA_BTL_GM_ENDPOINT_H
20 #define MCA_BTL_GM_ENDPOINT_H
21
22 #include "opal/class/opal_list.h"
23 #include "opal/mca/event/event.h"
24 #include "btl_gm_frag.h"
25 #include "btl_gm.h"
26
27 #ifdef HAVE_ARPA_INET_H
28 #include <arpa/inet.h>
29 #endif
30
31 BEGIN_C_DECLS
32
33
34 /**
35 * Structure used to publish GM id information to peers.
36 */
37 struct mca_btl_gm_addr_t {
38 #if GM_API_VERSION > 0x200
39 unsigned int global_id;
40 #else
41 char global_id[GM_MAX_HOST_NAME_LEN];
42 #endif /* GM_API_VERSION > 0x200 */
43 unsigned int node_id;
44 unsigned int port_id;
45 };
46 typedef struct mca_btl_gm_addr_t mca_btl_gm_addr_t;
47
48 #if GM_API_VERSION > 0x200
49 #define MCA_BTL_GM_ADDR_HTON(addr) \
50 addr.global_id = htonl(addr.global_id); \
51 addr.node_id = htonl(addr.node_id); \
52 addr.port_id = htonl(addr.port_id);
53
54 #define MCA_BTL_GM_ADDR_NTOH(addr) \
55 addr.global_id = ntohl(addr.global_id); \
56 addr.node_id = ntohl(addr.node_id); \
57 addr.port_id = ntohl(addr.port_id);
58 #else
59 #define MCA_BTL_GM_ADDR_HTON(addr) \
60 addr.node_id = htonl(addr.node_id); \
61 addr.port_id = htonl(addr.port_id);
62
63 #define MCA_BTL_GM_ADDR_NTOH(addr) \
64 addr.node_id = ntohl(addr.node_id); \
65 addr.port_id = ntohl(addr.port_id);
66 #endif
67
68 /**
69 * An abstraction that represents a connection to a endpoint process.
70 * An instance of mca_btl_base_endpoint_t is associated w/ each process
71 * and BTL pair at startup. However, connections to the endpoint
72 * are established dynamically on an as-needed basis:
73 */
74
75 struct mca_btl_base_endpoint_t {
76 opal_list_item_t super;
77
78 struct mca_btl_gm_module_t* endpoint_btl;
79 /**< BTL instance that created this connection */
80
81 struct mca_btl_gm_proc_t* endpoint_proc;
82 /**< proc structure corresponding to endpoint */
83
84 mca_btl_gm_addr_t endpoint_addr;
85 };
86
87 typedef struct mca_btl_base_endpoint_t mca_btl_base_endpoint_t;
88 typedef mca_btl_base_endpoint_t mca_btl_gm_endpoint_t;
89
90 OBJ_CLASS_DECLARATION(mca_btl_gm_endpoint_t);
91
92 END_C_DECLS
93 #endif
btl_gm.h
mca_btl_base_endpoint_t::endpoint_proc
struct mca_btl_gm_proc_t * endpoint_proc
proc structure corresponding to endpoint
Definition: btl_gm_endpoint.h:81
opal_list.h
The opal_list_t interface is used to provide a generic doubly-linked list container for Open MPI...
opal_list_item_t
Definition: opal_list.h:98
mca_btl_gm_proc_t
Represents the state of a remote process and the set of addresses that it exports.
Definition: btl_gm_proc.h:36
mca_btl_base_endpoint_t::endpoint_btl
struct mca_btl_gm_module_t * endpoint_btl
BTL instance that created this connection.
Definition: btl_gm_endpoint.h:78
mca_btl_gm_addr_t
Structure used to publish GM id information to peers.
Definition: btl_gm_endpoint.h:37
mca_btl_base_endpoint_t
State of ELAN endpoint connection.
Definition: btl_elan_endpoint.h:33
mca_btl_gm_module_t
BTL Module Interface.
Definition: btl_gm.h:77
OBJ_CLASS_DECLARATION
#define OBJ_CLASS_DECLARATION(NAME)
Declaration for class descriptor.
Definition: opal_object.h:236