|
1 | 1 | /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ |
2 | 2 | /* |
3 | | - * Copyright (c) 2013-2016 Cisco Systems, Inc. All rights reserved. |
| 3 | + * Copyright (c) 2013-2018 Cisco Systems, Inc. All rights reserved |
4 | 4 | * Copyright (c) 2015 Los Alamos National Security, LLC. All rights |
5 | 5 | * reserved. |
6 | 6 | * Copyright (c) 2018 Intel, Inc. All rights reserved. |
|
18 | 18 | #define BTL_USNIC_COMPAT_H |
19 | 19 |
|
20 | 20 | #include "opal/mca/rcache/rcache.h" |
| 21 | +#include "opal/mca/btl/btl.h" |
21 | 22 |
|
22 | 23 | /************************************************************************/ |
23 | 24 |
|
|
76 | 77 | # define USNIC_PUT_REMOTE des_segments |
77 | 78 | # define USNIC_PUT_REMOTE_COUNT des_segments_count |
78 | 79 |
|
79 | | -# define BTL_VERSION 310 |
| 80 | +// Starting after Open MPI v3.1.0, the BTL_VERSION macro was defined |
| 81 | +// by btl.h (it'll likely get into v4.0.0 -- don't know if this change |
| 82 | +// will migrate to the v3.x.y branches). So if BTL_VERSION is already |
| 83 | +// defined, then we don't need to define it again. As of this writing |
| 84 | +// (Feb 2018), this set of defines works fine with BTL v3.0.0 and |
| 85 | +// v3.1.0. So we'll set the BTL version to the minimium acceptable |
| 86 | +// value: 3.0.0. |
| 87 | +# if !defined(BTL_VERSION) |
| 88 | +# define BTL_VERSION 300 |
| 89 | +# endif |
80 | 90 |
|
81 | 91 | # define USNIC_COMPAT_FREE_LIST_GET(list, item) \ |
82 | 92 | (item) = opal_free_list_get((list)) |
@@ -297,8 +307,6 @@ struct mca_btl_base_endpoint_t; |
297 | 307 |
|
298 | 308 | #if BTL_VERSION == 20 |
299 | 309 |
|
300 | | -#include "ompi/mca/btl/btl.h" |
301 | | - |
302 | 310 | /* This function changed signature in BTL 3.0 */ |
303 | 311 | mca_btl_base_descriptor_t* |
304 | 312 | opal_btl_usnic_prepare_src( |
@@ -335,9 +343,7 @@ opal_btl_usnic_put( |
335 | 343 | /* BTL 3.0 (i.e., >=v1.9, but listed separately because these are |
336 | 344 | really BTL API issues) */ |
337 | 345 |
|
338 | | -#elif BTL_VERSION == 310 |
339 | | - |
340 | | -#include "opal/mca/btl/btl.h" |
| 346 | +#elif BTL_VERSION >= 300 |
341 | 347 |
|
342 | 348 | /* This function changed signature compared to BTL 2.0 */ |
343 | 349 | struct mca_btl_base_descriptor_t * |
|
0 commit comments