Skip to content

Commit 30171cb

Browse files
authored
Merge pull request #7144 from hjelmn/btl_uct_fix_compilation_issue_for_ucx_1_7_because_the_api_break_got_into_this_release
btl/uct: fix compilation for UCX 1.7.0
2 parents 6e3ff5e + a3026c0 commit 30171cb

File tree

4 files changed

+12
-11
lines changed

4 files changed

+12
-11
lines changed

opal/mca/btl/uct/btl_uct.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
* All rights reserved.
1313
* Copyright (c) 2015-2018 Los Alamos National Security, LLC. All rights
1414
* reserved.
15+
* Copyright (c) 2019 Google, LLC. All rights reserved.
1516
* $COPYRIGHT$
1617
*
1718
* Additional copyrights may follow
@@ -85,7 +86,7 @@ struct mca_btl_uct_module_t {
8586
/** array containing the am_tl and rdma_tl */
8687
mca_btl_uct_tl_t *comm_tls[2];
8788

88-
#if UCT_API > UCT_VERSION(1, 7)
89+
#if UCT_API >= UCT_VERSION(1, 7)
8990
uct_component_h uct_component;
9091
#endif
9192

opal/mca/btl/uct/btl_uct_component.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ ucs_status_t mca_btl_uct_am_handler (void *arg, void *data, size_t length, unsig
316316
return UCS_OK;
317317
}
318318

319-
#if UCT_API > UCT_VERSION(1, 7)
319+
#if UCT_API >= UCT_VERSION(1, 7)
320320
static int mca_btl_uct_component_process_uct_md (uct_component_h component, uct_md_resource_desc_t *md_desc,
321321
char **allowed_ifaces)
322322
#else
@@ -356,7 +356,7 @@ static int mca_btl_uct_component_process_uct_md (uct_md_resource_desc_t *md_desc
356356
md = OBJ_NEW(mca_btl_uct_md_t);
357357

358358

359-
#if UCT_API > UCT_VERSION(1, 7)
359+
#if UCT_API >= UCT_VERSION(1, 7)
360360
uct_md_config_read (component, NULL, NULL, &uct_config);
361361
uct_md_open (component, md_desc->md_name, uct_config, &md->uct_md);
362362
#else
@@ -388,7 +388,7 @@ static int mca_btl_uct_component_process_uct_md (uct_md_resource_desc_t *md_desc
388388
return OPAL_ERR_NOT_AVAILABLE;
389389
}
390390

391-
#if UCT_API > UCT_VERSION(1, 7)
391+
#if UCT_API >= UCT_VERSION(1, 7)
392392
module->uct_component = component;
393393
#endif
394394

@@ -417,7 +417,7 @@ static int mca_btl_uct_component_process_uct_md (uct_md_resource_desc_t *md_desc
417417
return OPAL_SUCCESS;
418418
}
419419

420-
#if UCT_API > UCT_VERSION(1, 7)
420+
#if UCT_API >= UCT_VERSION(1, 7)
421421
static int mca_btl_uct_component_process_uct_component (uct_component_h component, char **allowed_ifaces)
422422
{
423423
uct_component_attr_t attr = {.field_mask = UCT_COMPONENT_ATTR_FIELD_NAME |
@@ -451,7 +451,7 @@ static int mca_btl_uct_component_process_uct_component (uct_component_h componen
451451

452452
return OPAL_SUCCESS;
453453
}
454-
#endif /* UCT_API > UCT_VERSION(1, 7) */
454+
#endif /* UCT_API >= UCT_VERSION(1, 7) */
455455

456456
/*
457457
* UCT component initialization:
@@ -487,7 +487,7 @@ static mca_btl_base_module_t **mca_btl_uct_component_init (int *num_btl_modules,
487487

488488
mca_btl_uct_component.module_count = 0;
489489

490-
#if UCT_API > UCT_VERSION(1, 7)
490+
#if UCT_API >= UCT_VERSION(1, 7)
491491
uct_component_h *components;
492492
unsigned num_components;
493493

@@ -521,7 +521,7 @@ static mca_btl_base_module_t **mca_btl_uct_component_init (int *num_btl_modules,
521521

522522
uct_release_md_resource_list (resources);
523523

524-
#endif /* UCT_API > UCT_VERSION(1, 7) */
524+
#endif /* UCT_API >= UCT_VERSION(1, 7) */
525525

526526
opal_argv_free (allowed_ifaces);
527527
mca_btl_uct_modex_send ();

opal/mca/btl/uct/btl_uct_rdma.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ static inline int mca_btl_uct_get_rkey (mca_btl_uct_module_t *module,
5555
return rc;
5656
}
5757

58-
#if UCT_API > UCT_VERSION(1, 7)
58+
#if UCT_API >= UCT_VERSION(1, 7)
5959
ucs_status = uct_rkey_unpack (module->uct_component, (void *) remote_handle, rkey);
6060
#else
6161
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,
6565

6666
static inline void mca_btl_uct_rkey_release (mca_btl_uct_module_t *uct_btl, uct_rkey_bundle_t *rkey)
6767
{
68-
#if UCT_API > UCT_VERSION(1, 7)
68+
#if UCT_API >= UCT_VERSION(1, 7)
6969
uct_rkey_release (uct_btl->uct_component, rkey);
7070
#else
7171
(void) uct_btl;

opal/mca/btl/uct/btl_uct_tl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,7 @@ static int mca_btl_uct_evaluate_tl (mca_btl_uct_module_t *module, mca_btl_uct_tl
522522
* come up with a better estimate. */
523523

524524
/* UCT bandwidth is in bytes/sec, BTL is in MB/sec */
525-
#if UCT_API > UCT_VERSION(1, 7)
525+
#if UCT_API >= UCT_VERSION(1, 7)
526526
module->super.btl_bandwidth = (uint32_t) ((MCA_BTL_UCT_TL_ATTR(tl, 0).bandwidth.dedicated +
527527
MCA_BTL_UCT_TL_ATTR(tl, 0).bandwidth.shared /
528528
(opal_process_info.num_local_peers + 1)) / 1048576.0);

0 commit comments

Comments
 (0)