1515 * $HEADER$
1616 */
1717
18+
19+ #include "opal_config.h"
20+
1821#include <errno.h>
1922#include <unistd.h>
23+ #include <rdma/fabric.h>
24+ #if OPAL_OFI_IMPORT_MONITOR_SUPPORT
25+ #include <rdma/fi_ext.h>
26+ #endif
2027
21- #include "opal_config.h"
2228#include "common_ofi.h"
2329#include "opal/constants.h"
2430#include "opal/mca/base/mca_base_framework.h"
2531#include "opal/mca/base/mca_base_var.h"
2632#include "opal/mca/hwloc/base/base.h"
33+ #include "opal/mca/memory/base/base.h"
2734#include "opal/mca/pmix/base/base.h"
2835#include "opal/util/argv.h"
2936#include "opal/util/show_help.h"
3037
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 };
3542
3643static const char default_prov_exclude_list [] = "shm,sockets,tcp,udp,rstream,usnic" ;
3744static 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 = {
7582 .valid = opal_common_ofi_monitor_valid ,
7683};
7784
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 )
8087{
8188 opal_common_ofi_monitor -> import_ops -> notify (opal_common_ofi_monitor ,
8289 buf , length );
8390}
8491#endif /* OPAL_OFI_IMPORT_MONITOR_SUPPORT */
8592
86- OPAL_DECLSPEC int opal_common_ofi_init (void )
93+ int opal_common_ofi_init (void )
8794{
8895 int ret ;
8996
@@ -135,7 +142,7 @@ OPAL_DECLSPEC int opal_common_ofi_init(void)
135142#endif
136143}
137144
138- OPAL_DECLSPEC int opal_common_ofi_fini (void )
145+ int opal_common_ofi_fini (void )
139146{
140147 if (opal_common_ofi_initialized && !-- opal_common_ofi_init_ref_cnt ) {
141148#if OPAL_OFI_IMPORT_MONITOR_SUPPORT
@@ -150,7 +157,7 @@ OPAL_DECLSPEC int opal_common_ofi_fini(void)
150157 return OPAL_SUCCESS ;
151158}
152159
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 )
154161{
155162 int i = 0 ;
156163
@@ -169,7 +176,7 @@ OPAL_DECLSPEC int opal_common_ofi_is_in_list(char **list, char *item)
169176 return 0 ;
170177}
171178
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 )
173180{
174181 static int include_index ;
175182 static int exclude_index ;
@@ -253,7 +260,7 @@ OPAL_DECLSPEC int opal_common_ofi_register_mca_variables(const mca_base_componen
253260 return OPAL_SUCCESS ;
254261}
255262
256- OPAL_DECLSPEC void opal_common_ofi_mca_register (void )
263+ void opal_common_ofi_mca_register (void )
257264{
258265 opal_common_ofi .registered ++ ;
259266 if (opal_common_ofi .registered > 1 ) {
@@ -265,7 +272,7 @@ OPAL_DECLSPEC void opal_common_ofi_mca_register(void)
265272 opal_output_set_verbosity (opal_common_ofi .output , opal_common_ofi .verbose );
266273}
267274
268- OPAL_DECLSPEC void opal_common_ofi_mca_deregister (void )
275+ void opal_common_ofi_mca_deregister (void )
269276{
270277 /* unregister only on last deregister */
271278 opal_common_ofi .registered -- ;
0 commit comments