15
15
* $HEADER$
16
16
*/
17
17
18
+
19
+ #include "opal_config.h"
20
+
18
21
#include <errno.h>
19
22
#include <unistd.h>
23
+ #include <rdma/fabric.h>
24
+ #if OPAL_OFI_IMPORT_MONITOR_SUPPORT
25
+ #include <rdma/fi_ext.h>
26
+ #endif
20
27
21
- #include "opal_config.h"
22
28
#include "common_ofi.h"
23
29
#include "opal/constants.h"
24
30
#include "opal/mca/base/mca_base_framework.h"
25
31
#include "opal/mca/base/mca_base_var.h"
26
32
#include "opal/mca/hwloc/base/base.h"
33
+ #include "opal/mca/memory/base/base.h"
27
34
#include "opal/mca/pmix/base/base.h"
28
35
#include "opal/util/argv.h"
29
36
#include "opal/util/show_help.h"
30
37
31
- OPAL_DECLSPEC opal_common_ofi_module_t opal_common_ofi = {.prov_include = NULL ,
32
- .prov_exclude = NULL ,
33
- .registered = 0 ,
34
- .verbose = 0 };
38
+ opal_common_ofi_module_t opal_common_ofi = {.prov_include = NULL ,
39
+ .prov_exclude = NULL ,
40
+ .registered = 0 ,
41
+ .verbose = 0 };
35
42
36
43
static const char default_prov_exclude_list [] = "shm,sockets,tcp,udp,rstream,usnic" ;
37
44
static opal_mutex_t opal_common_ofi_mutex = OPAL_MUTEX_STATIC_INIT ;
@@ -75,15 +82,15 @@ static struct fi_ops_mem_monitor opal_common_ofi_export_ops = {
75
82
.valid = opal_common_ofi_monitor_valid ,
76
83
};
77
84
78
- OPAL_DECLSPEC void opal_common_ofi_mem_release_cb (void * buf , size_t length ,
79
- void * cbdata , bool from_alloc )
85
+ static void opal_common_ofi_mem_release_cb (void * buf , size_t length ,
86
+ void * cbdata , bool from_alloc )
80
87
{
81
88
opal_common_ofi_monitor -> import_ops -> notify (opal_common_ofi_monitor ,
82
89
buf , length );
83
90
}
84
91
#endif /* OPAL_OFI_IMPORT_MONITOR_SUPPORT */
85
92
86
- OPAL_DECLSPEC int opal_common_ofi_init (void )
93
+ int opal_common_ofi_init (void )
87
94
{
88
95
int ret ;
89
96
@@ -135,7 +142,7 @@ OPAL_DECLSPEC int opal_common_ofi_init(void)
135
142
#endif
136
143
}
137
144
138
- OPAL_DECLSPEC int opal_common_ofi_fini (void )
145
+ int opal_common_ofi_fini (void )
139
146
{
140
147
if (opal_common_ofi_initialized && !-- opal_common_ofi_init_ref_cnt ) {
141
148
#if OPAL_OFI_IMPORT_MONITOR_SUPPORT
@@ -150,7 +157,7 @@ OPAL_DECLSPEC int opal_common_ofi_fini(void)
150
157
return OPAL_SUCCESS ;
151
158
}
152
159
153
- OPAL_DECLSPEC int opal_common_ofi_is_in_list (char * * list , char * item )
160
+ int opal_common_ofi_is_in_list (char * * list , char * item )
154
161
{
155
162
int i = 0 ;
156
163
@@ -169,7 +176,7 @@ OPAL_DECLSPEC int opal_common_ofi_is_in_list(char **list, char *item)
169
176
return 0 ;
170
177
}
171
178
172
- OPAL_DECLSPEC int opal_common_ofi_register_mca_variables (const mca_base_component_t * component )
179
+ int opal_common_ofi_register_mca_variables (const mca_base_component_t * component )
173
180
{
174
181
static int include_index ;
175
182
static int exclude_index ;
@@ -253,7 +260,7 @@ OPAL_DECLSPEC int opal_common_ofi_register_mca_variables(const mca_base_componen
253
260
return OPAL_SUCCESS ;
254
261
}
255
262
256
- OPAL_DECLSPEC void opal_common_ofi_mca_register (void )
263
+ void opal_common_ofi_mca_register (void )
257
264
{
258
265
opal_common_ofi .registered ++ ;
259
266
if (opal_common_ofi .registered > 1 ) {
@@ -265,7 +272,7 @@ OPAL_DECLSPEC void opal_common_ofi_mca_register(void)
265
272
opal_output_set_verbosity (opal_common_ofi .output , opal_common_ofi .verbose );
266
273
}
267
274
268
- OPAL_DECLSPEC void opal_common_ofi_mca_deregister (void )
275
+ void opal_common_ofi_mca_deregister (void )
269
276
{
270
277
/* unregister only on last deregister */
271
278
opal_common_ofi .registered -- ;
0 commit comments