1
1

Merge pull request #6333 from jsquyres/pr/v4.0.x/hwloc-macro-conflict-fixes

v4.0.x: Various minor hwloc cleanups
Этот коммит содержится в:
Howard Pritchard 2019-02-12 09:13:19 -07:00 коммит произвёл GitHub
родитель e9cef8c80f a247292275
Коммит 0b915b7e56
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
6 изменённых файлов: 43 добавлений и 7 удалений

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

@ -5,6 +5,8 @@
# Copyright (c) 2011-2015 INRIA. All rights reserved.
# Copyright (c) 2011-2015 Université Bordeaux 1
# Copyright (c) 2017 IBM Corporation. All rights reserved.
# Copyright (c) 2019 Research Organization for Information Science
# and Technology (RIST). All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
@ -67,3 +69,5 @@ noinst_LTLIBRARIES = $(lib)
libmca_topo_treematch_la_SOURCES = $(lib_sources)
libmca_topo_treematch_la_LDFLAGS = -module -avoid-version
distclean-local:
rm -f config.h

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

@ -6,7 +6,9 @@
# Copyright (c) 2011-2015 INRIA. All rights reserved.
# Copyright (c) 2011-2015 Universite Bordeaux 1
# Copyright (c) 2015 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2015 Intel, Inc. All rights reserved.
# Copyright (c) 2015 Intel, Inc. All rights reserved.
# Copyright (c) 2019 Research Organization for Information Science
# and Technology (RIST). All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
@ -77,7 +79,21 @@ AC_DEFUN([MCA_ompi_topo_treematch_CONFIG], [
[ompi_topo_treematch_happy=1])])])
AS_IF([test $ompi_topo_treematch_happy -eq 1],
[$1],
[AS_IF([test "x$treematch_files_local" = "xyes"],
[AS_IF([! test -d $OMPI_TOP_BUILDDIR/ompi/mca/topo/treematch],
[mkdir -p $OMPI_TOP_BUILDDIR/ompi/mca/topo/treematch])
cat > $OMPI_TOP_BUILDDIR/ompi/mca/topo/treematch/config.h << EOF
/*
* This file is automatically generated by configure. Edits will be lost
*
* This is an dummy config.h in order to prevent the embedded treematch from using
* the config.h from the embedded hwloc
*
* see https://github.com/open-mpi/ompi/pull/6185#issuecomment-458807930
*/
EOF
])
$1],
[AS_IF([test ! -z "$with_treematch" && test "$with_treematch" != "no"],
[AC_MSG_ERROR([TreeMatch support requested but not found. Aborting])])
$2])

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

@ -260,7 +260,6 @@
including stdint.h */
#define __STDC_LIMIT_MACROS
#endif
#include "opal_config.h"
#include "opal_stdint.h"
/***********************************************************************

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

@ -96,7 +96,7 @@ int opal_hwloc_unpack(opal_buffer_t *buffer, void *dest,
free(xmlbuffer);
goto cleanup;
}
if (0 != hwloc_topology_set_xmlbuffer(t, xmlbuffer, strlen(xmlbuffer))) {
if (0 != hwloc_topology_set_xmlbuffer(t, xmlbuffer, strlen(xmlbuffer)+1)) {
rc = OPAL_ERROR;
free(xmlbuffer);
hwloc_topology_destroy(t);

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

@ -364,7 +364,7 @@ int opal_hwloc_base_get_topology(void)
free(val);
return OPAL_ERROR;
}
if (0 != hwloc_topology_set_xmlbuffer(opal_hwloc_topology, val, strlen(val))) {
if (0 != hwloc_topology_set_xmlbuffer(opal_hwloc_topology, val, strlen(val)+1)) {
free(val);
hwloc_topology_destroy(opal_hwloc_topology);
return OPAL_ERROR;

21
opal/mca/hwloc/external/external.h поставляемый
Просмотреть файл

@ -1,6 +1,6 @@
/*
* Copyright (c) 2011-2017 Cisco Systems, Inc. All rights reserved
* Copyright (c) 2016 Research Organization for Information Science
* Copyright (c) 2011-2019 Cisco Systems, Inc. All rights reserved
* Copyright (c) 2016-2019 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
*
* Copyright (c) 2016-2017 Intel, Inc. All rights reserved.
@ -21,6 +21,23 @@
BEGIN_C_DECLS
#include <opal_config.h>
/* Top-level configure will always configure the embedded hwloc
* component, even if we already know that we'll be using an external
* hwloc (because of complicated reasons). A side-effect of this is
* that the embedded hwloc will AC_DEFINE HWLOC_VERSION (and friends)
* in opal_config.h. If the external hwloc defines a different value
* of HWLOC_VERSION (etc.), we'll get zillions of warnings about the
* two HWLOC_VERSION values not matching. Hence, we undefined all of
* them here (so that the external <hwloc.h> can define them to
* whatever it wants). */
#undef HWLOC_VERSION
#undef HWLOC_VERSION_MAJOR
#undef HWLOC_VERSION_MINOR
#undef HWLOC_VERSION_RELEASE
#undef HWLOC_VERSION_GREEK
#include MCA_hwloc_external_header
/* If the including file requested it, also include the hwloc verbs