OpenMPI  0.1.1
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 
39  mca_btl_base_component_2_0_0_t super; /**< base BTL component */
40 
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 
48  /**< array of available BTL modules */
49 
51  /**< initial size of free lists */
52 
54  /**< maximum size of free lists */
55 
57  /**< number of elements to alloc when growing free lists */
58 
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 
68  /**< list of elan proc structures */
69 
71  /**< lock for accessing module state */
72 
73  char* elanidmap_file; /**< name of the ELANIDMAP file */
74 };
76 
77 OMPI_MODULE_DECLSPEC extern mca_btl_elan_component_t mca_btl_elan_component;
78 
79 /**
80  * BTL Module Interface
81  */
82 
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 };
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;
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 
int elan_free_list_inc
number of elements to alloc when growing free lists
Definition: btl_elan.h:56
Definition: btl_elan.h:102
opal_list_t elan_procs
list of elan proc structures
Definition: btl_elan.h:67
int mca_btl_elan_component_close(void)
Any final cleanup before being unloaded.
Definition: btl_elan_component.c:126
struct mca_btl_elan_module_t ** elan_btls
array of available BTL modules
Definition: btl_elan.h:47
ELAN BTL component.
Definition: btl_elan.h:38
char * elanidmap_file
name of the ELANIDMAP file
Definition: btl_elan.h:73
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
Definition: mutex_unix.h:53
int mca_btl_elan_component_progress(void)
ELAN component progress.
Definition: btl_elan_component.c:262
ELAN_QUEUE_TX * tx_queue
The global send queue.
Definition: btl_elan.h:93
int elan_max_posted_recv
number of pre-posted receives
Definition: btl_elan.h:59
ELAN_QUEUE * global_queue
The global queue.
Definition: btl_elan.h:90
mca_btl_base_module_t super
base BTL interface
Definition: btl_elan.h:84
BTL Module Interface.
Definition: btl_elan.h:83
uint32_t elan_num_btls
number of hcas available to the ELAN component
Definition: btl_elan.h:44
int elan_free_list_max
maximum size of free lists
Definition: btl_elan.h:53
opal_list_t send_list
list of posted sends
Definition: btl_elan.h:95
Byte Transfer Layer (BTL)
size_t queue_max_size
maximum amount of data transfered using the queues
Definition: btl_elan.h:41
Definition: ompi_free_list.h:39
opal_mutex_t elan_lock
lock for accessing module state
Definition: btl_elan.h:70
int mca_btl_elan_component_open(void)
Register ELAN component parameters with the MCA framework.
Definition: btl_elan_component.c:81
BTL component descriptor.
Definition: btl.h:411
Definition: opal_list.h:147
opal_list_t rdma_list
list of posted receives
Definition: btl_elan.h:96
ELAN_QUEUE_RX * rx_queue
The local receive queue.
Definition: btl_elan.h:92
mca_btl_base_component_2_0_0_t super
base BTL component
Definition: btl_elan.h:39
BTL module interface functions and attributes.
Definition: btl.h:786
int elan_free_list_num
initial size of free lists
Definition: btl_elan.h:50
int elan_position
position of this elan interface
Definition: btl_elan.h:87