btl/uct: fix compilation for UCX 1.7.0
Ref #7128 Signed-off-by: Nathan Hjelm <hjelmn@google.com> (cherry picked from commit a3026c016a6a8be379f62585b6ddc070175c8106)
Этот коммит содержится в:
родитель
47ec3e4d2b
Коммит
55e01220cd
@ -12,6 +12,7 @@
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2015-2018 Los Alamos National Security, LLC. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2019 Google, LLC. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -85,7 +86,7 @@ struct mca_btl_uct_module_t {
|
||||
/** array containing the am_tl and rdma_tl */
|
||||
mca_btl_uct_tl_t *comm_tls[2];
|
||||
|
||||
#if UCT_API > UCT_VERSION(1, 7)
|
||||
#if UCT_API >= UCT_VERSION(1, 7)
|
||||
uct_component_h uct_component;
|
||||
#endif
|
||||
|
||||
|
@ -314,7 +314,7 @@ ucs_status_t mca_btl_uct_am_handler (void *arg, void *data, size_t length, unsig
|
||||
return UCS_OK;
|
||||
}
|
||||
|
||||
#if UCT_API > UCT_VERSION(1, 7)
|
||||
#if UCT_API >= UCT_VERSION(1, 7)
|
||||
static int mca_btl_uct_component_process_uct_md (uct_component_h component, uct_md_resource_desc_t *md_desc,
|
||||
char **allowed_ifaces)
|
||||
#else
|
||||
@ -354,7 +354,7 @@ static int mca_btl_uct_component_process_uct_md (uct_md_resource_desc_t *md_desc
|
||||
md = OBJ_NEW(mca_btl_uct_md_t);
|
||||
|
||||
|
||||
#if UCT_API > UCT_VERSION(1, 7)
|
||||
#if UCT_API >= UCT_VERSION(1, 7)
|
||||
uct_md_config_read (component, NULL, NULL, &uct_config);
|
||||
uct_md_open (component, md_desc->md_name, uct_config, &md->uct_md);
|
||||
#else
|
||||
@ -386,7 +386,7 @@ static int mca_btl_uct_component_process_uct_md (uct_md_resource_desc_t *md_desc
|
||||
return OPAL_ERR_NOT_AVAILABLE;
|
||||
}
|
||||
|
||||
#if UCT_API > UCT_VERSION(1, 7)
|
||||
#if UCT_API >= UCT_VERSION(1, 7)
|
||||
module->uct_component = component;
|
||||
#endif
|
||||
|
||||
@ -415,7 +415,7 @@ static int mca_btl_uct_component_process_uct_md (uct_md_resource_desc_t *md_desc
|
||||
return OPAL_SUCCESS;
|
||||
}
|
||||
|
||||
#if UCT_API > UCT_VERSION(1, 7)
|
||||
#if UCT_API >= UCT_VERSION(1, 7)
|
||||
static int mca_btl_uct_component_process_uct_component (uct_component_h component, char **allowed_ifaces)
|
||||
{
|
||||
uct_component_attr_t attr = {.field_mask = UCT_COMPONENT_ATTR_FIELD_NAME |
|
||||
@ -449,7 +449,7 @@ static int mca_btl_uct_component_process_uct_component (uct_component_h componen
|
||||
|
||||
return OPAL_SUCCESS;
|
||||
}
|
||||
#endif /* UCT_API > UCT_VERSION(1, 7) */
|
||||
#endif /* UCT_API >= UCT_VERSION(1, 7) */
|
||||
|
||||
/*
|
||||
* UCT component initialization:
|
||||
@ -485,7 +485,7 @@ static mca_btl_base_module_t **mca_btl_uct_component_init (int *num_btl_modules,
|
||||
|
||||
mca_btl_uct_component.module_count = 0;
|
||||
|
||||
#if UCT_API > UCT_VERSION(1, 7)
|
||||
#if UCT_API >= UCT_VERSION(1, 7)
|
||||
uct_component_h *components;
|
||||
unsigned num_components;
|
||||
|
||||
@ -519,7 +519,7 @@ static mca_btl_base_module_t **mca_btl_uct_component_init (int *num_btl_modules,
|
||||
|
||||
uct_release_md_resource_list (resources);
|
||||
|
||||
#endif /* UCT_API > UCT_VERSION(1, 7) */
|
||||
#endif /* UCT_API >= UCT_VERSION(1, 7) */
|
||||
|
||||
opal_argv_free (allowed_ifaces);
|
||||
mca_btl_uct_modex_send ();
|
||||
|
@ -55,7 +55,7 @@ static inline int mca_btl_uct_get_rkey (mca_btl_uct_module_t *module,
|
||||
return rc;
|
||||
}
|
||||
|
||||
#if UCT_API > UCT_VERSION(1, 7)
|
||||
#if UCT_API >= UCT_VERSION(1, 7)
|
||||
ucs_status = uct_rkey_unpack (module->uct_component, (void *) remote_handle, rkey);
|
||||
#else
|
||||
ucs_status = uct_rkey_unpack ((void *) remote_handle, rkey);
|
||||
@ -65,7 +65,7 @@ static inline int mca_btl_uct_get_rkey (mca_btl_uct_module_t *module,
|
||||
|
||||
static inline void mca_btl_uct_rkey_release (mca_btl_uct_module_t *uct_btl, uct_rkey_bundle_t *rkey)
|
||||
{
|
||||
#if UCT_API > UCT_VERSION(1, 7)
|
||||
#if UCT_API >= UCT_VERSION(1, 7)
|
||||
uct_rkey_release (uct_btl->uct_component, rkey);
|
||||
#else
|
||||
(void) uct_btl;
|
||||
|
@ -516,7 +516,7 @@ static int mca_btl_uct_evaluate_tl (mca_btl_uct_module_t *module, mca_btl_uct_tl
|
||||
* come up with a better estimate. */
|
||||
|
||||
/* UCT bandwidth is in bytes/sec, BTL is in MB/sec */
|
||||
#if UCT_API > UCT_VERSION(1, 7)
|
||||
#if UCT_API >= UCT_VERSION(1, 7)
|
||||
module->super.btl_bandwidth = (uint32_t) ((MCA_BTL_UCT_TL_ATTR(tl, 0).bandwidth.dedicated +
|
||||
MCA_BTL_UCT_TL_ATTR(tl, 0).bandwidth.shared /
|
||||
(opal_process_info.num_local_peers + 1)) / 1048576.0);
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user