OpenMPI 0.1.1

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

- File List
- Globals

btl_elan.h
Go to the documentation of this file.
1 /* -*- Mode: C; c-basic-offset:4 ; -*- */
2 /*
3 * Copyright (c) 2004-2007 The University of Tennessee and The University
4 * of Tennessee Research Foundation. All rights
5 * reserved.
6 * $COPYRIGHT$
7 *
8 * Additional copyrights may follow
9 *
10 * $HEADER$
11 */
12 /**
13 * @file
14 */
15 #ifndef MCA_BTL_ELAN_H
16 #define MCA_BTL_ELAN_H
17
18 #include "ompi_config.h"
19
20 #include "opal/mca/event/event.h"
21 #include "ompi/class/ompi_free_list.h"
22 #include "ompi/mca/btl/btl.h"
23 #include "ompi/mca/btl/base/btl_base_error.h"
24
25 #include "ompi/mca/btl/btl.h"
26 #include "ompi/mca/btl/base/base.h"
27 #include "btl_elan_endpoint.h"
28 #include "btl_elan_frag.h"
29
30 #include "elan/elan.h"
31
32 BEGIN_C_DECLS
33
34 /**
35 * ELAN BTL component.
36 */
37
38 struct mca_btl_elan_component_t {
39 mca_btl_base_component_2_0_0_t super; /**< base BTL component */
40
41 size_t queue_max_size;
42 /**< maximum amount of data transfered using the queues */
43
44 uint32_t elan_num_btls;
45 /**< number of hcas available to the ELAN component */
46
47 struct mca_btl_elan_module_t **elan_btls;
48 /**< array of available BTL modules */
49
50 int elan_free_list_num;
51 /**< initial size of free lists */
52
53 int elan_free_list_max;
54 /**< maximum size of free lists */
55
56 int elan_free_list_inc;
57 /**< number of elements to alloc when growing free lists */
58
59 int elan_max_posted_recv;
60 /**< number of pre-posted receives */
61
62 /* free list of fragment descriptors */
63 ompi_free_list_t elan_frag_eager;
64 ompi_free_list_t elan_frag_max;
65 ompi_free_list_t elan_frag_user;
66
67 opal_list_t elan_procs;
68 /**< list of elan proc structures */
69
70 opal_mutex_t elan_lock;
71 /**< lock for accessing module state */
72
73 char* elanidmap_file; /**< name of the ELANIDMAP file */
74 };
75 typedef struct mca_btl_elan_component_t mca_btl_elan_component_t;
76
77 OMPI_MODULE_DECLSPEC extern mca_btl_elan_component_t mca_btl_elan_component;
78
79 /**
80 * BTL Module Interface
81 */
82
83 struct mca_btl_elan_module_t {
84 mca_btl_base_module_t super; /**< base BTL interface */
85 int expect_tport_recv;
86 int elan_vp;
87 int elan_position; /**< position of this elan interface */
88 ELAN_BASE* base;
89 ELAN_TPORT* tport;
90 ELAN_QUEUE* global_queue; /**< The global queue */
91 ELAN_QUEUE* tport_queue;
92 ELAN_QUEUE_RX* rx_queue; /**< The local receive queue */
93 ELAN_QUEUE_TX* tx_queue; /**< The global send queue */
94 opal_mutex_t elan_lock;
95 opal_list_t send_list; /**< list of posted sends */
96 opal_list_t rdma_list; /**< list of posted receives */
97 opal_list_t recv_list;
98 };
99 typedef struct mca_btl_elan_module_t mca_btl_elan_module_t;
100 extern mca_btl_elan_module_t mca_btl_elan_module;
101
102 typedef struct mca_btl_elan_hdr_t {
103 int tag;
104 int length;
105 } mca_btl_elan_hdr_t;
106
107 /**
108 * Register ELAN component parameters with the MCA framework
109 */
110 extern int mca_btl_elan_component_open(void);
111
112 /**
113 * Any final cleanup before being unloaded.
114 */
115 extern int mca_btl_elan_component_close(void);
116
117 /**
118 * ELAN component initialization.
119 *
120 * @param num_btl_modules (OUT) Number of BTLs returned in BTL array.
121 * @param allow_multi_user_threads (OUT) Flag indicating wether BTL supports user threads (TRUE)
122 * @param have_hidden_threads (OUT) Flag indicating wether BTL uses threads (TRUE)
123 */
124 extern mca_btl_base_module_t**
125 mca_btl_elan_component_init( int* num_btl_modules,
126 bool allow_multi_user_threads,
127 bool have_hidden_threads );
128
129 /**
130 * ELAN component progress.
131 */
132 extern int mca_btl_elan_component_progress(void);
133
134 extern int mca_btl_elan_finalize( struct mca_btl_base_module_t* btl );
135
136 extern int mca_btl_elan_ft_event(int state);
137
138 END_C_DECLS
139
140 #endif /* MCA_BTL_ELAN_H */
141
mca_btl_elan_component_t::elan_free_list_inc
int elan_free_list_inc
number of elements to alloc when growing free lists
Definition: btl_elan.h:56
mca_btl_elan_hdr_t
Definition: btl_elan.h:102
mca_btl_elan_component_t::elan_procs
opal_list_t elan_procs
list of elan proc structures
Definition: btl_elan.h:67
mca_btl_elan_component_close
int mca_btl_elan_component_close(void)
Any final cleanup before being unloaded.
Definition: btl_elan_component.c:126
mca_btl_elan_component_t::elan_btls
struct mca_btl_elan_module_t ** elan_btls
array of available BTL modules
Definition: btl_elan.h:47
mca_btl_elan_component_t
ELAN BTL component.
Definition: btl_elan.h:38
mca_btl_elan_component_t::elanidmap_file
char * elanidmap_file
name of the ELANIDMAP file
Definition: btl_elan.h:73
mca_btl_elan_component_init
mca_btl_base_module_t ** mca_btl_elan_component_init(int *num_btl_modules, bool allow_multi_user_threads, bool have_hidden_threads)
ELAN component initialization.
Definition: btl_elan_component.c:151
opal_mutex_t
Definition: mutex_unix.h:53
mca_btl_elan_component_progress
int mca_btl_elan_component_progress(void)
ELAN component progress.
Definition: btl_elan_component.c:262
mca_btl_elan_module_t::tx_queue
ELAN_QUEUE_TX * tx_queue
The global send queue.
Definition: btl_elan.h:93
mca_btl_elan_component_t::elan_max_posted_recv
int elan_max_posted_recv
number of pre-posted receives
Definition: btl_elan.h:59
mca_btl_elan_module_t::global_queue
ELAN_QUEUE * global_queue
The global queue.
Definition: btl_elan.h:90
mca_btl_elan_module_t::super
mca_btl_base_module_t super
base BTL interface
Definition: btl_elan.h:84
mca_btl_elan_module_t
BTL Module Interface.
Definition: btl_elan.h:83
mca_btl_elan_component_t::elan_num_btls
uint32_t elan_num_btls
number of hcas available to the ELAN component
Definition: btl_elan.h:44
mca_btl_elan_component_t::elan_free_list_max
int elan_free_list_max
maximum size of free lists
Definition: btl_elan.h:53
mca_btl_elan_module_t::send_list
opal_list_t send_list
list of posted sends
Definition: btl_elan.h:95
btl.h
Byte Transfer Layer (BTL)
mca_btl_elan_component_t::queue_max_size
size_t queue_max_size
maximum amount of data transfered using the queues
Definition: btl_elan.h:41
ompi_free_list_t
Definition: ompi_free_list.h:39
mca_btl_elan_component_t::elan_lock
opal_mutex_t elan_lock
lock for accessing module state
Definition: btl_elan.h:70
mca_btl_elan_component_open
int mca_btl_elan_component_open(void)
Register ELAN component parameters with the MCA framework.
Definition: btl_elan_component.c:81
mca_btl_base_component_2_0_0_t
BTL component descriptor.
Definition: btl.h:411
opal_list_t
Definition: opal_list.h:147
mca_btl_elan_module_t::rdma_list
opal_list_t rdma_list
list of posted receives
Definition: btl_elan.h:96
base.h
mca_btl_elan_module_t::rx_queue
ELAN_QUEUE_RX * rx_queue
The local receive queue.
Definition: btl_elan.h:92
mca_btl_elan_component_t::super
mca_btl_base_component_2_0_0_t super
base BTL component
Definition: btl_elan.h:39
mca_btl_base_module_t
BTL module interface functions and attributes.
Definition: btl.h:786
mca_btl_elan_component_t::elan_free_list_num
int elan_free_list_num
initial size of free lists
Definition: btl_elan.h:50
mca_btl_elan_module_t::elan_position
int elan_position
position of this elan interface
Definition: btl_elan.h:87