From 12d99a9ebb27404a28654137395a1697bacbd5cb Mon Sep 17 00:00:00 2001 From: Shiqing Fan Date: Fri, 20 Jul 2012 12:14:28 +0000 Subject: [PATCH] Update the hwloc build on Windows and related files. This commit was SVN r26818. --- contrib/Makefile.am | 1 + .../win32/CMakeModules/ompi_configure.cmake | 6 ++-- .../CMakeModules/opal_hwloc_config.cmake | 36 +++++++++++++++++++ .../win32/CMakeModules/setup_fortran.cmake | 15 ++++---- .../win32/include/hwloc/autogen/config.h | 4 +++ .../win32/include/private/autogen/config.h | 2 +- .../base => opal/mca/hwloc/hwloc142}/.windows | 2 +- opal/mca/hwloc/hwloc142/Makefile.am | 3 +- opal/runtime/opal_info_support.h | 3 +- opal/win32/win_compat.h | 4 +++ orte/CMakeLists.txt | 1 + orte/mca/rmaps/base/Makefile.am | 2 -- 12 files changed, 63 insertions(+), 16 deletions(-) create mode 100644 contrib/platform/win32/CMakeModules/opal_hwloc_config.cmake rename {orte/mca/rmaps/base => opal/mca/hwloc/hwloc142}/.windows (87%) diff --git a/contrib/Makefile.am b/contrib/Makefile.am index b2101dc81b..48db7a744f 100644 --- a/contrib/Makefile.am +++ b/contrib/Makefile.am @@ -122,6 +122,7 @@ EXTRA_DIST = \ platform/win32/CMakeModules/fortran_get_sizeof.cmake \ platform/win32/CMakeModules/setup_fortran.cmake \ platform/win32/CMakeModules/fortran_check_real16_c_equiv.cmake \ + platform/win32/CMakeModules/opal_hwloc_config.cmake \ platform/win32/include/hwloc/autogen/config.h \ platform/win32/include/hwloc/bitmap.h \ platform/win32/include/hwloc/cpuset.h \ diff --git a/contrib/platform/win32/CMakeModules/ompi_configure.cmake b/contrib/platform/win32/CMakeModules/ompi_configure.cmake index 1a864aff11..3497d88fe1 100644 --- a/contrib/platform/win32/CMakeModules/ompi_configure.cmake +++ b/contrib/platform/win32/CMakeModules/ompi_configure.cmake @@ -243,11 +243,11 @@ OMPI_DEF_OPT(enable-pretty-print-stacktrace OPAL_WANT_PRETTY_PRINT_STACKTRACE "W OMPI_DEF_OPT(enable-smp-locksb OPAL_WANT_SMP_LOCKS "enable smp locks in atomic ops. Do not disable if code will ever run in SMP or multi-threaded environment. (default: enabled)." ON) -#OMPI_DEF_OPT(OPAL_ENABLE_FT "Enable fault tolerance general components and logic." ON) +OMPI_DEF_OPT(enable-ft OPAL_ENABLE_FT "Enable fault tolerance general components and logic." ON) -#OMPI_DEF_OPT( OPAL_ENABLE_FT_CR "Enable fault tolerance checkpoint/restart components and logic." OFF) +OMPI_DEF_OPT(enable-ft-cr OPAL_ENABLE_FT_CR "Enable fault tolerance checkpoint/restart components and logic." OFF) -#OMPI_DEF_OPT( OPAL_ENABLE_FT_THREAD "Enable fault tolerance thread in Open PAL." OFF) +OMPI_DEF_OPT(enable-ft-thread OPAL_ENABLE_FT_THREAD "Enable fault tolerance thread in Open PAL." OFF) OMPI_DEF_OPT(enable-ipv6 OPAL_ENABLE_IPV6 "Enable IPv6 support, but only if the underlying system supports it. (default: disabled)" OFF) diff --git a/contrib/platform/win32/CMakeModules/opal_hwloc_config.cmake b/contrib/platform/win32/CMakeModules/opal_hwloc_config.cmake new file mode 100644 index 0000000000..c3722baa89 --- /dev/null +++ b/contrib/platform/win32/CMakeModules/opal_hwloc_config.cmake @@ -0,0 +1,36 @@ +# Copyright (c) 2012 High Performance Computing Center Stuttgart, +# University of Stuttgart. All rights reserved. +# $COPYRIGHT$ +# +# Additional copyrights may follow +# +# $HEADER$ +# + + +MESSAGE(STATUS "configure hwloc.") + +STRING(REGEX MATCH "hwloc[0-9]+" hwloc_dir "${CURRENT_PATH}") + +INCLUDE_DIRECTORIES ("${CURRENT_PATH}/" + "${CURRENT_PATH}/../" + "${CURRENT_PATH}/hwloc/include/") + +SET(RESULT_COMPONENT_FILES + ${RESULT_COMPONENT_FILES} + ${CURRENT_PATH}/${hwloc_dir}_component.c + ${CURRENT_PATH}/hwloc/src/bind.c + ${CURRENT_PATH}/hwloc/src/cpuset.c + ${CURRENT_PATH}/hwloc/src/distances.c + ${CURRENT_PATH}/hwloc/src/dolib.c + ${CURRENT_PATH}/hwloc/src/misc.c + ${CURRENT_PATH}/hwloc/src/topology-libpci.c + ${CURRENT_PATH}/hwloc/src/topology-synthetic.c + ${CURRENT_PATH}/hwloc/src/topology-windows.c + ${CURRENT_PATH}/hwloc/src/topology-x86.c + ${CURRENT_PATH}/hwloc/src/topology-xml.c + ${CURRENT_PATH}/hwloc/src/topology.c + ${CURRENT_PATH}/hwloc/src/traversal.c + ) + +SET(RESULT TRUE) \ No newline at end of file diff --git a/contrib/platform/win32/CMakeModules/setup_fortran.cmake b/contrib/platform/win32/CMakeModules/setup_fortran.cmake index f23878fade..2d7ce356b2 100644 --- a/contrib/platform/win32/CMakeModules/setup_fortran.cmake +++ b/contrib/platform/win32/CMakeModules/setup_fortran.cmake @@ -17,6 +17,11 @@ SET(CMAKE_GENERATOR_FC "") include(CMakeDetermineFortranCompiler) include(CMakeFortranInformation) +GET_FILENAME_COMPONENT(FORTRAN_NAME ${CMAKE_Fortran_COMPILER} NAME) +GET_FILENAME_COMPONENT(FORTRAN_PATH ${CMAKE_Fortran_COMPILER} PATH) + +SET(FORTRAN ${FORTRAN_NAME} CACHE INTERNAL "Name of the fortran compiler.") + IF(OMPI_WANT_FORTRAN_BINDINGS AND NOT FORTRAN_SETUP_DONE) SET(OMPI_MPI_INTEGER_KIND 0 CACHE INTERNAL "MPI_INTEGER_KIND") @@ -24,13 +29,6 @@ IF(OMPI_WANT_FORTRAN_BINDINGS AND NOT FORTRAN_SETUP_DONE) SET(OMPI_MPI_OFFSET_KIND 0 CACHE INTERNAL "MPI_OFFSET_KIND") SET(OMPI_FORTRAN_STATUS_SIZE 0 CACHE INTERNAL "MPI_STATUS_SIZE") - GET_FILENAME_COMPONENT(FORTRAN_NAME ${CMAKE_Fortran_COMPILER} NAME) - GET_FILENAME_COMPONENT(FORTRAN_PATH ${CMAKE_Fortran_COMPILER} PATH) - - SET(FORTRAN ${FORTRAN_NAME} CACHE INTERNAL "Name of the fortran compiler.") - - OMPI_DEF(OMPI_FC ${FORTRAN} "The fortran compiler name." 1 1) - OMPI_DEF(OMPI_FC_ABSOLUTE ${CMAKE_Fortran_COMPILER} "The absolute path of the fortran compiler." 1 1) # Default compiler settings. IF(${FORTRAN} STREQUAL "ifort.exe") @@ -147,6 +145,9 @@ ELSEIF(NOT OMPI_WANT_FORTRAN_BINDINGS) UNSET(FORTRAN_SETUP_DONE CACHE) ENDIF(OMPI_WANT_FORTRAN_BINDINGS AND NOT FORTRAN_SETUP_DONE) +OMPI_DEF(OMPI_FC ${FORTRAN} "The fortran compiler name." 1 1) +OMPI_DEF(OMPI_FC_ABSOLUTE ${CMAKE_Fortran_COMPILER} "The absolute path of the fortran compiler." 1 1) + # a few definitions needed by OMPI_FORTRAN_FIND_EXT_SYMBOL_CONVENTION check. OMPI_DEF_VAR(OMPI_FORTRAN_DOUBLE_UNDERSCORE "Whether fortran symbols have a trailing double underscore or not." 0 1) OMPI_DEF_VAR(OMPI_FORTRAN_SINGLE_UNDERSCORE "Whether fortran symbols have a trailing single underscore or not." 0 1) diff --git a/contrib/platform/win32/include/hwloc/autogen/config.h b/contrib/platform/win32/include/hwloc/autogen/config.h index 87bc894cca..011eaa00c9 100644 --- a/contrib/platform/win32/include/hwloc/autogen/config.h +++ b/contrib/platform/win32/include/hwloc/autogen/config.h @@ -161,6 +161,10 @@ #ifdef HWLOC_HAVE_WINDOWS_H +# ifndef WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +# endif + # include typedef DWORDLONG hwloc_uint64_t; diff --git a/contrib/platform/win32/include/private/autogen/config.h b/contrib/platform/win32/include/private/autogen/config.h index ed546fc247..0bdac6d252 100644 --- a/contrib/platform/win32/include/private/autogen/config.h +++ b/contrib/platform/win32/include/private/autogen/config.h @@ -227,7 +227,7 @@ #define HAVE_STRFTIME 1 /* Define to 1 if you have the header file. */ -#define HAVE_STRINGS_H 1 +/* #undef HAVE_STRINGS_H */ /* Define to 1 if you have the header file. */ #define HAVE_STRING_H 1 diff --git a/orte/mca/rmaps/base/.windows b/opal/mca/hwloc/hwloc142/.windows similarity index 87% rename from orte/mca/rmaps/base/.windows rename to opal/mca/hwloc/hwloc142/.windows index 255f55a79e..8c0fc7bf44 100644 --- a/orte/mca/rmaps/base/.windows +++ b/opal/mca/hwloc/hwloc142/.windows @@ -9,4 +9,4 @@ # # Specific to this module -exclude_list=rmaps_base_binding.c +required_check=opal_hwloc_config diff --git a/opal/mca/hwloc/hwloc142/Makefile.am b/opal/mca/hwloc/hwloc142/Makefile.am index 1a312dffef..1a2c6000ec 100644 --- a/opal/mca/hwloc/hwloc142/Makefile.am +++ b/opal/mca/hwloc/hwloc142/Makefile.am @@ -12,7 +12,8 @@ EXTRA_DIST = \ hwloc/doc/README.txt \ hwloc/tests/README.txt \ - hwloc/utils/README.txt + hwloc/utils/README.txt \ + .windows SUBDIRS = hwloc diff --git a/opal/runtime/opal_info_support.h b/opal/runtime/opal_info_support.h index 20befb76ae..1afe62ddf7 100644 --- a/opal/runtime/opal_info_support.h +++ b/opal/runtime/opal_info_support.h @@ -52,7 +52,6 @@ typedef struct { } opal_info_component_map_t; OPAL_DECLSPEC OBJ_CLASS_DECLARATION(opal_info_component_map_t); -END_C_DECLS OPAL_DECLSPEC int opal_info_init(int argc, char **argv, opal_cmd_line_t *opal_info_cmd_line); @@ -105,4 +104,6 @@ OPAL_DECLSPEC void opal_info_out_int(const char *pretty_message, const char *plain_message, int value); +END_C_DECLS + #endif diff --git a/opal/win32/win_compat.h b/opal/win32/win_compat.h index 517e1c0339..fc2f0b7421 100644 --- a/opal/win32/win_compat.h +++ b/opal/win32/win_compat.h @@ -95,6 +95,10 @@ typedef DWORD in_port_t; typedef char* caddr_t; typedef unsigned int uint; +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#endif + #ifdef _MSC_VER #if defined(OMPI_BUILDING) && OMPI_BUILDING #include "opal/win32/ompi_uio.h" diff --git a/orte/CMakeLists.txt b/orte/CMakeLists.txt index 6e4215ef25..dfe3467b5a 100644 --- a/orte/CMakeLists.txt +++ b/orte/CMakeLists.txt @@ -49,6 +49,7 @@ ENDIF(NOT EXISTS ${PROJECT_SOURCE_DIR}/util/hostfile/hostfile_lex.c) INCLUDE (check_mca_subdirs) SET (ORTE_SOURCE_FILES ${ORTE_SOURCE_FILES} ${MCA_FILES}) +list(REMOVE_ITEM ORTE_SOURCE_FILES ${PROJECT_SOURCE_DIR}/runtime/data_type_support/orte_dt_size_fns.c) ADD_LIBRARY (libopen-rte ${ORTE_SOURCE_FILES}) ADD_DEPENDENCIES(libopen-rte libopen-pal) diff --git a/orte/mca/rmaps/base/Makefile.am b/orte/mca/rmaps/base/Makefile.am index 775d4c1e22..2de894a646 100644 --- a/orte/mca/rmaps/base/Makefile.am +++ b/orte/mca/rmaps/base/Makefile.am @@ -19,8 +19,6 @@ # $HEADER$ # -EXTRA_DIST = base/.windows - headers += \ base/base.h