1
1

usnic: put the HWLOC #if's back to preserve compat with v1.10

We try to keep the source code the same between master and v1.10.  So
put the #if's back for OPAL_HAVE_HWLOC (and just hard-code it to 1 on
master) so that this code is also compilable in v1.10.
Этот коммит содержится в:
Jeff Squyres 2015-09-18 11:23:56 -07:00
родитель 01fcfb08fe
Коммит 7cb6c2fcc2
4 изменённых файлов: 18 добавлений и 6 удалений

Просмотреть файл

@ -34,13 +34,18 @@
/* Inclue the progress thread stuff */
# include "opal/runtime/opal_progress_threads.h"
/* Hhwloc is now guaranteed */
# define OPAL_HAVE_HWLOC 1
# define USNIC_OUT opal_btl_base_framework.framework_output
/* JMS Really want to be able to get the job size somehow... But for
now, so that we can compile, just set it to a constant :-( */
# define USNIC_MCW_SIZE 2
# define proc_bound() (NULL != opal_process_info.cpuset ? 1 : 0)
#if OPAL_HAVE_HWLOC
# define proc_bound() (NULL != opal_process_info.cpuset ? 1 : 0)
#else
# define proc_bound() 0
#endif
# define USNIC_BTL_DEFAULT_VERSION(name) MCA_BTL_DEFAULT_VERSION(name)
# define USNIC_SEND_LOCAL des_segments

Просмотреть файл

@ -1,5 +1,5 @@
/*
* Copyright (c) 2013 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2013-2015 Cisco Systems, Inc. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -15,6 +15,8 @@
#include "btl_usnic_module.h"
#if OPAL_HAVE_HWLOC
int opal_btl_usnic_hwloc_distance(opal_btl_usnic_module_t *module);
#endif
#endif /* BTL_USNIC_HWLOC_H */

Просмотреть файл

@ -206,7 +206,7 @@ int opal_btl_usnic_component_register(void)
"grdma", &mca_btl_usnic_component.usnic_mpool_name, 0,
OPAL_INFO_LVL_5));
want_numa_device_assignment = 1;
want_numa_device_assignment = OPAL_HAVE_HWLOC ? 1 : -1;
CHECK(reg_int("want_numa_device_assignment",
"If 1, use only Cisco VIC ports thare are a minimum NUMA distance from the MPI process for short messages. If 0, use all available Cisco VIC ports for short messages. This parameter is meaningless (and ignored) unless MPI proceses are bound to processor cores. Defaults to 1 if NUMA support is included in Open MPI; -1 otherwise.",
want_numa_device_assignment,

Просмотреть файл

@ -15,7 +15,7 @@
* Copyright (c) 2009-2015 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2014 Los Alamos National Security, LLC. All rights
* reserved.
* Copyright (c) 2014-2015 Intel, Inc. All rights reserved
* Copyright (c) 2014 Intel, Inc. All rights reserved
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -1940,6 +1940,7 @@ static void init_connectivity_checker(opal_btl_usnic_module_t *module)
static void init_hwloc(opal_btl_usnic_module_t *module)
{
#if OPAL_HAVE_HWLOC
/* If this process is bound to a single NUMA locality, calculate
its NUMA distance from this usNIC device */
if (mca_btl_usnic_component.want_numa_device_assignment) {
@ -1948,6 +1949,10 @@ static void init_hwloc(opal_btl_usnic_module_t *module)
opal_output_verbose(5, USNIC_OUT,
"btl:usnic: not sorting devices by NUMA distance (MCA btl_usnic_want_numa_device_assignment)");
}
#else
opal_output_verbose(5, USNIC_OUT,
"btl:usnic: not sorting devices by NUMA distance (topology support not included)");
#endif
}
static void init_procs(opal_btl_usnic_module_t *module)