1
1

First cut at removing the native Windows support. Remove all the Windows-specific components, and the .windows files sprinkled around. Remove the Windows platform files and MTT scripts. Update the NEWS to point Windows users to the cygwin package.

This commit was SVN r28116.
Этот коммит содержится в:
Ralph Castain 2013-02-26 20:44:56 +00:00
родитель 9479635e31
Коммит 8d2fa3693b
268 изменённых файлов: 13 добавлений и 41106 удалений

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

@ -1,182 +0,0 @@
#
# Copyright (c) 2007-2011 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# Check the CMake version
IF(WIN32)
CMAKE_MINIMUM_REQUIRED(VERSION 2.4.6 FATAL_ERROR)
ELSE(WIN32)
MESSAGE( FATAL_ERROR "Only support Windows. Aborting.")
ENDIF(WIN32)
# create top-level target(solution file)
PROJECT("OpenMPI" C CXX)
IF(MSVC)
SET(WINDOWS_VS TRUE CACHE INTERNAL "Windows Visual Studio env")
IF(CMAKE_CL_64)
SET(COMPILER_TYPE "x64")
ELSE(CMAKE_CL_64)
SET(COMPILER_TYPE "win32")
ENDIF(CMAKE_CL_64)
ELSEIF("${CMAKE_GENERATOR}" STREQUAL "MSYS Makefiles")
SET(WINDOWS_MINGW TRUE CACHE INTERNAL "Windows MSYS env")
ENDIF(MSVC)
SET (OpenMPI_VERSION $(OpenMPI_MAJOR_VERSION).$(OpenMPI_MINOR_VERSION).$(OpenMPI_PATCH_VERSION))
SET (CMAKE_MODULE_PATH "${OpenMPI_SOURCE_DIR}/contrib/platform/win32/CMakeModules;${CMAKE_MODULE_PATH}")
# default to debug-builds
IF (NOT CMAKE_BUILD_TYPE)
SET (CMAKE_BUILD_TYPE Debug CACHE STRING
"Choose the type of build, options are: None, Debug, Release, RelWithDebInfo and MinSizeRel." FORCE)
ENDIF (NOT CMAKE_BUILD_TYPE)
STRING(TOLOWER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE)
IF(${CMAKE_BUILD_TYPE} STREQUAL "debug")
SET(OMPI_DEBUG_BUILD 1)
# add debug-suffix to distinguish between debug and release version libraries.
SET(CMAKE_DEBUG_POSTFIX "d")
OPTION(WANT_EXE_DEBUG_POSTFIX "Whether we want postfix for executables" OFF)
IF(WANT_EXE_DEBUG_POSTFIX)
SET(OMPI_EXE_DEBUG_POSTFIX "d")
ENDIF(WANT_EXE_DEBUG_POSTFIX)
ENDIF(${CMAKE_BUILD_TYPE} STREQUAL "debug")
# preset install dir
IF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
SET(CMAKE_INSTALL_PREFIX "${PROJECT_SOURCE_DIR}/installed" CACHE PATH "CMAKE_INSTALL_PREFIX" FORCE)
ENDIF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
# Make the include path visible to all targets
INCLUDE_DIRECTORIES (
${OpenMPI_SOURCE_DIR}/contrib/platform/win32/include
${OpenMPI_SOURCE_DIR}/
${OpenMPI_SOURCE_DIR}/opal
${OpenMPI_SOURCE_DIR}/opal/mca/hwloc
${OpenMPI_SOURCE_DIR}/opal/include
${OpenMPI_SOURCE_DIR}/ompi
${OpenMPI_SOURCE_DIR}/ompi/include
${OpenMPI_SOURCE_DIR}/orte
${OpenMPI_SOURCE_DIR}/orte/include
${OpenMPI_BINARY_DIR}/
${OpenMPI_BINARY_DIR}/opal
${OpenMPI_BINARY_DIR}/opal/include
${OpenMPI_BINARY_DIR}/ompi
${OpenMPI_BINARY_DIR}/ompi/include
${OpenMPI_BINARY_DIR}/orte
${OpenMPI_BINARY_DIR}/orte/include
)
# Output directroies for binaries and libraries.
SET (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${OpenMPI_BINARY_DIR})
SET (CMAKE_LIBRARY_OUTPUT_DIRECTORY ${OpenMPI_BINARY_DIR})
SET (CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${OpenMPI_BINARY_DIR})
# get rid of VS-project file reloading after "cleanup" or "rebuild"
SET (CMAKE_SUPPRESS_REGENERATION true)
# Dynamic/shared build, the default is set to static(OFF)
OPTION(BUILD_SHARED_LIBS "Whether we want to build shared libraries." ON)
#store current environment variables
SET(PATH_OLD "$ENV{PATH}")
SET(LIB_OLD "$ENV{LIB}")
SET(INCLUDE_OLD "$ENV{INCLUDE}")
INCLUDE(ompi_configure)
BEGIN_CONFIGURE()
# find flex command
INCLUDE (find_flex)
FIND_FLEX()
ADD_SUBDIRECTORY(opal)
# set up the libevent and hwloc include dirs
INCLUDE_DIRECTORIES (${LIBEVENT_INCLUDE_DIRS} ${HWLOC_PATH}/hwloc/include)
ADD_SUBDIRECTORY(ompi)
ADD_SUBDIRECTORY(orte)
ADD_SUBDIRECTORY(contrib/platform/win32/examples)
END_CONFIGURE()
#restore environment variables
SET(ENV{PATH} "${PATH_OLD}")
SET(ENV{LIB} "${LIB_OLD}")
SET(ENV{INCLUDE} "${INCLUDE_OLD}")
# By default, do not warn when built on machines using only VS Express
IF(NOT DEFINED CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS)
SET(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS ON)
ENDIF(NOT DEFINED CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS)
INCLUDE(InstallRequiredSystemLibraries)
# CPACK settings
#SET(CPACK_PACKAGE_NAME "Open MPI")
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Open MPI")
SET(CPACK_PACKAGE_VENDOR "Open MPI")
SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README")
SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE")
SET(CPACK_PACKAGE_VERSION_MAJOR "${MAJOR_VERSION}")
SET(CPACK_PACKAGE_VERSION_MINOR "${MINOR_VERSION}")
SET(CPACK_PACKAGE_VERSION_PATCH "${RELEASE_VERSION}")
IF(${RELEASE_VERSION} EQUAL 0)
SET(OpenMPI_version "${MAJOR_VERSION}.${MINOR_VERSION}")
ELSE(${RELEASE_VERSION} EQUAL 0)
SET(OpenMPI_version "${MAJOR_VERSION}.${MINOR_VERSION}.${RELEASE_VERSION}")
ENDIF(${RELEASE_VERSION} EQUAL 0)
SET(CPACK_PACKAGE_INSTALL_DIRECTORY "OpenMPI_v${OpenMPI_version}-${COMPILER_TYPE}")
SET(CPACK_PACKAGE_FILE_NAME "OpenMPI_v${OpenMPI_version}-${COMPILER_TYPE}-${CMAKE_BUILD_TYPE}")
SET(CPACK_INSTALLED_DIRECTORIES "${CMAKE_INSTALL_PREFIX}" ".")
SET(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "Open MPI")
SET(CPACK_SOURCE_PACKAGE_FILE_NAME "OpenMPI-${OpenMPI_version}")
#SET(CPACK_SOURCE_INSTALLED_DIRECTORIES "${CMAKE_CURRENT_SOURCE_DIR}")
#There is a bug in NSI that does not handle full unix paths properly. Make
# sure there is at least one set of four (4) backlasshes.
# SET(CPACK_PACKAGE_ICON "${CMake_SOURCE_DIR}/Utilities/Release\\\\InstallIcon.bmp")
# SET(CPACK_NSIS_INSTALLED_ICON_NAME "bin\\\\MyExecutable.exe")
SET(CPACK_NSIS_DISPLAY_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY} OpenMPI")
SET(CPACK_NSIS_HELP_LINK "http:\\\\\\\\www.open-mpi.org")
SET(CPACK_NSIS_URL_INFO_ABOUT "http:\\\\\\\\www.open-mpi.org")
# SET(CPACK_NSIS_CONTACT "me@my-personal-home-page.com")
# SET(CPACK_PACKAGE_EXECUTABLES "MyExecutable" "My Executable")
SET(CPACK_NSIS_MODIFY_PATH ON)
SET(CPACK_SOURCE_ZIP ON)
SET(CPACK_BINARY_ZIP ON)
# setup the register entries when install
SET(CPACK_NSIS_EXTRA_INSTALL_COMMANDS ${CPACK_NSIS_EXTRA_INSTALL_COMMANDS} "
WriteRegStr HKLM \\\"SOFTWARE\\\\${CPACK_PACKAGE_VENDOR}\\\" \\\"OPENMPI_HOME\\\" \\\"$INSTDIR\\\"
")
# delete the register entries when uninstall
SET(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS ${CPACK_NSIS_EXTRA_INSTALL_COMMANDS} "
DeleteRegKey HKLM \\\"SOFTWARE\\\\${CPACK_PACKAGE_VENDOR}\\\"
")
# (un)install icons
#SET(CPACK_NSIS_MUI_ICON "${CMAKE_SOURCE_DIR}/contrib/platform/win32/open-mpi-logo.ico")
#SET(CPACK_NSIS_MUI_UNIICON "${CMAKE_SOURCE_DIR}/contrib/platform/win32/uninstall.ico")
INCLUDE(CPack)

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

@ -10,7 +10,7 @@
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2006-2010 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2012 Los Alamos National Security, Inc. All rights reserved.
# Copyright (c) 2012-2013 Los Alamos National Security, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
@ -20,7 +20,7 @@
SUBDIRS = config contrib $(MCA_PROJECT_SUBDIRS) test
EXTRA_DIST = README INSTALL VERSION Doxyfile LICENSE autogen.pl autogen.sh \
CMakeLists.txt README.WINDOWS.txt README.JAVA.txt
README.JAVA.txt
include examples/Makefile.include

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

@ -12,7 +12,7 @@ Copyright (c) 2006-2013 Cisco Systems, Inc. All rights reserved.
Copyright (c) 2006 Voltaire, Inc. All rights reserved.
Copyright (c) 2006 Sun Microsystems, Inc. All rights reserved.
Use is subject to license terms.
Copyright (c) 2006-2007 Los Alamos National Security, LLC. All rights
Copyright (c) 2006-2013 Los Alamos National Security, LLC. All rights
reserved.
Copyright (c) 2010-2012 IBM Corporation. All rights reserved.
Copyright (c) 2012 Oak Ridge National Labs. All rights reserved.
@ -70,6 +70,9 @@ Trunk (not on release branches yet)
- Extended filem framework to support scalable pre-positioning of
files for use by applications, adding new "raw" component that
transmits files across the daemon network
- Native Windows support has been removed. A cygwin package is
available from that group for Windows-based use.
- Added MPI Java bindings
1.7
@ -106,7 +109,6 @@ Trunk (not on release branches yet)
in assigning process locations and bindings
- Added the -novm option to preserve the prior launch behavior
- Added new MCA parameter to provide protection against IO forwarding backlog
- Added MPI Java bindings
1.6.4

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

@ -12,6 +12,7 @@
# Copyright (c) 2009 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2010 IBM Corporation. All rights reserved.
# Copyright (c) 2010-2011 Oak Ridge National Labs. All rights reserved.
# Copyright (c) 2013 Los Alamos National Security, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
@ -95,45 +96,6 @@ EXTRA_DIST = \
platform/lanl/tlcc2/optimized-panasas.conf \
platform/snl/portals4-m5 \
platform/snl/portals4-orte \
platform/win32/CMakeModules/check_bool.cmake \
platform/win32/CMakeModules/check_c_inline.cmake \
platform/win32/CMakeModules/check_c_type_exists.cmake \
platform/win32/CMakeModules/check_mca_subdirs.cmake \
platform/win32/CMakeModules/ompi_base_checks.cmake \
platform/win32/CMakeModules/ompi_define.cmake \
platform/win32/CMakeModules/ompi_ext_config.cmake \
platform/win32/CMakeModules/find_ccp.cmake \
platform/win32/CMakeModules/find_flex.cmake \
platform/win32/CMakeModules/find_libltdl.cmake \
platform/win32/CMakeModules/find_ofed_sdk.cmake \
platform/win32/CMakeModules/find_winverbs.cmake \
platform/win32/CMakeModules/generate_version_file.cmake \
platform/win32/CMakeModules/get_c_alignment.cmake \
platform/win32/CMakeModules/list_subdirs.cmake \
platform/win32/CMakeModules/ompi_check_Microsoft.cmake \
platform/win32/CMakeModules/ompi_check_MinGW.cmake \
platform/win32/CMakeModules/ompi_configure.cmake \
platform/win32/CMakeModules/ompi_find_type.cmake \
platform/win32/CMakeModules/opal_event_config.cmake \
platform/win32/CMakeModules/opal_get_version.cmake \
platform/win32/CMakeModules/opal_functions.cmake \
platform/win32/ConfigFiles/revision.in \
platform/win32/CMakeModules/fortran_get_value_true.cmake \
platform/win32/CMakeModules/fortran_check.cmake \
platform/win32/CMakeModules/fortran_get_alignment.cmake \
platform/win32/CMakeModules/fortran_check_type.cmake \
platform/win32/CMakeModules/fortran_find_ext_symbol_convention.cmake \
platform/win32/CMakeModules/fortran_get_fortran_handle_max.cmake \
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/private/autogen/config.h \
platform/win32/examples/CMakeLists.txt \
platform/win32/examples/chello/CMakeLists.txt \
platform/win32/examples/chello/chello.vcxproj \
platform/win32/examples/chello/chello.c \
platform/cisco/macosx-dynamic \
platform/cisco/macosx-dynamic.conf \
platform/cisco/linux \

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

@ -1,56 +0,0 @@
#
# Copyright (c) 2010 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# check compiler support of bool and
# possibly get its size and alignment
MACRO(OMPI_CHECK_BOOL)
FOREACH(LANG c cxx)
STRING(TOUPPER ${LANG} LANG_U)
IF(NOT DEFINED SIZEOF_${LANG_U}_BOOL)
MESSAGE( STATUS "Checking size of ${LANG} bool...")
FILE (WRITE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/check_sizeof_bool.${LANG}"
"#include <stdio.h>
int main() {return sizeof(bool);}
")
TRY_RUN(SIZEOF_${LANG_U}_BOOL COMPILE_RESULT "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/"
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/check_sizeof_bool.${LANG}")
IF(SIZEOF_${LANG_U}_BOOL GREATER 0)
MESSAGE(STATUS "Checking size of ${LANG} bool...${SIZEOF_${LANG_U}_BOOL}")
C_GET_ALIGNMENT(bool ${LANG} BOOL)
SET(OPAL_ALIGNMENT_${LANG_U}_BOOL ${OPAL_ALIGNMENT_BOOL} CACHE INTERNAL "Sizeof ${LANG} bool.")
ELSE(SIZEOF_${LANG_U}_BOOL GREATER 0)
MESSAGE(STATUS "Checking size of ${LANG} bool...failed")
SET(SIZEOF_${LANG_U}_BOOL 1 CACHE INTERNAL "Sizeof ${LANG} bool.")
SET(OPAL_ALIGNMENT_${LANG_U}_BOOL 1 CACHE INTERNAL "Sizeof ${LANG} bool.")
SET(OPAL_NEED_${LANG_U}_BOOL 1 CACHE INTERNAL "true if compiler doesn't support bool.")
ENDIF(SIZEOF_${LANG_U}_BOOL GREATER 0)
ENDIF(NOT DEFINED SIZEOF_${LANG_U}_BOOL)
OMPI_DEF_VAR(OPAL_NEED_${LANG_U}_BOOL
"Define to 1 if the C compiler doesn't support bool\n without any other help (such as <stdbool.h>)." 0 0)
OMPI_DEF_VAR(SIZEOF_${LANG_U}_BOOL "The size of ${LANG} `bool'." 0 1)
OMPI_DEF_VAR(OPAL_ALIGNMENT_${LANG_U}_BOOL "Alignment of ${LANG} `bool'." 0 1)
ENDFOREACH(LANG c cxx)
# Opal defines these without language type....
OMPI_DEF(SIZEOF_BOOL 1 "The size of `bool'." 0 1)
OMPI_DEF(OPAL_ALIGNMENT_BOOL 1 "Sizeof bool." 0 1)
ENDMACRO(OMPI_CHECK_BOOL)

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

@ -1,54 +0,0 @@
#
# Copyright (c) 2007-2010 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
MACRO(CHECK_C_INLINE)
#
# Return the inline definition string.
#
IF(NOT HAVE_INLINE)
# path of foo test programs
SET (FOO_SOURCE_DIR ${OpenMPI_SOURCE_DIR}/CMakeTests)
MESSAGE( STATUS "Check inline definition...")
FOREACH(KEYWORD "inline" "__inline__" "__inline")
SET(HAVE_INLINE FALSE)
FILE(WRITE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/test_inline.c"
"typedef int foo_t;
static inline foo_t static_foo(){return 0;}
foo_t foo(){return 0;}
int main(int argc, char *argv[]){return 0;}
")
TRY_COMPILE(C_HAS_${KEYWORD} "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CMakeTmp/"
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/test_inline.c"
COMPILE_DEFINITIONS "-Dinline=${KEYWORD}")
IF(C_HAS_${KEYWORD})
SET(HAVE_INLINE TRUE CACHE INTERNAL "have 'inline' definition")
SET(INLINE_STRING ${KEYWORD} CACHE INTERNAL "'inline' definition")
MESSAGE( STATUS "Checking inline definition...${INLINE_STRING}")
BREAK()
ENDIF(C_HAS_${KEYWORD})
ENDFOREACH(KEYWORD)
IF(NOT HAVE_INLINE)
MESSAGE(FATAL_ERROR "Check inline definition...failed. Cannot continue.")
ENDIF(NOT HAVE_INLINE)
ENDIF(NOT HAVE_INLINE)
OMPI_DEF(inline ${INLINE_STRING} "Define to `__inline__' or `__inline'." 0 1)
ENDMACRO(CHECK_C_INLINE)

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

@ -1,57 +0,0 @@
#
# Copyright (c) 2007-2010 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
#
# Some data types are defined in SDK headers, but the SDK include path
# is only reachable from Visual Studio ENV. So try to compile and run a test
# program to check if the data types is defined in SDK headers.
# If the type is defined, also return the size of the type.
#
# TYPE: the type to check
# TYPE_NAME: the uppercase of the type, with underlines if necessary.
# INCLUDE_HEADERS: the header files defines the type.
#
# HAVE_${TYPE_NAME}: if type is found, this value is define as 1.
# SIZEOF_${TYPE_NAME}: size of the type.
MACRO(CHECK_C_TYPE_EXISTS TYPE TYPE_NAME INCLUDE_HEADERS)
IF(NOT ${TYPE_NAME}_CHECK_DONE)
MESSAGE( STATUS "Checking for ${TYPE}...")
SET(INCLUDE "")
FOREACH(HEADER ${INCLUDE_HEADERS})
SET(INCLUDE ${INCLUDE} "#include <${HEADER}>\n")
ENDFOREACH(HEADER ${INCLUDE_HEADERS})
STRING(REPLACE ";" "" INCLUDE ${INCLUDE})
FILE(WRITE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/check_${TYPE_NAME}.c"
"${INCLUDE}
int main(){ ${TYPE} test; return sizeof(${TYPE});}")
TRY_RUN(SIZEOF_${TYPE_NAME} COMPILE_RESULT "${CMAKE_BINARY_DIR}"
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/check_${TYPE_NAME}.c")
IF(SIZEOF_${TYPE_NAME} GREATER 0)
SET(HAVE_${TYPE_NAME} 1 CACHE INTERNAL "HAVE_${TYPE_NAME}")
MESSAGE( STATUS "Checking for ${TYPE}...done")
ELSE(SIZEOF_${TYPE_NAME} GREATER 0)
SET(HAVE_${TYPE_NAME} 0 CACHE INTERNAL "HAVE_${TYPE_NAME}")
MESSAGE( STATUS "Checking for ${TYPE}...failed")
ENDIF(SIZEOF_${TYPE_NAME} GREATER 0)
SET(${TYPE_NAME}_CHECK_DONE 1 CACHE INTERNAL "${TYPE_NAME} check finished.")
ENDIF(NOT ${TYPE_NAME}_CHECK_DONE)
OMPI_DEF(HAVE_${TYPE_NAME} ${HAVE_${TYPE_NAME}} "Define to 1 if you have the `${TYPE_NAME}' type in ${INCLUDE_HEADERS}" 0 0)
ENDMACRO(CHECK_C_TYPE_EXISTS TYPE TYPE_NAME INCLUDE_HEADERS)

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

@ -1,343 +0,0 @@
# Copyright (c) 2007-2012 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
INCLUDE(list_subdirs)
# there are several steps and issues for checking mca components:
#
# 1. go through each framwork dir, add the top-level headers
# to the source list.
#
# 2. go through each component dir, the framwork base dir is checked
# also in this setp, and is added to the source list.
#
# 2a. if a .windows file exists in a framwork base dir, that means there
# might be properties that have to be checked for this dir, e.g. files
# need to be excluded.
#
# 2b. if a .windows file exists in a component dir, this component
# should be included in the solution. There could be properties that
# need to check for this component. If it's a static build or not a
# DSO shared build, just add necessary sources; if it is a DSO build,
# generate a proper CMakeLists.txt file for each component, so that
# this component will be compiled separately.
#
# 3. Generate static-components.h file with available mca components.
#
#
# Available properties in .windows files:
#
# exclude_list: files that need to be excluded from the solution.
#
# required_check: a CMake module has to be run to check the libraries/headers
# that needed by this component. The check might return two
# variables: RESULT_INCLUDE_PATH, RESULT_LINK_LIBRARIES and RESULT_SOURCE_FILES.
# RESULT_INCLUDE_PATH is handled in this macro, and RESULT_LINK_LIBRARIES
# is handled in upper layer.
#
# not_single_shared_lib: this component should not be built separately, it's not
# a single mca shared library.
#
# mca_link_libraries: this component has to be linked with other targets or libraries,
# e.g. Ws2_32.lib
# mca_priority: priority of the mca component.
SET(MCA_FRAMEWORK_LIST "")
CHECK_SUBDIRS("${PROJECT_SOURCE_DIR}/mca" MCA_FRAMEWORK_LIST)
#MESSAGE("MCA_FRAMEWORK_LIST:${MCA_FRAMEWORK_LIST}")
LIST(REMOVE_ITEM MCA_FRAMEWORK_LIST "bcol")
FILE(GLOB ${PROJECT_NAME}_MCA_HEADER_FILES "mca/*.C" "mca/*.h")
SET(${PROJECT_NAME}_MCA_FILES ${${PROJECT_NAME}_MCA_FILES} ${${PROJECT_NAME}_MCA_HEADER_FILES})
SOURCE_GROUP(mca FILES ${${PROJECT_NAME}_MCA_HEADER_FILES})
# clear the variables first
SET(MCA_FRAMEWORK "")
SET(MCA_FRAMEWORK_FILES "")
SET(MCA_FILES "")
# parse each mca subdir
FOREACH (MCA_FRAMEWORK ${MCA_FRAMEWORK_LIST})
IF(NOT ${MCA_FRAMEWORK} STREQUAL "CMakeFiles" AND NOT ${MCA_FRAMEWORK} STREQUAL "svn")
#SET(CURRENT_PATH "mca/${${PROJECT_NAME}_MCA_SUBDIR}")
FILE(GLOB MCA_FRAMEWORK_FILES "mca/${MCA_FRAMEWORK}/*.c" "mca/${MCA_FRAMEWORK}/*.h"
"mca/${MCA_FRAMEWORK}/*.cc" "mca/${MCA_FRAMEWORK}/*.cpp")
SET(MCA_FILES ${MCA_FILES} ${MCA_FRAMEWORK_FILES})
SOURCE_GROUP(mca\\${MCA_FRAMEWORK} FILES ${MCA_FRAMEWORK_FILES})
SET(COMPONENT_LIST "")
CHECK_SUBDIRS("${PROJECT_SOURCE_DIR}/mca/${MCA_FRAMEWORK}" COMPONENT_LIST)
SET(CURRENT_COMPONENT_PRIORITY "")
SET(MCA_PRIORITY_LIST "")
# parse each component subdir of current mca framework
FOREACH (MCA_COMPONENT ${COMPONENT_LIST})
IF(${MCA_COMPONENT} STREQUAL "base")
SET(CURRENT_PATH "${PROJECT_SOURCE_DIR}/mca/${MCA_FRAMEWORK}/base")
FILE(GLOB MCA_FRAMEWORK_BASE_FILES "${CURRENT_PATH}/*.c" "${CURRENT_PATH}/*.h"
"${CURRENT_PATH}/*.cc" "${CURRENT_PATH}/*.cpp")
IF(EXISTS "${CURRENT_PATH}/.windows")
#MESSAGE("MCA_FRAMEWORK_BASE_FILES:${MCA_FRAMEWORK_BASE_FILES}")
SET(EXCLUDE_LIST "")
FILE(STRINGS ${CURRENT_PATH}/.windows EXCLUDE_LIST REGEX "^exclude_list=")
IF(NOT EXCLUDE_LIST STREQUAL "")
STRING(REPLACE "exclude_list=" "" EXCLUDE_LIST ${EXCLUDE_LIST})
ENDIF(NOT EXCLUDE_LIST STREQUAL "")
# remove the files in the exclude list
FOREACH(FILE ${EXCLUDE_LIST})
LIST(REMOVE_ITEM MCA_FRAMEWORK_BASE_FILES "${CURRENT_PATH}/${FILE}")
ENDFOREACH(FILE)
ENDIF(EXISTS "${CURRENT_PATH}/.windows")
SET_SOURCE_FILES_PROPERTIES(${PROJECT_BINARY_DIR}/mca/${MCA_FRAMEWORK}/base/static-components.h
PROPERTIES GENERATED true)
SET(MCA_FRAMEWORK_BASE_FILES ${MCA_FRAMEWORK_BASE_FILES}
${PROJECT_BINARY_DIR}/mca/${MCA_FRAMEWORK}/base/static-components.h)
SET(MCA_FILES ${MCA_FILES} ${MCA_FRAMEWORK_BASE_FILES})
SOURCE_GROUP(mca\\${MCA_FRAMEWORK}\\base FILES ${MCA_FRAMEWORK_BASE_FILES})
# Install help files if they are here.
INSTALL(DIRECTORY ${CURRENT_PATH}/ DESTINATION share/openmpi/
FILES_MATCHING PATTERN "*.txt"
PATTERN ".svn" EXCLUDE
PATTERN ".hg" EXCLUDE)
ELSEIF(EXISTS "${PROJECT_SOURCE_DIR}/mca/${MCA_FRAMEWORK}/${MCA_COMPONENT}/.windows")
UNSET(COMPONENT_FILES)
UNSET(APPEND_FILES)
SET(CURRENT_PATH ${PROJECT_SOURCE_DIR}/mca/${MCA_FRAMEWORK}/${MCA_COMPONENT})
# by default, build this component.
SET(BUILD_COMPONENT TRUE)
# do we have to run a check module first?
SET(REQUIRED_CHECK "")
FILE(STRINGS ${CURRENT_PATH}/.windows REQUIRED_CHECK REGEX "^required_check=")
SET(EXTRA_INCLUDE_PATH "")
IF(NOT REQUIRED_CHECK STREQUAL "")
STRING(REPLACE "required_check=" "" REQUIRED_CHECK ${REQUIRED_CHECK})
UNSET(RESULT_APPEND_FILES)
UNSET(RESULT_COMPONENT_FILES)
UNSET(RESULT_INCLUDE_PATH)
UNSET(RESULT_LINK_LIBRARIES)
INCLUDE(${REQUIRED_CHECK})
IF(RESULT)
SET(COMPONENT_FILES ${COMPONENT_FILES} ${RESULT_COMPONENT_FILES})
SET(APPEND_FILES ${RESULT_APPEND_FILES})
SET(EXTRA_INCLUDE_PATH ${RESULT_INCLUDE_PATH})
# these extra libraries will be set up in up layer, e.g. ompi
SET(EXTRA_LINK_LIBRARIES ${EXTRA_LINK_LIBRARIES} ${RESULT_LINK_LIBRARIES})
ELSE(RESULT)
# Required check failed, don't build this component.
SET(BUILD_COMPONENT FALSE)
ENDIF(RESULT)
ENDIF(NOT REQUIRED_CHECK STREQUAL "")
IF(BUILD_COMPONENT)
#check exclude list
SET(EXCLUDE_LIST "")
FILE(STRINGS ${CURRENT_PATH}/.windows EXCLUDE_LIST REGEX "^exclude_list=")
IF(NOT EXCLUDE_LIST STREQUAL "")
STRING(REPLACE "exclude_list=" "" EXCLUDE_LIST ${EXCLUDE_LIST})
FILE(GLOB_RECURSE RESULT_FILES "${CURRENT_PATH}/*.C" "${CURRENT_PATH}/*.h"
"${CURRENT_PATH}/*.cc" "${CURRENT_PATH}/*.cpp")
# remove the files in the exclude list
FOREACH(FILE ${EXCLUDE_LIST})
LIST(REMOVE_ITEM RESULT_FILES "${CURRENT_PATH}/${FILE}")
ENDFOREACH(FILE)
# append the rest of the files to the main list
SET(COMPONENT_FILES ${COMPONENT_FILES} ${RESULT_FILES})
ENDIF(NOT EXCLUDE_LIST STREQUAL "")
IF(NOT COMPONENT_FILES)
FILE(GLOB_RECURSE COMPONENT_FILES "${CURRENT_PATH}/*.C" "${CURRENT_PATH}/*.h")
ENDIF(NOT COMPONENT_FILES)
IF(APPEND_FILES)
SET(COMPONENT_FILES ${COMPONENT_FILES} ${APPEND_FILES})
ENDIF(APPEND_FILES)
# check the library build type
FILE(STRINGS ${CURRENT_PATH}/.windows
VALUE REGEX "^not_single_shared_lib=")
IF(NOT VALUE STREQUAL "")
STRING(REPLACE "not_single_shared_lib=" "" NOT_SINGLE_SHARED_LIB ${VALUE})
ENDIF(NOT VALUE STREQUAL "")
IF(NOT OPAL_WANT_LIBLTDL OR NOT_SINGLE_SHARED_LIB STREQUAL "1")
SET(NOT_SINGLE_SHARED_LIB "")
# add sources for static build or for the shared build when this is not a stand along library.
SET(MCA_FILES ${MCA_FILES} ${COMPONENT_FILES})
SOURCE_GROUP(mca\\${MCA_FRAMEWORK}\\${MCA_COMPONENT} FILES ${COMPONENT_FILES})
INCLUDE_DIRECTORIES(${EXTRA_INCLUDE_PATH})
IF(EXISTS "${CURRENT_PATH}/configure.params")
FILE(STRINGS ${CURRENT_PATH}/configure.params
CURRENT_COMPONENT_PRIORITY REGEX "PRIORITY")
ELSE(EXISTS "${CURRENT_PATH}/configure.params")
FILE(STRINGS ${CURRENT_PATH}/.windows
CURRENT_COMPONENT_PRIORITY REGEX "^mca_priority=")
ENDIF(EXISTS "${CURRENT_PATH}/configure.params")
IF(NOT CURRENT_COMPONENT_PRIORITY STREQUAL "")
STRING(REGEX REPLACE "[A-Z_a-z]+=" "" CURRENT_COMPONENT_PRIORITY ${CURRENT_COMPONENT_PRIORITY})
ENDIF(NOT CURRENT_COMPONENT_PRIORITY STREQUAL "")
SET(MCA_PRIORITY_LIST ${MCA_PRIORITY_LIST} "${CURRENT_COMPONENT_PRIORITY}:${MCA_COMPONENT}")
ELSE(NOT OPAL_WANT_LIBLTDL OR NOT_SINGLE_SHARED_LIB STREQUAL "1")
# get the libraries required for this component.
SET(MCA_LINK_LIBRARIES "")
FILE(STRINGS ${CURRENT_PATH}/.windows VALUE REGEX "^mca_link_libraries=")
IF(NOT VALUE STREQUAL "")
STRING(REPLACE "mca_link_libraries=" "" MCA_LINK_LIBRARIES ${VALUE})
ENDIF(NOT VALUE STREQUAL "")
# the mca_common_* libraries should be installed into bin,
# this will avoid the runtime open module failure.
IF("${MCA_FRAMEWORK}" STREQUAL "common")
SET(LIB_NAME_PREFIX "lib")
SET(INSTALL_DEST "RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib")
SET(PDB_DEST "bin")
ELSE("${MCA_FRAMEWORK}" STREQUAL "common")
SET(LIB_NAME_PREFIX "")
IF(OMPI_DEBUG_BUILD)
SET(INSTALL_DEST "RUNTIME DESTINATION lib/openmpi/debug
LIBRARY DESTINATION lib/openmpi/debug
ARCHIVE DESTINATION lib/openmpi/debug")
SET(PDB_DEST "lib/openmpi/debug")
ELSE(OMPI_DEBUG_BUILD)
SET(INSTALL_DEST "RUNTIME DESTINATION lib/openmpi
LIBRARY DESTINATION lib/openmpi
ARCHIVE DESTINATION lib/openmpi")
ENDIF(OMPI_DEBUG_BUILD)
ENDIF("${MCA_FRAMEWORK}" STREQUAL "common")
# generate CMakeLists.txt for each component for DSO build.
FILE (WRITE "${PROJECT_BINARY_DIR}/mca/${MCA_FRAMEWORK}/${MCA_COMPONENT}/CMakeLists.txt"
"
#
# Copyright (c) 2007-2008 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# make new project for shared build
INCLUDE_DIRECTORIES(\${EXTRA_INCLUDE_PATH})
ADD_LIBRARY(${LIB_NAME_PREFIX}mca_${MCA_FRAMEWORK}_${MCA_COMPONENT} SHARED
\${COMPONENT_FILES})
SET_TARGET_PROPERTIES(${LIB_NAME_PREFIX}mca_${MCA_FRAMEWORK}_${MCA_COMPONENT}
PROPERTIES COMPILE_FLAGS \"-D_USRDLL -DOPAL_IMPORTS -DOMPI_IMPORTS -DORTE_IMPORTS /TP\")
TARGET_LINK_LIBRARIES (${LIB_NAME_PREFIX}mca_${MCA_FRAMEWORK}_${MCA_COMPONENT}
libopen-pal ${MCA_LINK_LIBRARIES} ${EXTRA_LINK_LIBRARIES})
INSTALL(TARGETS ${LIB_NAME_PREFIX}mca_${MCA_FRAMEWORK}_${MCA_COMPONENT} ${INSTALL_DEST})
IF (OMPI_DEBUG_BUILD)
INSTALL(FILES ${OpenMPI_BINARY_DIR}/Debug/${LIB_NAME_PREFIX}mca_${MCA_FRAMEWORK}_${MCA_COMPONENT}${CMAKE_DEBUG_POSTFIX}.pdb
DESTINATION ${PDB_DEST})
ENDIF (OMPI_DEBUG_BUILD)
")
ADD_SUBDIRECTORY (${PROJECT_BINARY_DIR}/mca/${MCA_FRAMEWORK}/${MCA_COMPONENT} mca/${MCA_FRAMEWORK}/${MCA_COMPONENT})
# for single dll, reset these two variables for the next component.
UNSET(EXTRA_INCLUDE_PATH)
UNSET(EXTRA_LINK_LIBRARIES)
ENDIF(NOT OPAL_WANT_LIBLTDL OR NOT_SINGLE_SHARED_LIB STREQUAL "1")
# Install help files if they are here.
INSTALL(DIRECTORY ${CURRENT_PATH}/ DESTINATION share/openmpi/
FILES_MATCHING PATTERN "*.txt"
PATTERN "hwloc" EXCLUDE
PATTERN "libevent" EXCLUDE
PATTERN ".svn" EXCLUDE
PATTERN ".hg" EXCLUDE)
ENDIF(BUILD_COMPONENT)
ENDIF(${MCA_COMPONENT} STREQUAL "base")
ENDFOREACH(MCA_COMPONENT)
# generate the correct order of the components.
LIST(SORT MCA_PRIORITY_LIST)
FOREACH(MCA_COMPONENT ${MCA_PRIORITY_LIST})
STRING(REGEX REPLACE "[0-9]*:" "" COMPONENT_NAME ${MCA_COMPONENT})
SET (OUTFILE_EXTERN
"extern const mca_base_component_t mca_${MCA_FRAMEWORK}_${COMPONENT_NAME}_component"
"\n${OUTFILE_EXTERN}")
SET(FRAMEWORK_STRUCT_DEF
"&mca_${MCA_FRAMEWORK}_${COMPONENT_NAME}_component,\n"
${FRAMEWORK_STRUCT_DEF})
SET(BEST_COMPONENT_PRIORITY ${CURRENT_COMPONENT_PRIORITY})
ENDFOREACH(MCA_COMPONENT ${MCA_PRIORITY_LIST})
STRING(LENGTH "${FRAMEWORK_STRUCT_DEF}" STRUCT_STRING_LENTH)
IF(STRUCT_STRING_LENTH GREATER 0)
STRING (REPLACE ";" "" OUTFILE_STRUCT ${FRAMEWORK_STRUCT_DEF})
ENDIF(STRUCT_STRING_LENTH GREATER 0)
# write out static-component.h for this mca.
FILE(WRITE "${PROJECT_BINARY_DIR}/mca/${MCA_FRAMEWORK}/base/static-components.h"
"/*
* $HEADER$
*/
#if defined(c_plusplus) || defined(__cplusplus)
extern \"C\" {
#endif
${OUTFILE_EXTERN}
const mca_base_component_t *mca_${MCA_FRAMEWORK}_base_static_components[] = {
${OUTFILE_STRUCT}
NULL
};
#if defined(c_plusplus) || defined(__cplusplus)
}
#endif
")
SET(OUTFILE_EXTERN "")
SET(OUTFILE_STRUCT "")
SET(FRAMEWORK_STRUCT_DEF "")
ENDIF(NOT ${MCA_FRAMEWORK} STREQUAL "CMakeFiles" AND NOT ${MCA_FRAMEWORK} STREQUAL "svn")
ENDFOREACH (MCA_FRAMEWORK)

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

@ -1,42 +0,0 @@
# Copyright (c) 2009 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# The CCP components need to import the type library ccpapi.tlb,
# if it's not installed, the CCP components won't be built.
# This module is included in a .windows file, it must return two variables:
# RESULT : find result
# RESULT_INCLUDE_PATH : the path need to include if RESULT is true
IF(NOT ORTE_WANT_CCP)
SET(RESULT FALSE)
ELSEIF(NOT CCP_FOUND)
MESSAGE(STATUS "looking for ccp...")
IF(CMAKE_CL_64)
FIND_PATH(CCP_LIB_PATH ccpapi.tlb PATHS $ENV{CCP_LIB64} )
ELSE(CMAKE_CL_64)
FIND_PATH(CCP_LIB_PATH ccpapi.tlb PATHS $ENV{CCP_LIB32} )
ENDIF(CMAKE_CL_64)
IF(CCP_LIB_PATH)
SET(CCP_FOUND TRUE CACHE INTERNAL "find result of CCP.")
SET(RESULT TRUE)
SET(RESULT_INCLUDE_PATH ${CCP_LIB_PATH})
MESSAGE(STATUS "looking for ccp...found.")
ELSE(CCP_LIB_PATH)
SET(CCP_FOUND FALSE CACHE INTERNAL "find result of CCP.")
SET(RESULT FALSE)
MESSAGE(STATUS "looking for ccp...not found.")
ENDIF(CCP_LIB_PATH)
ELSE(NOT CCP_FOUND)
SET(RESULT_INCLUDE_PATH ${CCP_LIB_PATH})
SET(RESULT TRUE)
ENDIF(NOT ORTE_WANT_CCP)

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

@ -1,106 +0,0 @@
#
# Copyright (c) 2007-2009 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
#
# FLEX_FOUND - system has Flex
# FLEX_EXECUTABLE - path of the flex executable
# FLEX_VERSION - the version string, like "2.5.31"
#
MACRO(FIND_FLEX)
IF(NOT FLEX_FOUND)
MESSAGE(STATUS "Check for working flex...")
# first find out if it's already installed somewhere
FIND_PROGRAM(FLEX_EXECUTABLE_SYS NAMES flex)
IF (WIN32)
IF(FLEX_EXECUTABLE_SYS)
SET(FLEX_EXECUTABLE ${FLEX_EXECUTABLE_SYS} CACHE FILEPATH "Flex")
ELSE(FLEX_EXECUTABLE_SYS)
IF(EXISTS ${CMAKE_SOURCE_DIR}/contrib/platform/win32/bin/flex.exe)
# in case that no flex is installed, use our own version
SET(FLEX_EXECUTABLE "${CMAKE_SOURCE_DIR}/contrib/platform/win32/bin/flex.exe" CACHE FILEPATH "Flex")
ENDIF(EXISTS ${CMAKE_SOURCE_DIR}/contrib/platform/win32/bin/flex.exe)
ENDIF(FLEX_EXECUTABLE_SYS)
ELSE(WIN32)
# nothing to do here at moment.
ENDIF(WIN32)
IF(FLEX_EXECUTABLE)
SET(FLEX_FOUND TRUE CACHE INTERNAL "found flex")
EXECUTE_PROCESS(COMMAND ${FLEX_EXECUTABLE} --version
OUTPUT_VARIABLE _FLEX_VERSION
)
STRING (REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]+" FLEX_VERSION "${_FLEX_VERSION}")
ENDIF(FLEX_EXECUTABLE)
IF(FLEX_FOUND)
IF(NOT Flex_FIND_QUIETLY)
MESSAGE(STATUS "Check for working flex...done")
ENDIF(NOT Flex_FIND_QUIETLY)
ELSE(FLEX_FOUND)
IF(Flex_FIND_REQUIRED)
MESSAGE(STATUS "Check for working flex...failed")
ENDIF(Flex_FIND_REQUIRED)
ENDIF(FLEX_FOUND)
ENDIF(NOT FLEX_FOUND)
ENDMACRO(FIND_FLEX)
#
# Generate the corresponding C file from the lex file,
# and add it in to the source list for the target.
#
MACRO(ADD_FLEX_FILE _sourcelist _source _prefix _output_dir)
GET_FILENAME_COMPONENT(_in ${_source} ABSOLUTE)
GET_FILENAME_COMPONENT(_basename ${_source} NAME_WE)
STRING(LENGTH "${_prefix}" _prefix_length)
IF(NOT _prefix_length EQUAL 0)
SET(_out ${_output_dir}/${_basename}.c)
SET(_args -P${_prefix})
ELSE(NOT _prefix_length EQUAL 0)
SET(_out ${_output_dir}/${_basename}.c)
ENDIF(NOT _prefix_length EQUAL 0)
#MESSAGE("${FLEX_EXECUTABLE} -o${_out} ${_args} ${_in}")
IF(NOT DEFINED ${_basename}_DONE)
MESSAGE(STATUS "parse ${_basename} with flex...")
FILE(MAKE_DIRECTORY ${_output_dir})
EXECUTE_PROCESS(
COMMAND ${FLEX_EXECUTABLE} -o${_out} ${_args} ${_in}
OUTPUT_VARIABLE OUTPUT
RESULT_VARIABLE RESULT
ERROR_VARIABLE ERROR
)
IF (NOT ${RESULT} STREQUAL "1")
MESSAGE(STATUS "${ERROR}parse ${_basename} with flex...done")
ELSE (NOT ${RESULT} STREQUAL "1")
MESSAGE(FATAL_ERROR "${ERROR}parse ${_basename} with flex...failed")
ENDIF (NOT ${RESULT} STREQUAL "1")
SET(${_basename}_DONE TRUE CACHE INTERNAL "${_basename} flex parse done")
ENDIF(NOT DEFINED ${_basename}_DONE)
SET(${_sourcelist} ${${_sourcelist}} ${_out} )
SET_SOURCE_FILES_PROPERTIES(${_out} PROPERTIES COMPILE_DEFINITIONS YY_NO_UNISTD_H)
ENDMACRO(ADD_FLEX_FILE)

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

@ -1,53 +0,0 @@
#
# Copyright (c) 2009-2010 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
#
# LIBLTDL_PATH - path to libltdl dir
# LIBLTDL_LIB_PATH - path to ltdl.lib
# LIBLTDL_INCLUDE_PATH - path to ltdl.h
# LIBLTDL_FOUND - system has Libltdl
#
SET(LIBLTDL_PATH "" CACHE PATH "Path to libltdl root directory.")
IF(NOT OPAL_WANT_LIBLTDL)
SET(LIBLTDL_FOUND FALSE CACHE INTERNAL "find result of libltdl.")
ELSE(NOT OPAL_WANT_LIBLTDL)
IF(NOT LIBLTDL_FOUND OR NOT "${LIBLTDL_PATH}" STREQUAL "${LIBLTDL_OLD_PATH}")
MESSAGE(STATUS "looking for libltdl...")
# set the default search path
IF("${LIBLTDL_PATH}" STREQUAL "")
SET(CHECK_PATH "$ENV{ProgramFiles}/GnuWin32")
ELSE("${LIBLTDL_PATH}" STREQUAL "")
SET(CHECK_PATH ${LIBLTDL_PATH})
ENDIF("${LIBLTDL_PATH}" STREQUAL "")
# clear the old find results and start a new search
UNSET(LIBLTDL_INCLUDE_PATH CACHE)
UNSET(LIBLTDL_LIB_PATH CACHE)
FIND_FILE(LIBLTDL_LIB ltdl.lib PATHS ${CHECK_PATH}/lib)
FIND_PATH(LIBLTDL_INCLUDE_PATH ltdl.h PATHS ${CHECK_PATH}/include)
IF(LIBLTDL_LIB AND LIBLTDL_INCLUDE_PATH)
SET(LIBLTDL_FOUND TRUE CACHE INTERNAL "find result of libltdl.")
SET(LIBLTDL_OLD_PATH ${LIBLTDL_PATH} CACHE INTERNAL "Store the old libltdl path.")
MESSAGE(STATUS "looking for libltdl...found.")
ELSE(LIBLTDL_LIB AND LIBLTDL_INCLUDE_PATH)
SET(LIBLTDL_FOUND FALSE CACHE INTERNAL "find result of libltdl.")
MESSAGE(STATUS "looking for libltdl...failed.")
ENDIF(LIBLTDL_LIB AND LIBLTDL_INCLUDE_PATH)
ENDIF(NOT LIBLTDL_FOUND OR NOT "${LIBLTDL_PATH}" STREQUAL "${LIBLTDL_OLD_PATH}")
ENDIF(NOT OPAL_WANT_LIBLTDL)

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

@ -1,97 +0,0 @@
# Copyright (c) 2010 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# Find OFED SDK headers and libraries.
#
# OFED_SDK_PATH - path to OFED SDK dir
# OFED_SDK_INCLUDE_PATH - path to verbs.h
# OFED_SDK_FOUND - system has OFED SDK
#
# This module is included in a .windows file, it must return two variables:
# RESULT : find result
# RESULT_INCLUDE_PATH : the path need to include if RESULT is true
# RESULT_LINK_LIBRARIES : libraries need to be linked
IF(NOT OMPI_WANT_OFED)
SET(RESULT FALSE)
ELSE(NOT OMPI_WANT_OFED)
SET(OFED_SDK_PATH "" CACHE PATH
"Path to OFED SDK root directory, if not in system path, has to be set manually by user.")
#generate the lex file, if it's not there
IF(NOT EXISTS ${PROJECT_SOURCE_DIR}/mca/btl/openib/btl_openib_lex.c)
ADD_FLEX_FILE(OPAL_SOURCE_FILES ./mca/btl/openib/btl_openib_lex.l
btl_openib_ini_yy "${PROJECT_BINARY_DIR}/mca/btl/openib/")
SET(RESULT_APPEND_FILES ${PROJECT_BINARY_DIR}/mca/btl/openib/btl_openib_lex.c)
ENDIF(NOT EXISTS ${PROJECT_SOURCE_DIR}/mca/btl/openib/btl_openib_lex.c)
IF(NOT OFED_SDK_FOUND)
MESSAGE(STATUS "looking for OFED SDK...")
# set the default search path
IF("${OFED_SDK_PATH}" STREQUAL "")
SET(OFED_SDK_PATH "$ENV{SystemDrive}/OFED_SDK")
ENDIF("${OFED_SDK_PATH}" STREQUAL "")
# clear the old find results and start a new search
UNSET(OFED_SDK_INCLUDE_PATH)
UNSET(OFED_SDK_LIBIBVERBS)
FIND_PATH(OFED_SDK_INCLUDE_PATH NAMES verbs.h PATHS ${OFED_SDK_PATH}/Inc/infiniband
DOC "Path to OFED SDK include directory, will be detected automatically.")
FIND_LIBRARY(OFED_SDK_LIBIBVERBS libibverbs PATHS ${OFED_SDK_PATH}/Lib
DOC "Path to OFED SDK libraries directory, will be detected automatically.")
FIND_LIBRARY(OFED_SDK_LIBRDMACM librdmacm PATHS ${OFED_SDK_PATH}/Lib
DOC "Path to OFED SDK libraries directory, will be detected automatically.")
IF(OFED_SDK_INCLUDE_PATH AND OFED_SDK_LIBIBVERBS)
SET(OFED_SDK_FOUND TRUE CACHE INTERNAL "find result of OFED SDK.")
SET(RESULT_INCLUDE_PATH ${OFED_SDK_INCLUDE_PATH}/..;${PROJECT_SOURCE_DIR}/mca/btl/openib)
SET(RESULT_LINK_LIBRARIES ${OFED_SDK_LIBIBVERBS} ${OFED_SDK_LIBRDMACM})
SET(RESULT TRUE)
MESSAGE(STATUS "looking for OFED SDK...found.")
UNSET(CMAKE_REQUIRED_INCLUDES)
UNSET(CMAKE_REQUIRED_LIBRARIES)
SET(CMAKE_REQUIRED_INCLUDES ${OFED_SDK_PATH}/Inc/infiniband/verbs.h ${OFED_SDK_PATH}/Inc/infiniband/sa.h)
SET(CMAKE_REQUIRED_LIBRARIES ${OFED_SDK_PATH}/Lib/libibverbs.lib ${OFED_SDK_PATH}/Lib/librdmacm.lib)
OMPI_CHECK_FUNCTION_EXISTS(ibv_fork_init HAVE_IBV_FORK_INIT)
OMPI_CHECK_FUNCTION_EXISTS(ibv_get_device_list HAVE_IBV_GET_DEVICE_LIST)
OMPI_CHECK_FUNCTION_EXISTS(ibv_resize_cq HAVE_IBV_RESIZE_CQ)
OMPI_CHECK_SYMBOL_EXISTS(IBV_EVENT_CLIENT_REREGISTER "" HAVE_DECL_IBV_EVENT_CLIENT_REREGISTER)
INSTALL(FILES ${PROJECT_SOURCE_DIR}/mca/btl/openib/mca-btl-openib-device-params.ini
${PROJECT_SOURCE_DIR}/mca/btl/openib/help-mpi-btl-openib.txt
DESTINATION share/openmpi)
ELSE(OFED_SDK_INCLUDE_PATH AND OFED_SDK_LIBIBVERBS)
SET(OFED_SDK_FOUND FALSE CACHE INTERNAL "find result of OFED SDK.")
SET(RESULT FALSE)
MESSAGE(STATUS "looking for OFED SDK...not found.")
ENDIF(OFED_SDK_INCLUDE_PATH AND OFED_SDK_LIBIBVERBS)
ELSE(NOT OFED_SDK_FOUND)
SET(RESULT_INCLUDE_PATH ${OFED_SDK_INCLUDE_PATH}/..;${OpenMPI_SOURCE_DIR}/ompi/mca/btl/openib)
SET(RESULT_LINK_LIBRARIES ${OFED_SDK_LIBIBVERBS} ${OFED_SDK_LIBRDMACM})
SET(RESULT TRUE)
INSTALL(FILES ${PROJECT_SOURCE_DIR}/mca/btl/openib/mca-btl-openib-device-params.ini
${PROJECT_SOURCE_DIR}/mca/btl/openib/help-mpi-btl-openib.txt
DESTINATION share/openmpi)
ENDIF(NOT OFED_SDK_FOUND)
ENDIF(NOT OMPI_WANT_OFED)

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

@ -1,83 +0,0 @@
# Copyright (c) 2010 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# Find OFED SDK Winverbs headers and libraries.
#
# WINVERBS_PATH - path to OFED SDK dir
# WINVERBS_INCLUDE_PATH - path to verbs.h
# WINVERBS_FOUND - system has OFED SDK
#
# This module is included in a .windows file, it must return two variables:
# RESULT : find result
# RESULT_INCLUDE_PATH : the path need to include if RESULT is true
# RESULT_LINK_LIBRARIES : libraries need to be linked
IF(NOT OMPI_WANT_WINVERBS)
SET(RESULT FALSE)
ELSE(NOT OMPI_WANT_WINVERBS)
SET(WINVERBS_PATH "" CACHE PATH
"Path to OFED SDK WINVERBS root directory, if not in system path, has to be set manually by user.")
#generate the lex file, if it's not there
IF(NOT EXISTS ${PROJECT_SOURCE_DIR}/mca/btl/wv/btl_wv_lex.c)
ADD_FLEX_FILE(OPAL_SOURCE_FILES ./mca/btl/wv/btl_wv_lex.l
btl_wv_ini_yy "${PROJECT_BINARY_DIR}/mca/btl/wv/")
SET(RESULT_APPEND_FILES ${PROJECT_BINARY_DIR}/mca/btl/wv/btl_wv_lex.c)
ENDIF(NOT EXISTS ${PROJECT_SOURCE_DIR}/mca/btl/wv/btl_wv_lex.c)
IF(NOT WINVERBS_FOUND)
MESSAGE(STATUS "looking for Winverbs...")
# set the default search path
IF("${WINVERBS_PATH}" STREQUAL "")
SET(WINVERBS_PATH "$ENV{SystemDrive}/OFED_SDK")
ENDIF("${WINVERBS_PATH}" STREQUAL "")
# clear the old find results and start a new search
UNSET(WINVERBS_INCLUDE_PATH)
UNSET(WINVERBS_LIB)
FIND_PATH(WINVERBS_INCLUDE_PATH NAMES winverbs.h PATHS ${WINVERBS_PATH}/Inc/rdma
DOC "Path to Winverbs include directory, will be detected automatically.")
FIND_LIBRARY(WINVERBS_LIB winverbs PATHS ${WINVERBS_PATH}/Lib
DOC "Path to OFED SDK libraries directory, will be detected automatically.")
IF(WINVERBS_INCLUDE_PATH AND WINVERBS_LIB)
SET(WINVERBS_FOUND TRUE CACHE INTERNAL "find result of Winverbs.")
SET(RESULT_INCLUDE_PATH ${WINVERBS_INCLUDE_PATH}/..;${PROJECT_SOURCE_DIR}/mca/btl/wv)
SET(RESULT_LINK_LIBRARIES ${WINVERBS_LIB})
SET(RESULT TRUE)
MESSAGE(STATUS "looking for Winverbs...found.")
INSTALL(FILES ${PROJECT_SOURCE_DIR}/mca/btl/wv/mca-btl-wv-device-params.ini
${PROJECT_SOURCE_DIR}/mca/btl/wv/help-mpi-btl-wv.txt
DESTINATION share/openmpi)
ELSE(WINVERBS_INCLUDE_PATH AND WINVERBS_LIBIBVERBS)
SET(WINVERBS_FOUND FALSE CACHE INTERNAL "find result of Winverbs.")
SET(RESULT FALSE)
MESSAGE(STATUS "looking for Winverbs...not found.")
ENDIF(WINVERBS_INCLUDE_PATH AND WINVERBS_LIB)
ELSE(NOT WINVERBS_FOUND)
SET(RESULT_INCLUDE_PATH ${WINVERBS_INCLUDE_PATH}/..;${OpenMPI_SOURCE_DIR}/ompi/mca/btl/wv)
SET(RESULT_LINK_LIBRARIES ${WINVERBS_LIB})
SET(RESULT TRUE)
INSTALL(FILES ${PROJECT_SOURCE_DIR}/mca/btl/wv/mca-btl-wv-device-params.ini
${PROJECT_SOURCE_DIR}/mca/btl/wv/help-mpi-btl-wv.txt
DESTINATION share/openmpi)
ENDIF(NOT WINVERBS_FOUND)
ENDIF(NOT OMPI_WANT_WINVERBS)

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

@ -1,114 +0,0 @@
# Copyright (c) 2008-2010 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
#
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# OMPI_FORTRAN_CHECK(Fortran type, c type required,
# types to search, expected size)
#----------------------------------------------------------
# Check Fortran type, including:
# - whether compiler supports or not
# - size of type
# - equal to expected size
# - alignment
# - associated C type
#
# types to search is a list of values
MACRO(OMPI_FORTRAN_CHECK FORTRAN_TYPE C_TYPE TYPE_LIST EXPECTED_SIZE)
STRING(REPLACE "*" "" TYPE_NAME ${FORTRAN_TYPE})
STRING(REPLACE " " "_" TYPE_NAME ${TYPE_NAME})
STRING(TOLOWER ${TYPE_NAME} TYPE_NAME_L)
INCLUDE(FORTRAN_check_type)
INCLUDE(FORTRAN_get_alignment)
INCLUDE(FORTRAN_get_sizeof)
INCLUDE(ompi_find_type)
SET(ofc_expected_size ${EXPECTED_SIZE})
SET(ofc_have_type 0)
SET(ofc_type_size ${SIZEOF_INT})
SET(ofc_type_alignment ${SIZEOF_INT})
SET(ofc_c_type ${ompi_fortran_bogus_type_t})
IF(OMPI_WANT_FORTRAN_BINDINGS)
IF(NOT DEFINED FORTRAN_SETUP_${TYPE_NAME}_DONE)
OMPI_FORTRAN_CHECK_TYPE(${FORTRAN_TYPE} ofc_have_type)
IF(ofc_have_type)
# What is the size of this type?
# NOTE: Some Fortran compilers actually will return that a
# type exists even if it doesn't support it -- the compiler
# will automatically convert the unsupported type to a type
# that it *does* support. For example, if you try to use
# INTEGER*16 and the compiler doesn't support it, it may well
# automatically convert it to INTEGER*8 for you (!). So we
# have to check the actual size of the type once we determine
# that the compiler doesn't error if we try to use it
# (i.e,. the compiler *might* support that type). If the size
# doesn't match the expected size, then the compiler doesn't
# really support it.
OMPI_FORTRAN_GET_SIZEOF(${FORTRAN_TYPE} ofc_type_size)
IF(NOT ${ofc_expected_size} STREQUAL "-1" AND NOT ${ofc_type_size} EQUAL "${ofc_expected_size}")
MESSAGE(STATUS "*** Fortran 77 ${FORTRAN_TYPE} does not have expected size!")
MESSAGE(STATUS "*** Expected ${ofc_expected_size}, got ${ofc_type_size}")
MESSAGE(STATUS "*** Disabling MPI support for Fortran 77 ${FORTRAN_TYPE}")
SET(ofc_have_type 0)
ELSE(NOT ${ofc_expected_size} STREQUAL "-1" AND NOT ${ofc_type_size} EQUAL "${ofc_expected_size}")
# Look for a corresponding C type (will abort by itself if the
# type isn't found and we need it)
IF(NOT "${TYPE_LIST}" STREQUAL "")
OMPI_FIND_TYPE(${FORTRAN_TYPE} "${TYPE_LIST}" ${C_TYPE} ${ofc_type_size} ofc_c_type)
ENDIF(NOT "${TYPE_LIST}" STREQUAL "")
OMPI_FORTRAN_GET_ALIGNMENT(${FORTRAN_TYPE} ofc_type_alignment)
ENDIF(NOT ${ofc_expected_size} STREQUAL "-1" AND NOT ${ofc_type_size} EQUAL "${ofc_expected_size}")
SET(FORTRAN_SETUP_${TYPE_NAME}_DONE TRUE CACHE INTERNAL "FORTRAN ${TYPE_NAME} check done or not.")
ENDIF(ofc_have_type)
SET(OMPI_HAVE_FORTRAN_${TYPE_NAME}_C ${ofc_have_type} CACHE INTERNAL "OMPI_HAVE_FORTRAN_${TYPE_NAME}")
SET(OMPI_SIZEOF_FORTRAN_${TYPE_NAME}_C ${ofc_type_size} CACHE INTERNAL "OMPI_SIZEOF_FORTRAN_${TYPE_NAME}")
SET(OMPI_ALIGNMENT_FORTRAN_${TYPE_NAME}_C ${ofc_type_alignment} CACHE INTERNAL "OMPI_ALIGNMENT_FORTRAN_${TYPE_NAME}")
ENDIF(NOT DEFINED FORTRAN_SETUP_${TYPE_NAME}_DONE)
SET(OMPI_HAVE_FORTRAN_${TYPE_NAME} ${OMPI_HAVE_FORTRAN_${TYPE_NAME}_C}
CACHE INTERNAL "OMPI_HAVE_FORTRAN_${TYPE_NAME}")
SET(OMPI_SIZEOF_FORTRAN_${TYPE_NAME} ${OMPI_SIZEOF_FORTRAN_${TYPE_NAME}_C}
CACHE INTERNAL "OMPI_SIZEOF_FORTRAN_${TYPE_NAME}")
SET(OMPI_ALIGNMENT_FORTRAN_${TYPE_NAME} ${OMPI_ALIGNMENT_FORTRAN_${TYPE_NAME}_C}
CACHE INTERNAL "OMPI_ALIGNMENT_FORTRAN_${TYPE_NAME}")
ELSEIF(NOT OMPI_WANT_FORTRAN_BINDINGS)
UNSET(FORTRAN_SETUP_${TYPE_NAME}_DONE)
SET(OMPI_HAVE_FORTRAN_${TYPE_NAME} ${ofc_have_type} CACHE INTERNAL "OMPI_HAVE_FORTRAN_${TYPE_NAME}")
SET(OMPI_SIZEOF_FORTRAN_${TYPE_NAME} ${ofc_type_size} CACHE INTERNAL "OMPI_SIZEOF_FORTRAN_${TYPE_NAME}")
SET(OMPI_ALIGNMENT_FORTRAN_${TYPE_NAME} ${ofc_type_alignment} CACHE INTERNAL "OMPI_ALIGNMENT_FORTRAN_${TYPE_NAME}")
ENDIF(OMPI_WANT_FORTRAN_BINDINGS)
IF(NOT "${TYPE_LIST}" STREQUAL "")
SET(ompi_fortran_${TYPE_NAME_L}_t ${ofc_c_type} CACHE INTERNAL "ompi_fortran_${TYPE_NAME_L}_t")
ENDIF(NOT "${TYPE_LIST}" STREQUAL "")
#MESSAGE("OMPI_HAVE_FORTRAN_${TYPE_NAME}:${OMPI_HAVE_FORTRAN_${TYPE_NAME}}")
#MESSAGE("OMPI_SIZEOF_FORTRAN_${TYPE_NAME}:${OMPI_SIZEOF_FORTRAN_${TYPE_NAME}}")
#MESSAGE("OMPI_ALIGNMENT_FORTRAN_${TYPE_NAME}:${OMPI_ALIGNMENT_FORTRAN_${TYPE_NAME}}")
#MESSAGE("ompi_fortran_${TYPE_NAME_L}_t:${ompi_fortran_${TYPE_NAME_L}_t}")
OMPI_DEF_VAR(OMPI_HAVE_FORTRAN_${TYPE_NAME} "Whether we have Fortran 77 `${FORTRAN_TYPE}' or not." 0 1)
OMPI_DEF_VAR(OMPI_SIZEOF_FORTRAN_${TYPE_NAME} "Size of Fortran 77 `${FORTRAN_TYPE}'." 0 1)
OMPI_DEF_VAR(OMPI_ALIGNMENT_FORTRAN_${TYPE_NAME} "Alignment of Fortran 77 `${FORTRAN_TYPE}'." 0 1)
OMPI_DEF_VAR(ompi_fortran_${TYPE_NAME_L}_t "C type corresponding to Fortran 77 `${FORTRAN_TYPE}'." 0 0)
ENDMACRO(OMPI_FORTRAN_CHECK FORTRAN_TYPE C_TYPE TYPE_LIST EXPECTED_SIZE)

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

@ -1,99 +0,0 @@
# Copyright (c) 2008-2010 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
#
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# OMPI_FORTRAN_CHECK_REAL16_C_EQUIV
# ----------------------------------------------------
MACRO(OMPI_FORTRAN_CHECK_REAL16_C_EQUIV)
SET(OMPI_REAL16_MATCHES_C 0)
IF(OMPI_WANT_FORTRAN_BINDINGS AND OMPI_HAVE_FORTRAN_REAL16 AND NOT DEFINED REAL16_MATCHES_CHECK_DONE)
IF(NOT ${ompi_fortran_real16_t} STREQUAL "")
STRING(TOUPPER ${ompi_fortran_real16_t} REAL16_C_TYPE)
IF(${OMPI_SIZEOF_FORTRAN_REAL16} EQUAL SIZEOF_${REAL16_C_TYPE})
OMPI_FORTRAN_MAKE_C_FUNCTION(ompi_ac_c_fn c)
FILE(WRITE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/conftest_c.c
"#include <stdio.h>\n"
"#include <stdlib.h>\n"
"\n"
"#ifdef __cplusplus\n"
"extern \"C\" {\n"
"#endif\n"
"void ${ompi_ac_c_fn}(${ompi_fortran_real16_t} *a) {\n"
" ${ompi_fortran_real16_t} foo = 11; "
" FILE *fp = fopen(\"conftestval\", \"w\");\n"
" if (NULL == fp) exit(1);\n"
" foo = 1 / foo;"
" fprintf(fp, \"%s\n\", (foo == *a) ? \"yes\" : \"no\");\n"
" fclose(fp);\n"
"}\n"
"#ifdef __cplusplus\n"
"}\n"
"#endif\n")
FILE(WRITE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/conftest_f.f
"\tprogram bogus\n"
"\tREAL*16 :: foo = 11\n"
"\tfoo = 1 / foo\n"
"\tcall c(foo)\n"
"\tend program bogus\n")
EXECUTE_PROCESS(COMMAND ${CC} ${OMPI_C_OPTION_COMPILE} conftest_c.c ${OMPI_C_INCLUDE_DIR}${C_COMPILER_INCLUDE}
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp
OUTPUT_VARIABLE OUTPUT
RESULT_VARIABLE RESULT
ERROR_VARIABLE ERROR)
EXECUTE_PROCESS(COMMAND ${FORTRAN} conftest_f.f conftest_c.obj ${FORTRAN_OUTPUT_OBJ}conftest
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp
OUTPUT_VARIABLE OUTPUT
RESULT_VARIABLE RESULT
ERROR_VARIABLE ERROR)
EXECUTE_PROCESS(COMMAND conftest.exe
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp
OUTPUT_VARIABLE OUTPUT
RESULT_VARIABLE RESULT
ERROR_VARIABLE ERROR)
IF(RESULT)
UNSET(REAL16_MATCHES_CHECK_DONE CACHE)
MESSAGE(FATAL_ERROR "Can not determine if REAL*16 bit-matches C.")
ELSE(RESULT)
IF(EXISTS ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/conftestval)
# read out type size value from the file, and write back to the output variable
FILE(READ ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/conftestval ${OUTPUT_VARIABLE})
MESSAGE(STATUS "Check if REAL*16 bit-matches C...${OUTPUT_VARIABLE}")
SET(OMPI_REAL16_MATCHES_C 1)
SET(REAL16_MATCHES_CHECK_DONE TRUE CACHE INTERNAL "Real16 matches c type check done.")
ELSE(EXISTS ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/conftestval)
UNSET(REAL16_MATCHES_CHECK_DONE CACHE)
MESSAGE(STATUS "Check if REAL*16 bit-matches C...failed")
ENDIF(EXISTS ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/conftestval)
ENDIF(RESULT)
ELSE(${OMPI_SIZEOF_FORTRAN_REAL16} EQUAL SIZEOF_${REAL16_C_TYPE})
SET(REAL16_MATCHES_CHECK_DONE TRUE CACHE INTERNAL "Real16 matches c type check done.")
MESSAGE(STATUS "Check if REAL*16 bit-matches C...skipped. (no corresponding C type)")
ENDIF(${OMPI_SIZEOF_FORTRAN_REAL16} EQUAL SIZEOF_${REAL16_C_TYPE})
ELSE(NOT ${ompi_fortran_real16_t} STREQUAL "")
SET(REAL16_MATCHES_CHECK_DONE TRUE CACHE INTERNAL "Real16 matches c type check done.")
MESSAGE(STATUS "Check if REAL*16 bit-matches C...skipped. (no REAL*16)")
ENDIF(NOT ${ompi_fortran_real16_t} STREQUAL "")
ELSEIF(NOT OMPI_WANT_FORTRAN_BINDINGS)
UNSET(REAL16_MATCHES_CHECK_DONE CACHE)
ENDIF(OMPI_WANT_FORTRAN_BINDINGS AND OMPI_HAVE_FORTRAN_REAL16 AND NOT DEFINED REAL16_MATCHES_CHECK_DONE)
OMPI_DEF_VAR(OMPI_REAL16_MATCHES_C "if REAL*16 bit-matches C." 0 1)
ENDMACRO(OMPI_FORTRAN_CHECK_REAL16_C_EQUIV)

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

@ -1,45 +0,0 @@
# Copyright (c) 2008-2010 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
#
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# OMPI_FORTRAN_CHECK_TYPE
# in: TYPE - fortran type to check.
# out: HAVE_TYPE - 0/1 whether we have that type.
# -----------------------------------------------------------------
MACRO(OMPI_FORTRAN_CHECK_TYPE TYPE HAVE_TYPE)
IF(NOT DEFINED ${TYPE_NAME}_CHECK_DONE)
MESSAGE(STATUS "Check if Fortran 77 compiler supports ${TYPE}...")
FILE(WRITE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/check_fortran_type.f
"\t program main \n"
"\t ${TYPE} bogus_variable \n"
"\t END \n")
EXECUTE_PROCESS(COMMAND ${FORTRAN} check_fortran_type.f
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp
OUTPUT_VARIABLE OUTPUT
RESULT_VARIABLE RESULT
ERROR_VARIABLE ERROR)
IF(RESULT)
SET(${HAVE_TYPE} 0 CACHE INTERNAL "have Fortran ${TYPE}")
MESSAGE(STATUS "Check if Fortran 77 compiler supports ${TYPE}...no")
ELSE(RESULT)
SET(${HAVE_TYPE} 1 CACHE INTERNAL "have Fortran ${TYPE}")
MESSAGE(STATUS "Check if Fortran 77 compiler supports ${TYPE}...yes")
ENDIF(RESULT)
SET(${TYPE_NAME}_CHECK_DONE TRUE CACHE INTERNAL "${TYPE_NAME} check done")
ENDIF(NOT DEFINED ${TYPE_NAME}_CHECK_DONE)
ENDMACRO(OMPI_FORTRAN_CHECK_TYPE TYPE HAVE_TYPE)

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

@ -1,157 +0,0 @@
# Copyright (c) 2008-2010 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
#
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
MACRO(OMPI_FORTRAN_FIND_EXT_SYMBOL_CONVENTION)
IF(NOT SYMBOL_CONVENTION_CHECK_DONE)
SET(OMPI_FORTRAN_DOUBLE_UNDERSCORE 0
CACHE INTERNAL "external symbol convention - double underscore")
SET(OMPI_FORTRAN_SINGLE_UNDERSCORE 0
CACHE INTERNAL "external symbol convention - single underscore")
SET(OMPI_FORTRAN_CAPS 0
CACHE INTERNAL "external symbol convention - captital")
SET(OMPI_FORTRAN_PLAIN 0
CACHE INTERNAL "external symbol convention - plain")
# make sure we know our linking convention...
MESSAGE(STATUS "Check ${FORTRAN} external symbol convention...")
FILE(WRITE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/conftest.f
"\t subroutine FOO_bar(a) \n"
"\t integer a \n"
"\t a = 1 \n"
"\t return \n"
"\t end \n")
EXECUTE_PROCESS(COMMAND ${FORTRAN} ${FORTRAN_OPTION_COMPILE} conftest.f ${FORTRAN_OUTPUT_OBJ}conftest.lib
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp
OUTPUT_VARIABLE OUTPUT
RESULT_VARIABLE RESULT
ERROR_VARIABLE ERROR)
SET(OUTPUT_OBJ_FILE "conftest.lib")
# now run dumpbin to generate an output file
EXECUTE_PROCESS(COMMAND ${DUMP_UTIL} ${OUTPUT_OBJ_FILE} ${DUMP_UTIL_OPT}
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp
OUTPUT_VARIABLE DUMP_OUTPUT
RESULT_VARIABLE RESULT
ERROR_VARIABLE ERROR)
STRING(REGEX MATCH foo_bar__\n DOUBLE_UNDERSCORE ${DUMP_OUTPUT})
STRING(REGEX MATCH foo_bar_\n SINGLE_UNDERSCORE ${DUMP_OUTPUT})
STRING(REGEX MATCH FOO_bar\n MIXED_CASE ${DUMP_OUTPUT})
STRING(REGEX MATCH foo_bar\n NO_UNDERSCORE ${DUMP_OUTPUT})
STRING(REGEX MATCH FOO_BAR\n UPPER_CASE ${DUMP_OUTPUT})
# set up the corresponding values
IF(NOT DOUBLE_UNDERSCORE STREQUAL "")
SET(OMPI_FORTRAN_DOUBLE_UNDERSCORE 1
CACHE INTERNAL "external symbol convention - double underscore")
SET(FUNC_NAME "foo_bar__")
SET(ompi_cv_fortran_external_symbol "double underscore"
CACHE INTERNAL "FORTRAN external symbol convention")
ELSEIF(NOT SINGLE_UNDERSCORE STREQUAL "")
SET(OMPI_FORTRAN_SINGLE_UNDERSCORE 1
CACHE INTERNAL "external symbol convention - single underscore")
SET(FUNC_NAME "foo_bar_")
SET(ompi_cv_fortran_external_symbol "single underscore"
CACHE INTERNAL "FORTRAN external symbol convention")
ELSEIF(NOT MIXED_CASE STREQUAL "")
SET(OMPI_FORTRAN_CAPS 1
CACHE INTERNAL "external symbol convention - captital")
SET(FUNC_NAME "FOO_bar")
SET(ompi_cv_fortran_external_symbol "mixed case"
CACHE INTERNAL "FORTRAN external symbol convention")
ELSEIF(NOT NO_UNDERSCORE STREQUAL "")
SET(OMPI_FORTRAN_PLAIN 1
CACHE INTERNAL "external symbol convention - plain")
SET(FUNC_NAME "foo_bar")
SET(ompi_cv_fortran_external_symbol "no underscore"
CACHE INTERNAL "FORTRAN external symbol convention")
ELSEIF(NOT UPPER_CASE STREQUAL "")
SET(OMPI_FORTRAN_CAPS 1
CACHE INTERNAL "external symbol convention - captital")
SET(FUNC_NAME "FOO_BAR")
SET(ompi_cv_fortran_external_symbol "upper case"
CACHE INTERNAL "FORTRAN external symbol convention")
ELSE(NOT UPPER_CASE STREQUAL "")
MESSAGE(FATAL_ERROR "unknow Fortran naming convertion.")
SET(ompi_cv_fortran_external_symbol "unknow")
ENDIF(NOT DOUBLE_UNDERSCORE STREQUAL "")
MESSAGE(STATUS "Check ${FORTRAN} external symbol convention...${ompi_cv_fortran_external_symbol}")
# now test if we can link the library with c program
FILE(WRITE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/conftest_c.c
"int main(){${FUNC_NAME}();return(0);}")
FILE(WRITE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CMakeLists.txt
"CMAKE_MINIMUM_REQUIRED(VERSION 2.4.6 FATAL_ERROR)\n"
"PROJECT(conftest_c C)\n"
"IF(NOT \"${FORTRAN_LIB_PATH}\" STREQUAL \"\")\n"
" LINK_DIRECTORIES(\"${FORTRAN_LIB_PATH}\")\n"
"ENDIF(NOT \"${FORTRAN_LIB_PATH}\" STREQUAL \"\")\n"
"LINK_DIRECTORIES(${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/)\n"
"ADD_EXECUTABLE(conftest_c conftest_c.c)\n"
"TARGET_LINK_LIBRARIES(conftest_c ${OUTPUT_OBJ_FILE})\n")
TRY_COMPILE(
TEST_OK
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp
conftest_c
OUTPUT_VARIABLE MY_OUTPUT)
#MESSAGE("MY_OUTPUT:${MY_OUTPUT}")
IF(TEST_OK)
SET(SYMBOL_CONVENTION_CHECK_DONE TRUE CACHE INTERNAL "Symbol convention check done.")
ELSE(TEST_OK)
UNSET(SYMBOL_CONVENTION_CHECK_DONE CACHE)
MESSAGE(STATUS "${MY_OUTPUT}")
MESSAGE(STATUS "*** Probably you have to setup the library path of the Fortran compiler.")
MESSAGE(FATAL_ERROR "C and Fortran 77 compilers are not link compatible. Cannot continue.")
ENDIF(TEST_OK)
ENDIF(NOT SYMBOL_CONVENTION_CHECK_DONE)
ENDMACRO(OMPI_FORTRAN_FIND_EXT_SYMBOL_CONVENTION)
# return the corresponding C function name
# OMPI_FORTRAN_MAKE_C_FUNCTION
# in: FUNCTION_NAME -Fortran function name
# out: OUTPUT_VARIABLE -C function name
MACRO(OMPI_FORTRAN_MAKE_C_FUNCTION OUTPUT_VARIABLE FUNCTION_NAME)
IF("${ompi_cv_fortran_external_symbol}" STREQUAL "double underscore")
# so the general rule is that if there is an _ in the function
# name, then there are two trailing underscores. Otherwise,
# there is only one trailing underscore.
STRING(TOLOWER ${FUNCTION_NAME} ${OUTPUT_VARIABLE})
STRING(REGEX MATCH "_" RESULT ${FUNCTION_NAME})
IF("${RESULT}" STREQUAL "")
SET(${OUTPUT_VARIABLE} "${${OUTPUT_VARIABLE}}_")
ELSE("${RESULT}" STREQUAL "")
SET(${OUTPUT_VARIABLE} "${${OUTPUT_VARIABLE}}__")
ENDIF("${RESULT}" STREQUAL "")
ELSEIF("${ompi_cv_fortran_external_symbol}" STREQUAL "single underscore")
STRING(TOLOWER ${FUNCTION_NAME} ${OUTPUT_VARIABLE})
SET(${OUTPUT_VARIABLE} "${${OUTPUT_VARIABLE}}_")
ELSEIF("${ompi_cv_fortran_external_symbol}" STREQUAL "mixed case")
SET(${OUTPUT_VARIABLE} ${FUNCTION_NAME})
ELSEIF("${ompi_cv_fortran_external_symbol}" STREQUAL "no underscore")
STRING(TOLOWER ${FUNCTION_NAME} ${OUTPUT_VARIABLE})
ELSEIF("${ompi_cv_fortran_external_symbol}" STREQUAL "upper case")
STRING(TOUPPER ${FUNCTION_NAME} ${OUTPUT_VARIABLE})
ELSE("${ompi_cv_fortran_external_symbol}" STREQUAL "double underscore")
MESSAGE(FATAL_ERROR "unknown naming convention: ${ompi_cv_fortran_external_symbol}")
ENDIF("${ompi_cv_fortran_external_symbol}" STREQUAL "double underscore")
ENDMACRO(OMPI_FORTRAN_MAKE_C_FUNCTION OUTPUT_VARIABLE FUNCTION_NAME)

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

@ -1,99 +0,0 @@
# Copyright (c) 2008 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
#
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# OMPI_FORTRAN_GET_ALIGNMENT
# in: TYPE - fortran type to check
# out: ALIGNMENT - alignment to return
# ----------------------------------------------------
INCLUDE(FORTRAN_find_ext_symbol_convention)
MACRO(OMPI_FORTRAN_GET_ALIGNMENT TYPE OUTPUT_VARIABLE)
MESSAGE(STATUS "Check alignment of Fortran ${TYPE}...")
OMPI_FORTRAN_MAKE_C_FUNCTION(ompi_ac_align_fn align)
FILE(WRITE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/conftest.f
"\t program falign\n"
"\t external align\n"
"\t $1 w,x,y,z\n"
"\t CHARACTER a,b,c\n"
"\t common /foo/a,w,b,x,y,c,z\n"
"\t call align(w,x,y,z)\n"
"\t end \n")
IF(EXISTS "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/conftest.h")
SET(ompi_conftest_h "#include \"conftest.h\"")
ELSE(EXISTS "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/conftest.h")
SET(ompi_conftest_h "")
ENDIF(EXISTS "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/conftest.h")
FILE(WRITE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/conftest.c"
"\t #include <stdio.h> \n"
"\t #include <stdlib.h> \n"
"\t $conftest \n"
"\t \n"
"\t #ifdef __cplusplus \n"
"\t extern \"C\" { \n"
"\t #endif \n"
"\t void ${ompi_ac_align_fn}(char *w, char *x, char *y, char *z) \n"
"\t { unsigned long aw, ax, ay, az; \n"
"\t FILE *f=fopen(\"conftestval\", \"w\"); \n"
"\t if (!f) exit(1); \n"
"\t aw = (unsigned long) w; \n"
"\t ax = (unsigned long) x; \n"
"\t ay = (unsigned long) y; \n"
"\t az = (unsigned long) z; \n"
"\t if (! ((aw%16)||(ax%16)||(ay%16)||(az%16))) fprintf(f, \"%d\n\", 16); \n"
"\t else if (! ((aw%12)||(ax%12)||(ay%12)||(az%12))) fprintf(f, \"%d\n\", 12); \n"
"\t else if (! ((aw%8)||(ax%8)||(ay%8)||(az%8))) fprintf(f, \"%d\n\", 8); \n"
"\t else if (! ((aw%4)||(ax%4)||(ay%4)||(az%4))) fprintf(f, \"%d\n\", 4); \n"
"\t else if (! ((aw%2)||(ax%2)||(ay%2)||(az%2))) fprintf(f, \"%d\n\", 2); \n"
"\t else fprintf(f, \"%d\n\", 1); \n"
"\t fclose(f); \n"
"\t } \n"
"\t #ifdef __cplusplus \n"
"\t } \n"
"\t #endif \n"
)
EXECUTE_PROCESS(COMMAND ${CL_EXE} /c conftest.c /I${VC_INCLUDE_PATH}
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp
OUTPUT_VARIABLE OUTPUT
RESULT_VARIABLE RESULT
ERROR_VARIABLE ERROR)
EXECUTE_PROCESS(COMMAND ${FORTRAN} conftest.f conftest.obj -o conftest
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp
OUTPUT_VARIABLE OUTPUT
RESULT_VARIABLE RESULT
ERROR_VARIABLE ERROR)
EXECUTE_PROCESS(COMMAND conftest.exe
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp
OUTPUT_VARIABLE OUTPUT
RESULT_VARIABLE RESULT
ERROR_VARIABLE ERROR)
#MESSAGE("RESULT:${RESULT}")
IF(RESULT)
MESSAGE(FATAL_ERROR "Could not determine alignment of ${TYPE}.")
ELSE(RESULT)
IF(EXISTS ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/conftestval)
# read out type size value from the file, and write back to the output variable
FILE(READ ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/conftestval ${OUTPUT_VARIABLE})
MESSAGE(STATUS "Check alignment of Fortran ${TYPE}...${${OUTPUT_VARIABLE}}")
ELSE(EXISTS ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/conftestval)
MESSAGE(FATAL_ERROR "Could not determine alignment of ${TYPE}.")
ENDIF(EXISTS ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/conftestval)
ENDIF(RESULT)
ENDMACRO(OMPI_FORTRAN_GET_ALIGNMENT TYPE OUTPUT_VARIABLE)

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

@ -1,106 +0,0 @@
# Copyright (c) 2010 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
#
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# OMPI_FORTRAN_GET_FORTRAN_HANDLE_MAX()
# -------------------------------------------------------
# Find the maximum value of fortran integers, then calculate
# min(INT_MAX, max fortran INTEGER). This represents the maximum
# number of fortran MPI handle index.
MACRO(OMPI_FORTRAN_GET_FORTRAN_HANDLE_MAX)
#store previous value for later use.
IF(DEFINED OMPI_FINT_MAX)
SET(OMPI_FINT_MAX_OLD ${OMPI_FINT_MAX})
ENDIF(DEFINED OMPI_FINT_MAX)
IF(NOT OMPI_WANT_FORTRAN_BINDINGS)
SET(OMPI_FINT_MAX 0 CACHE INTERNAL "fortran int max")
ELSE(NOT OMPI_WANT_FORTRAN_BINDINGS)
# Calculate the number of f's that we need to append to the hex
# value. Do one less than we really need becaue we assume the
# top nybble is 0x7 to avoid sign issues.
MATH(EXPR OMPI_NUMF ${OMPI_SIZEOF_FORTRAN_INTEGER}*2-1)
SET(OMPI_FINT_MAX 0x7)
WHILE(${OMPI_NUMF} GREATER 0)
SET(OMPI_FINT_MAX ${OMPI_FINT_MAX}f CACHE INTERNAL "fortran int max")
MATH(EXPR OMPI_NUMF ${OMPI_NUMF}-1)
ENDWHILE(${OMPI_NUMF} GREATER 0)
ENDIF(NOT OMPI_WANT_FORTRAN_BINDINGS)
#OMPI_CINT_MAX doesn't change, check only once and cache the result.
IF(NOT DEFINED CINT_MAX_CHECK_DONE)
FILE(WRITE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/fortran_handle_max.c
"#include <stdio.h>\n"
"#include <limits.h>\n"
"\n"
"#ifdef __cplusplus\n"
"extern \"C\" {\n"
"#endif\n"
"\n"
"void main()\n"
"{\n"
" FILE *fp = fopen(\"fortran_handle_max\", \"w\");\n"
" long cint = INT_MAX;\n"
" fprintf(fp, \"%ld\", cint);\n"
" fclose(fp);\n"
"}\n"
)
EXECUTE_PROCESS(COMMAND ${CC} fortran_handle_max.c ${OMPI_C_INCLUDE_DIR}${C_COMPILER_INCLUDE}
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp
OUTPUT_VARIABLE OUTPUT
RESULT_VARIABLE RESULT
ERROR_VARIABLE ERROR)
EXECUTE_PROCESS(COMMAND fortran_handle_max.exe
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp
OUTPUT_VARIABLE OUTPUT
RESULT_VARIABLE RESULT
ERROR_VARIABLE ERROR)
IF(EXISTS ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/fortran_handle_max)
FILE(READ ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/fortran_handle_max OUTPUT_VALUE)
SET(OMPI_CINT_MAX ${OUTPUT_VALUE} CACHE INTERNAL "c int max")
ELSE(EXISTS ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/fortran_handle_max)
SET(OMPI_CINT_MAX 0)
ENDIF(EXISTS ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/fortran_handle_max)
ENDIF(NOT DEFINED CINT_MAX_CHECK_DONE)
#whenever OMPI_FINT_MAX changes, recalculate OMPI_FORTRAN_HANDLE_MAX
IF(NOT DEFINED OMPI_FINT_MAX OR NOT "${OMPI_FINT_MAX}" STREQUAL "${OMPI_FINT_MAX_OLD}")
MESSAGE(STATUS "Check Max handle value for Fortran MPI handles...")
IF(${OMPI_CINT_MAX} EQUAL 0)
# wow - something went really wrong. Be conservative
SET(OMPI_FORTRAN_HANDLE_MAX 32767 CACHE INTERNAL "Fortran handle max")
ELSEIF(${OMPI_FINT_MAX} EQUAL 0)
# we aren't compiling Fortran - just set it to C INT_MAX
SET(OMPI_FORTRAN_HANDLE_MAX ${OMPI_CINT_MAX} CACHE INTERNAL "Fortran handle max")
ELSE(${OMPI_FINT_MAX} EQUAL 0)
# take the lesser of C INT_MAX and Fortran INTEGER
# max. The resulting value will then be storable in
# either type. There's no easy way to do this in
# the shell, so make the preprocessor do it.
SET(OMPI_FORTRAN_HANDLE_MAX "( ${OMPI_FINT_MAX} < ${OMPI_CINT_MAX} ? ${OMPI_FINT_MAX} : ${OMPI_CINT_MAX} )" CACHE INTERNAL "Fortran handle max")
ENDIF(${OMPI_CINT_MAX} EQUAL 0)
MESSAGE(STATUS "Check Max handle value for Fortran MPI handles...${OMPI_FORTRAN_HANDLE_MAX}")
SET(FORTRAN_MAX_HANDLE_CHECK_DONE TRUE CACHE INTERNAL "Fortran handle max check done")
ENDIF(NOT DEFINED OMPI_FINT_MAX OR NOT "${OMPI_FINT_MAX}" STREQUAL "${OMPI_FINT_MAX_OLD}")
OMPI_DEF_VAR(OMPI_FORTRAN_HANDLE_MAX "Max handle value for fortran MPI handles, effectively min(INT_MAX, max fortran INTEGER value)." 0 1)
ENDMACRO(OMPI_FORTRAN_GET_FORTRAN_HANDLE_MAX)

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

@ -1,98 +0,0 @@
# Copyright (c) 2008-2010 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
#
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# OMPI_FORTRAN_GET_SIZEOF(type, variable to set)
# ------------------------------------------
INCLUDE(fortran_find_ext_symbol_convention)
MACRO(OMPI_FORTRAN_GET_SIZEOF TYPE OUTPUT_VARIABLE)
MESSAGE(STATUS "Check size of Fortran 77 ${TYPE}...")
OMPI_FORTRAN_MAKE_C_FUNCTION(ompi_ac_size_fn size)
FILE(WRITE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/conftest.f
"\t program fsize \n"
"\t external size \n "
"\t ${TYPE} x(2) \n"
"\t call size(x(1),x(2)) \n"
"\t end \n")
IF(EXISTS ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/conftest.h)
SET(ompi_conftest_h "#include \"conftest.h\"")
ELSE(EXISTS ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/conftest.h)
SET(ompi_conftest_h "")
ENDIF(EXISTS ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/conftest.h)
FILE(WRITE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/conftest.c
"#include <stdio.h> \n"
"#include <stdlib.h> \n"
"${ompi_conftest_h} \n"
"#ifdef __cplusplus \n"
"extern \"C\" { \n"
"#endif \n"
""
"void ${ompi_ac_size_fn}(char *a, char *b) \n"
"{ \n"
" int diff = (int) (b - a); \n"
" FILE *f=fopen(\"conftestval\", \"w\"); \n"
" if (!f) exit(1); \n"
" fprintf(f, \"%d\\n\", diff); \n"
" fclose(f); \n"
"} \n"
"#ifdef __cplusplus \n"
"} \n"
"#endif \n")
# generate the C object file
EXECUTE_PROCESS(COMMAND ${CC} ${OMPI_C_OPTION_COMPILE} conftest.c ${OMPI_C_OUTPUT_OBJ}conftest_c.obj
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp
OUTPUT_VARIABLE OUTPUT
RESULT_VARIABLE RESULT
ERROR_VARIABLE ERROR)
# generate the Fortran object file
# some Fortran compilers don't allow to compile and link in one step. :-(
EXECUTE_PROCESS(COMMAND ${FORTRAN} ${FORTRAN_OPTION_COMPILE} conftest.f ${FORTRAN_OUTPUT_OBJ}conftest.obj
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp
OUTPUT_VARIABLE OUTPUT
RESULT_VARIABLE RESULT
ERROR_VARIABLE ERROR)
# link the C and Fortran object files.
EXECUTE_PROCESS(COMMAND ${FORTRAN} conftest.obj conftest_c.obj ${FORTRAN_OUTPUT_EXE}conftest.exe
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp
OUTPUT_VARIABLE OUTPUT
RESULT_VARIABLE RESULT
ERROR_VARIABLE ERROR)
EXECUTE_PROCESS(COMMAND conftest.exe
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp
OUTPUT_VARIABLE OUTPUT
RESULT_VARIABLE RESULT
ERROR_VARIABLE ERROR)
# MESSAGE("RESULT:${RESULT}")
IF(RESULT)
MESSAGE(FATAL_ERROR "Could not determine size of ${TYPE}.")
ELSE(RESULT)
IF(EXISTS ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/conftestval)
# read out type size value from the file, and write back to the output variable
FILE(READ ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/conftestval ${OUTPUT_VARIABLE})
STRING(REPLACE "\n" "" ${OUTPUT_VARIABLE} ${${OUTPUT_VARIABLE}})
MESSAGE(STATUS "Check size of Fortran 77 ${TYPE}...${${OUTPUT_VARIABLE}}")
ELSE(EXISTS ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/conftestval)
MESSAGE(FATAL_ERROR "Could not determine size of ${TYPE}.")
ENDIF(EXISTS ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/conftestval)
ENDIF(RESULT)
ENDMACRO(OMPI_FORTRAN_GET_SIZEOF TYPE OUTPUT_VARIABLE)

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

@ -1,128 +0,0 @@
# Copyright (c) 2010 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
#
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# OMPI_FORTRAN_GET_VALUE_TRUE()
# -------------------------------------------------------
# Determine the value of .TRUE. of this Fortran compiler.
MACRO(OMPI_FORTRAN_GET_VALUE_TRUE)
IF(OMPI_WANT_FORTRAN_BINDINGS AND NOT DEFINED FORTRAN_VALUE_CHECK_DONE)
MESSAGE(STATUS "Check Fortran value for .TRUE. logical type...")
OMPI_FORTRAN_MAKE_C_FUNCTION(ompi_print_logical_fn print)
FILE(WRITE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/conftest_c.c
"#include <stdio.h>\n"
"#include <stdlib.h>\n"
"\n"
"#ifdef __cplusplus\n"
"extern \"C\" {\n"
"#endif\n"
"\n"
"void ${ompi_print_logical_fn}(${ompi_fortran_logical_t} * logical);\n"
"\n"
"void ${ompi_print_logical_fn}(${ompi_fortran_logical_t} * logical)\n"
"{\n"
" FILE *f=fopen(\"fortran_true_value\", \"w\");\n"
" if (!f) exit(1);\n"
"\n"
" if( ${SIZEOF_INT} >= sizeof(${ompi_fortran_logical_t}) ) {\n"
" fprintf(f, \"%d\\n\", (int)*logical);\n"
" } else if (${SIZEOF_LONG} >= sizeof(${ompi_fortran_logical_t}) ) {\n"
" fprintf(f, \"%ld\\n\", (long) *logical);\n"
"#ifdef HAVE_LONG_LONG\n"
" } else if (${SIZEOF_LONG_LONG} >= sizeof(${ompi_fortran_logical_t}) ) {\n"
" fprintf(f, \"%lld\\n\", (long long) *logical);\n"
"#endif\n"
" } else {\n"
" exit(1);\n"
" }\n"
"}\n"
"\n"
"#ifdef __cplusplus\n"
"}\n"
"#endif\n")
FILE(WRITE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/conftest_f.f
"\tprogram main\n"
"\tlogical value\n"
"\tvalue=.TRUE.\n"
"\tCALL print(value)\n"
"\tend\n")
IF(NOT "${C_COMPILER_INCLUDE}" STREQUAL "")
SET(EXECUTE_OPT "${OMPI_C_INCLUDE_DIR}${C_COMPILER_INCLUDE}")
ENDIF(NOT "${C_COMPILER_INCLUDE}" STREQUAL "")
EXECUTE_PROCESS(COMMAND ${CC} ${OMPI_C_OPTION_COMPILE} conftest_c.c ${EXECUTE_OPT} ${OMPI_C_OUTPUT_OBJ}conftest_c.obj
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp
OUTPUT_VARIABLE OUTPUT
RESULT_VARIABLE RESULT
ERROR_VARIABLE ERROR)
IF(RESULT)
MESSAGE(STATUS "${OUTPUT}\n${ERROR}")
MESSAGE(FATAL_ERROR "Could not determine value of Fortran .TRUE.. Aborting.")
ENDIF(RESULT)
EXECUTE_PROCESS(COMMAND ${FORTRAN} ${FORTRAN_OPTION_COMPILE} conftest_f.f ${FORTRAN_OUTPUT_OBJ}conftest_f.obj
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp
OUTPUT_VARIABLE OUTPUT
RESULT_VARIABLE RESULT
ERROR_VARIABLE ERROR)
IF(RESULT)
MESSAGE(STATUS "${OUTPUT}\n${ERROR}")
MESSAGE(FATAL_ERROR "Could not determine value of Fortran .TRUE.. Aborting.")
ENDIF(RESULT)
EXECUTE_PROCESS(COMMAND ${FORTRAN} conftest_f.obj conftest_c.obj ${FORTRAN_OUTPUT_EXE}conftest.exe
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp
OUTPUT_VARIABLE OUTPUT
RESULT_VARIABLE RESULT
ERROR_VARIABLE ERROR)
IF(RESULT)
MESSAGE(STATUS "${OUTPUT}\n${ERROR}")
MESSAGE(FATAL_ERROR "Could not determine value of Fortran .TRUE.. Aborting.")
ENDIF(RESULT)
EXECUTE_PROCESS(COMMAND conftest.exe
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp
OUTPUT_VARIABLE OUTPUT
RESULT_VARIABLE RESULT
ERROR_VARIABLE ERROR)
IF(RESULT)
UNSET(FORTRAN_VALUE_CHECK_DONE CACHE)
MESSAGE(STATUS "${OUTPUT}\n${ERROR}")
MESSAGE(FATAL_ERROR "Could not determine value of Fortran .TRUE.. Aborting.")
ELSE(RESULT)
IF(EXISTS ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/fortran_true_value)
FILE(READ ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/fortran_true_value OUTPUT_VALUE)
MESSAGE(STATUS "Check Fortran value for .TRUE. logical type...${OUTPUT_VALUE}")
SET(OMPI_FORTRAN_VALUE_TRUE ${OUTPUT_VALUE} CACHE INTERNAL "Fortran value true")
SET(FORTRAN_VALUE_CHECK_DONE TRUE CACHE INTERNAL "Fortran value true check done")
ELSE(EXISTS ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/fortran_true_value)
UNSET(FORTRAN_VALUE_CHECK_DONE CACHE)
MESSAGE(FATAL_ERROR "Could not determine value of Fortran .TRUE.. Aborting.")
ENDIF(EXISTS ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/fortran_true_value)
ENDIF(RESULT)
ELSEIF(NOT OMPI_WANT_FORTRAN_BINDINGS)
SET(OMPI_FORTRAN_VALUE_TRUE 0)
UNSET(FORTRAN_VALUE_CHECK_DONE CACHE)
ENDIF(OMPI_WANT_FORTRAN_BINDINGS AND NOT DEFINED FORTRAN_VALUE_CHECK_DONE)
OMPI_DEF_VAR(OMPI_FORTRAN_VALUE_TRUE "Fortran value for .TRUE. logical type" 0 1)
ENDMACRO(OMPI_FORTRAN_GET_VALUE_TRUE)

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

@ -1,50 +0,0 @@
IF(${WANT_SVN})
SET(${PROJECT_NAME}_WANT_SVN 1)
ELSE(${WANT_SVN})
SET(${PROJECT_NAME}_WANT_SVN 0)
ENDIF(${WANT_SVN})
STRING(TOLOWER ${PROJECT_NAME} PROJECT_NAME_LOWERCASE)
FILE (WRITE "${PROJECT_BINARY_DIR}/include/${PROJECT_NAME_LOWERCASE}/version.h"
"
/*
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology
* Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*
* This file should be included by any file that needs full
* version information for the ${PROJECT_NAME} project
*/
#ifndef ${PROJECT_NAME}_VERSIONS_H
#define ${PROJECT_NAME}_VERSIONS_H
#define ${PROJECT_NAME}_MAJOR_VERSION ${${PROJECT_NAME}_MAJOR_VERSION_STRING}
#define ${PROJECT_NAME}_MINOR_VERSION ${${PROJECT_NAME}_MINOR_VERSION_STRING}
#define ${PROJECT_NAME}_RELEASE_VERSION ${${PROJECT_NAME}_RELEASE_VERSION_STRING}
#define ${PROJECT_NAME}_GREEK_VERSION \"${${PROJECT_NAME}_GREEK_VERSION_STRING}\"
#define ${PROJECT_NAME}_WANT_SVN ${${PROJECT_NAME}_WANT_SVN}
#define ${PROJECT_NAME}_SVN_R \"${SVN_VERSION}\"
#ifdef ${PROJECT_NAME}_VERSION
/* If we included version.h, we want the real version, not the
stripped (no-r number) verstion */
#undef ${PROJECT_NAME}_VERSION
#endif
#define ${PROJECT_NAME}_VERSION \"${${PROJECT_NAME}_VERSION_STRING}\"
#endif
")

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

@ -1,48 +0,0 @@
#
# Copyright (c) 2007-2010 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
MACRO(C_GET_ALIGNMENT TYPE LANG NAME)
IF(NOT OPAL_ALIGNMENT_${NAME})
#
# Try to compile and run a foo grogram.
# The alignment result will be stored in ${CHECK_TYPE}_ALIGNMENT
#
MESSAGE( STATUS "Check alignment of ${TYPE} in ${LANG}...")
SET(INCLUDE_HEADERS "#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>")
IF(HAVE_STDINT_H)
SET(INCLUDE_HEADERS "${INCLUDE_HEADERS}\n#include <stdint.h>\n")
ENDIF(HAVE_STDINT_H)
FILE (WRITE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/c_get_${NAME}_alignment.${LANG}"
"${INCLUDE_HEADERS}
int main(){
char diff;
struct foo {char a; ${TYPE} b;};
struct foo *p = (struct foo *) malloc(sizeof(struct foo));
diff = ((char *)&p->b) - ((char *)&p->a);
return diff;}
")
TRY_RUN(OPAL_ALIGNMENT_${NAME} COMPILE_RESULT "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/"
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/c_get_${NAME}_alignment.${LANG}")
MESSAGE( STATUS "Check alignment of ${TYPE} in ${LANG}...${OPAL_ALIGNMENT_${NAME}}")
ENDIF(NOT OPAL_ALIGNMENT_${NAME})
ENDMACRO(C_GET_ALIGNMENT TYPE TYPE_ALIGNMENT LANG )

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

@ -1,30 +0,0 @@
#
# Copyright (c) 2009-2010 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# list the sub directories of current directories
# save the list of subdirs in OUTPUT_VARIABLE
MACRO(CHECK_SUBDIRS CURRENT_DIR OUTPUT_VARIABLE)
# change the path into standard Windows format,
# so that we can support UNC paths too.
STRING(REPLACE "/" "\\" DIR_FORMATTED ${CURRENT_DIR})
EXECUTE_PROCESS (COMMAND cmd /C dir /AD /B ${DIR_FORMATTED}
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
OUTPUT_VARIABLE OUTPUT
RESULT_VARIABLE RESULT
ERROR_VARIABLE ERROR)
IF(NOT "${OUTPUT}" STREQUAL "")
STRING (REGEX MATCHALL "[a-zA-Z0-9_]+" ${OUTPUT_VARIABLE} ${OUTPUT})
ENDIF(NOT "${OUTPUT}" STREQUAL "")
ENDMACRO(CHECK_SUBDIRS CURRENT_DIR OUTPUT_VARIABLE)

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

@ -1,98 +0,0 @@
#
# Copyright (c) 2010 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# this file contains
# 1. several wrappers for CMake macros, so that they will
# do the job and write the configure temeplate file too.
# 2. a macro that checks the data types
# check include file
MACRO(OMPI_CHECK_INCLUDE_FILE FILE_NAME VAR_NAME)
CHECK_INCLUDE_FILE(${FILE_NAME} ${VAR_NAME})
OMPI_DEF_VAR(${VAR_NAME} "Define to 1 if you have <${FILE_NAME}> header file." 0 0)
ENDMACRO(OMPI_CHECK_INCLUDE_FILE FILE_NAME VAR_NAME)
# check if function exists
MACRO(OMPI_CHECK_FUNCTION_EXISTS FUNCTION_NAME VAR_NAME)
CHECK_FUNCTION_EXISTS(${FUNCTION_NAME} ${VAR_NAME})
OMPI_DEF_VAR(${VAR_NAME} "Define to 1 if you have the `${FUNCTION_NAME}' function." 0 0)
ENDMACRO(OMPI_CHECK_FUNCTION_EXISTS FUNCTION_NAME VAR_NAME)
# check if symbol exists
MACRO(OMPI_CHECK_SYMBOL_EXISTS SYMBOL_NAME FILE_NAMES VAR_NAME)
CHECK_SYMBOL_EXISTS(${SYMBOL_NAME} "${FILE_NAMES}" ${VAR_NAME})
OMPI_DEF_VAR(${VAR_NAME} "Define to 1 if you have the `${SYMBOL_NAME}' function." 0 0)
ENDMACRO(OMPI_CHECK_SYMBOL_EXISTS SYMBOL_NAME FILE_NAMES VAR_NAME)
# check if structure has member
MACRO(OMPI_CHECK_STRUCT_HAS_MEMBER STRUC_NAME MEMBER_NAME FILE_NAMES VAR_NAME)
CHECK_SYMBOL_EXISTS(${STRUC_NAME} ${MEMBER_NAME} "${FILE_NAMES}" ${VAR_NAME})
OMPI_DEF_VAR(${VAR_NAME} "Define to 1 if `${MEMBER_NAME}' is member of ${STRUC_NAME}." 0 0)
ENDMACRO(OMPI_CHECK_STRUCT_HAS_MEMBER STRUC_NAME MEMBER_NAME FILE_NAMES VAR_NAME)
# check type size and alignment
MACRO(OMPI_CHECK_TYPES TYPE_NAME VAR_NAME DEFAULT_TYPE LAN)
CHECK_TYPE_SIZE(${TYPE_NAME} ${VAR_NAME})
IF(NOT ${VAR_NAME}_CHECK_DONE)
IF (HAVE_${VAR_NAME})
SET(SIZEOF_${VAR_NAME} ${${VAR_NAME}} CACHE INTERNAL "Size of `${TYPE_NAME}'")
C_GET_ALIGNMENT(${TYPE_NAME} ${LAN} ${VAR_NAME})
ELSE(HAVE_${VAR_NAME})
IF(NOT ${DEFAULT_TYPE} STREQUAL "" AND NOT ${DEFAULT_TYPE} STREQUAL "none")
#Get the variable name of the default type size.
STRING(TOUPPER "${DEFAULT_TYPE}" DEFAULT_TYPE_VAR)
STRING(REPLACE " " "_" DEFAULT_TYPE_VAR ${DEFAULT_TYPE_VAR})
IF(${SIZEOF_${DEFAULT_TYPE_VAR}} GREATER 0)
MESSAGE(STATUS "Define it as '${DEFAULT_TYPE}'.")
SET(${TYPE_NAME} ${DEFAULT_TYPE} CACHE INTERNAL "System support type for `${TYPE_NAME}'")
SET(SIZEOF_${VAR_NAME} ${SIZEOF_${DEFAULT_TYPE_VAR}} CACHE INTERNAL "Size of `${TYPE_NAME}'")
SET(OPAL_ALIGNMENT_${VAR_NAME} ${OPAL_ALIGNMENT_${DEFAULT_TYPE_VAR}})
ENDIF(${SIZEOF_${DEFAULT_TYPE_VAR}} GREATER 0)
ENDIF(NOT ${DEFAULT_TYPE} STREQUAL "" AND NOT ${DEFAULT_TYPE} STREQUAL "none")
ENDIF (HAVE_${VAR_NAME})
SET(${VAR_NAME}_CHECK_DONE 1 CACHE INTERNAL "check for `${VAR_NAME}' is done.")
ENDIF(NOT ${VAR_NAME}_CHECK_DONE)
IF(NOT ${DEFAULT_TYPE} STREQUAL "" AND NOT ${DEFAULT_TYPE} STREQUAL "none")
OMPI_DEF_VAR(${TYPE_NAME} "Define to `${DEFAULT_TYPE}' if system types does not define." 0 0)
ENDIF(NOT ${DEFAULT_TYPE} STREQUAL "" AND NOT ${DEFAULT_TYPE} STREQUAL "none")
#CMake automatically sets the HAVE_type to TURE or FALSE,
#but we need a number.
IF(HAVE_${VAR_NAME})
SET(HAVE_${VAR_NAME} 1)
ENDIF(HAVE_${VAR_NAME})
OMPI_DEF_VAR(SIZEOF_${VAR_NAME} "The size of `${TYPE_NAME}'" 0 0)
OMPI_DEF_VAR(HAVE_${VAR_NAME} "Define to 1 if the system has the type `${TYPE_NAME}'" 0 0)
OMPI_DEF_VAR(OPAL_ALIGNMENT_${VAR_NAME} "Alignment of type `${TYPE_NAME}'." 0 0)
ENDMACRO(OMPI_CHECK_TYPES TYPE VAR_NAME DEFAULT_TYPE LAN)

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

@ -1,259 +0,0 @@
# -*- cmake-script -*-
#
# Copyright (c) 2007-2010 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
######################################################################
#
# OMPI_MICROSOFT_COMPILER
#
# Keep all the Windows checks in one place.
#
######################################################################
# Get current time and date.
EXECUTE_PROCESS(COMMAND cmd /C time /t
OUTPUT_VARIABLE CURRENT_TIME)
EXECUTE_PROCESS(COMMAND cmd /C date /t
OUTPUT_VARIABLE CURRENT_DATE)
STRING (REPLACE "\n" "" CURRENT_TIME ${CURRENT_TIME})
STRING (REPLACE "\n" "" CURRENT_DATE ${CURRENT_DATE})
STRING (REGEX MATCH [.-/\0-9]+ CURRENT_DATE ${CURRENT_DATE})
SET (OPAL_CONFIGURE_DATE "${CURRENT_TIME} ${CURRENT_DATE}" CACHE INTERNAL "OPAL_CONFIGURE_DATE")
SET (OMPI_BUILD_DATE "${CURRENT_TIME} ${CURRENT_DATE}" CACHE INTERNAL "OMPI_BUILD_DATE")
OMPI_DEF(OPAL_CONFIGURE_DATE "${CURRENT_TIME} ${CURRENT_DATE}" "Configuration date." 1 1)
OMPI_DEF(OMPI_BUILD_DATE "${CURRENT_TIME} ${CURRENT_DATE}" "Build date." 1 1)
# Set up compiler information.
OMPI_DEF(COMPILER_FAMILYNAME MICROSOFT "Compiler family name" 1 1)
OMPI_DEF(COMPILER_VERSION ${MSVC_VERSION} "Compiler version" 0 1)
OMPI_DEF(OPAL_BUILD_PLATFORM_COMPILER_FAMILYID 14 "Compiler family ID" 0 1)
OMPI_DEF(OPAL_BUILD_PLATFORM_COMPILER_FAMILYNAME ${COMPILER_FAMILYNAME} "Compiler family name" 0 1)
OMPI_DEF(OPAL_BUILD_PLATFORM_COMPILER_VERSION_STR ${MSVC_VERSION} "Compiler version" 0 1)
IF(NOT MICROSOFT_CHECK_DONE)
MESSAGE( STATUS "Start Microsoft specific detection....")
# search for Microsoft VC tools
IF(CMAKE_CL_64)
SET(CHECK_PATHS ${CHECK_PATHS}
"C:/Program Files/Microsoft Visual Studio 9.0/VC/bin/amd64"
"C:/Program Files (x86)/Microsoft Visual Studio 9.0/VC/bin/amd64"
"C:/Program Files/Microsoft Visual Studio 8/VC/bin/amd64"
"C:/Program Files (x86)/Microsoft Visual Studio 8/VC/bin/amd64"
"C:/Program Files/Microsoft Visual Studio .NET 2003/VC7/bin/amd64"
"C:/Program Files (x86)/Microsoft Visual Studio .NET 2003/VC7/bin/amd64"
"C:/Program Files/Microsoft Visual Studio 10.0/VC/bin/amd64"
"C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/bin/amd64"
"$ENV{VS80COMNTOOLS}../../VC/bin/ia64"
"$ENV{VS80COMNTOOLS}../../VC/bin/amd64"
"$ENV{VS90COMNTOOLS}../../VC/bin/ia64"
"$ENV{VS90COMNTOOLS}../../VC/bin/amd64"
"$ENV{VS100COMNTOOLS}../../VC/bin/ia64"
"$ENV{VS100COMNTOOLS}../../VC/bin/amd64")
ELSE(CMAKE_CL_64)
SET(CHECK_PATHS ${CHECK_PATHS}
"C:/Program Files/Microsoft Visual Studio 9.0/VC/bin"
"C:/Program Files (x86)/Microsoft Visual Studio 9.0/VC/bin"
"C:/Program Files/Microsoft Visual Studio 8/VC/bin"
"C:/Program Files (x86)/Microsoft Visual Studio 8/VC/bin"
"C:/Program Files/Microsoft Visual Studio .NET 2003/VC7/bin"
"C:/Program Files (x86)/Microsoft Visual Studio .NET 2003/VC7/bin"
"C:/Program Files/Microsoft Visual Studio 10.0/VC/bin"
"C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/bin"
"$ENV{VS90COMNTOOLS}../../VC/bin"
"$ENV{VS80COMNTOOLS}../../VC/bin"
"$ENV{VS100COMNTOOLS}../../VC/bin/")
ENDIF(CMAKE_CL_64)
FIND_PROGRAM(CL_EXE cl PATHS ${CHECK_PATHS})
# Set up VS environments.
GET_FILENAME_COMPONENT(VC_BIN_PATH ${CL_EXE} PATH)
GET_FILENAME_COMPONENT(COMPILER_NAME ${CL_EXE} NAME)
SET(CC ${COMPILER_NAME} CACHE INTERNAL "C compiler executable")
SET(CXX ${COMPILER_NAME} CACHE INTERNAL "CXX compiler executable")
GET_FILENAME_COMPONENT(SDK_ROOT_PATH
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows;CurrentInstallFolder]" ABSOLUTE)
IF(CMAKE_CL_64)
SET(VS_ROOT_DIR ${VC_BIN_PATH}/../../..)
SET(VC_LIB_DIR ${VS_ROOT_DIR}/VC/lib/amd64)
SET(SDK_LIB_DIR ${SDK_ROOT_PATH}/lib/x64)
ELSE(CMAKE_CL_64)
SET(VS_ROOT_DIR ${VC_BIN_PATH}/../..)
SET(VC_LIB_DIR ${VS_ROOT_DIR}/VC/lib)
SET(SDK_LIB_DIR ${SDK_ROOT_PATH}/lib)
ENDIF(CMAKE_CL_64)
SET(VS_COMMON_TOOLS_DIR ${VS_ROOT_DIR}/Common7/Tools)
SET(VS_IDE_DIR ${VS_ROOT_DIR}/Common7/IDE)
SET(VC_INCLUDE_DIR ${VS_ROOT_DIR}/VC/include)
# Cache the compilers paths that could be used later.
SET(C_COMPILER_PATH ${VC_BIN_PATH} ${SDK_ROOT_PATH}/bin ${VS_IDE_DIR} CACHE INTERNAL "Compiler binary paths.")
SET(C_COMPILER_INCLUDE ${VC_INCLUDE_DIR} CACHE INTERNAL "Compiler include paths.")
SET(C_COMPILER_LIB ${VC_LIB_DIR} ${SDK_LIB_DIR} CACHE INTERNAL "Compiler libraries.")
SET(C_COMPILER_LIBPATH ${VC_LIB_DIR} ${SDK_LIB_DIR} CACHE INTERNAL "Compiler libraries path.")
SET(ENV{PATH} "${C_COMPILER_PATH};$ENV{PATH}")
SET(ENV{INCLUDE} "${C_COMPILER_INCLUDE};$ENV{INCLUDE}")
SET(ENV{LIB} "${C_COMPILER_LIB};$ENV{LIB}")
SET(ENV{LIBPATH} "${C_COMPILER_LIBPATH};$ENV{LIBPATH}")
# Default compiler settings.
SET(OMPI_C_OPTION_COMPILE "/c" CACHE INTERNAL
"C compiler option for compiling without linking.")
SET(OMPI_C_OUTPUT_OBJ "/Fo" CACHE INTERNAL
"C compiler option for setting object file name.")
SET(OMPI_C_OUTPUT_EXE "/Fe" CACHE INTERNAL
"C compiler option for setting executable file name.")
SET(OMPI_C_LAN_FLAG "/TC" CACHE INTERNAL
"C compiler option for compiling source as C.")
SET(OMPI_CXX_LAN_FLAG "/TP" CACHE INTERNAL
"C compiler option for compiling source as C++.")
SET(OMPI_C_DEF_PRE "/D" CACHE INTERNAL
"C compiler option for preprocessor definition.")
SET(OMPI_C_MD_DEBUG "/MDd" CACHE INTERNAL
"C compiler option for Multi-thread Debug DLL.")
SET(OMPI_C_MD "/MD" CACHE INTERNAL
"C compiler option for Multi-thread DLL.")
SET(OMPI_CXX_EXCEPTION "/EHsc" CACHE INTERNAL
"C compiler option for C++ exceptions.")
SET(OMPI_C_INCLUDE_DIR "/I" CACHE INTERNAL
"C compiler option for including directory.")
SET(OMPI_LIB_CMD "lib" CACHE INTERNAL
"command line for making static libraries.")
SET(OMPI_LIB_CMD_OUTPUT "-OUT:" CACHE INTERNAL
"Output option for making static libraries.")
SET(DUMP_UTIL "${VC_BIN_PATH}/dumpbin.exe" CACHE INTERNAL "the dumpbin application.")
SET(DUMP_UTIL_OPT "/symbols" CACHE INTERNAL "the dumpbin application options.")
FILE(WRITE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/cl_test.c
"int main() {return 0;}")
TRY_COMPILE(CL_EXE_OK ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/cl_test.c)
IF(CL_EXE_OK)
# The atomic functions are defined in a very unuasual manner.
# Some of them are intrinsic defined in windows.h others are
# exported by kernel32.dll. If we force the usage of TRY_RUN
# here we will check for both in same time: compilation and run.
SET(FUNCTION_LIST Exchange ExchangeAcquire ExchangeRelease Exchange64)
FOREACH(FUNCTION ${FUNCTION_LIST})
MESSAGE( STATUS "Checking for InterlockedCompare${FUNCTION}...")
IF(FUNCTION STREQUAL "Exchange64")
SET(64BITS_TYPE "LONGLONG" CACHE INTERNAL "64bits type longlong")
ELSE(FUNCTION STREQUAL "Exchange64")
SET(64BITS_TYPE "LONG" CACHE INTERNAL "64bits type long")
ENDIF(FUNCTION STREQUAL "Exchange64")
STRING(TOUPPER ${FUNCTION} FUNCTION_NAME)
FILE(WRITE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/InterlockedCompare${FUNCTION}_test.c
"#include <windows.h>\n"
"int main() {\n"
" ${64BITS_TYPE} dest = 0, exchange = 1, comperand = 0;\n"
" SetErrorMode(SEM_FAILCRITICALERRORS);\n"
" InterlockedCompare${FUNCTION}( &dest, exchange, comperand );\n"
" return (int)dest;\n"
" }\n")
TRY_RUN (HAVE_INTERLOCKEDCOMPARE${FUNCTION_NAME} COMPILE_RESULT
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/"
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/InterlockedCompare${FUNCTION}_test.c")
IF(HAVE_INTERLOCKEDCOMPARE${FUNCTION_NAME} STREQUAL "FAILED_TO_RUN" OR COMPILE_RESULT EQUAL FALSE)
SET (HAVE_INTERLOCKEDCOMPARE${FUNCTION_NAME} 0 CACHE INTERNAL "HAVE_INTERLOCKEDCOMPARE${FUNCTION_NAME}")
MESSAGE( STATUS "Checking for InterlockedCompare${FUNCTION}...failed")
ELSE(HAVE_INTERLOCKEDCOMPARE${FUNCTION_NAME} STREQUAL "FAILED_TO_RUN" OR COMPILE_RESULT EQUAL FALSE)
MESSAGE( STATUS "Checking for InterlockedCompare${FUNCTION}...done")
ENDIF(HAVE_INTERLOCKEDCOMPARE${FUNCTION_NAME} STREQUAL "FAILED_TO_RUN" OR COMPILE_RESULT EQUAL FALSE)
ENDFOREACH(FUNCTION)
ELSE(CL_EXE_OK)
MESSAGE(FATAL_ERROR "No working Microsoft compiler found. Please check if Visual Studio VC is correctly installed.")
ENDIF(CL_EXE_OK)
SET(MICROSOFT_CHECK_DONE TRUE CACHE INTERNAL "Microsoft check finished.")
ENDIF(NOT MICROSOFT_CHECK_DONE)
OMPI_DEF_VAR(HAVE_INTERLOCKEDCOMPAREEXCHANGE "Whether we support 32 bits atomic operations on Windows" 0 0)
IF(${OMPI_COMPILER_BIT} STREQUAL "64")
OMPI_DEF_VAR(HAVE_INTERLOCKEDCOMPAREEXCHANGE64 "Whether we support 64 bits atomic operations on Windows" 0 0)
ENDIF(${OMPI_COMPILER_BIT} STREQUAL "64")
OMPI_DEF_VAR(HAVE_INTERLOCKEDCOMPAREEXCHANGEACQUIRE "Whether we support 32 bits atomic operations on Windows" 0 0)
OMPI_DEF_VAR(HAVE_INTERLOCKEDCOMPAREEXCHANGERELEASE "Whether we support 32 bits atomic operations on Windows" 0 0)
# a few definitions for shared memory support
OMPI_DEF(MCA_COMMON_SM_WINDOWS 1 "Whether we have shared memory support for Windows or not." 0 1)
OMPI_DEF(MCA_COMMON_SM_SYSV 0 "Whether we have shared memory support for SYSV or not." 0 1)
OMPI_DEF(MCA_COMMON_SM_POSIX 0 "Whether we have shared memory support for POSIX or not." 0 1)
OMPI_DEF(OPAL_HAVE_POSIX_THREADS 0 "Do we have POSIX threads." 0 1)
OMPI_CHECK_INCLUDE_FILE (windows.h HAVE_WINDOWS_H)
OMPI_CHECK_INCLUDE_FILE (winsock2.h HAVE_WINSOCK2_H)
OMPI_CHECK_INCLUDE_FILE (wdm.h HAVE_WDM_H)
OMPI_CHECK_INCLUDE_FILE (malloc.h HAVE_MALLOC_H)
OMPI_CHECK_INCLUDE_FILE (memory.h HAVE_MEMORY_H)
OMPI_CHECK_INCLUDE_FILE (signal.h HAVE_SIGNAL_H)
OMPI_CHECK_INCLUDE_FILE (stdarg.h HAVE_STDARG_H)
OMPI_CHECK_INCLUDE_FILE (stdint.h HAVE_STDINT_H)
OMPI_CHECK_INCLUDE_FILE (stdlib.h HAVE_STDLIB_H)
OMPI_CHECK_INCLUDE_FILE (string.h HAVE_STRING_H)
OMPI_CHECK_INCLUDE_FILE (sys/stat.h HAVE_SYS_STAT_H)
OMPI_CHECK_INCLUDE_FILE (sys/types.h HAVE_SYS_TYPES_H)
OMPI_CHECK_INCLUDE_FILE (time.h HAVE_TIME_H)
OMPI_CHECK_INCLUDE_FILE(stddef.h OPAL_STDC_HEADERS)
OMPI_CHECK_FUNCTION_EXISTS (ceil HAVE_CEIL)
OMPI_CHECK_FUNCTION_EXISTS (execve HAVE_EXECVE)
OMPI_CHECK_FUNCTION_EXISTS (isatty HAVE_ISATTY)
OMPI_CHECK_FUNCTION_EXISTS (vsnprintf HAVE_VSNPRINTF)
CHECK_C_TYPE_EXISTS(socklen_t SOCKLEN_T "winsock2.h;ws2tcpip.h")
CHECK_C_TYPE_EXISTS("struct sockaddr_in" STRUCT_SOCKADDR_IN "winsock2.h")
CHECK_C_TYPE_EXISTS("struct sockaddr_in6" STRUCT_SOCKADDR_IN6 "ws2tcpip.h")
CHECK_C_TYPE_EXISTS("struct sockaddr_storage" STRUCT_SOCKADDR_STORAGE "winsock2.h;ws2tcpip.h")
OMPI_CHECK_SYMBOL_EXISTS (AF_UNSPEC winsock2.h HAVE_DECL_AF_UNSPEC)
OMPI_CHECK_SYMBOL_EXISTS (PF_UNSPEC winsock2.h HAVE_DECL_PF_UNSPEC)
OMPI_CHECK_SYMBOL_EXISTS (AF_INET6 winsock2.h HAVE_DECL_AF_INET6)
OMPI_CHECK_SYMBOL_EXISTS (PF_INET6 winsock2.h HAVE_DECL_PF_INET6)

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

@ -1,206 +0,0 @@
# -*- cmake-script -*-
#
# Copyright (c) 2007-2011 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
######################################################################
#
# OMPI_MinGW
#
# Keep all the MinGW checks in one place.
#
######################################################################
# Get current time and date.
EXECUTE_PROCESS(COMMAND cmd /C time /t
OUTPUT_VARIABLE CURRENT_TIME)
EXECUTE_PROCESS(COMMAND cmd /C date /t
OUTPUT_VARIABLE CURRENT_DATE)
STRING (REPLACE "\n" "" CURRENT_TIME ${CURRENT_TIME})
STRING (REPLACE "\n" "" CURRENT_DATE ${CURRENT_DATE})
STRING (REGEX MATCH [.-/\0-9]+ CURRENT_DATE ${CURRENT_DATE})
SET (OPAL_CONFIGURE_DATE "${CURRENT_TIME} ${CURRENT_DATE}" CACHE INTERNAL "OPAL_CONFIGURE_DATE")
SET (OMPI_BUILD_DATE "${CURRENT_TIME} ${CURRENT_DATE}" CACHE INTERNAL "OMPI_BUILD_DATE")
OMPI_DEF(OPAL_CONFIGURE_DATE "${CURRENT_TIME} ${CURRENT_DATE}" "Configuration date." 1 1)
OMPI_DEF(OMPI_BUILD_DATE "${CURRENT_TIME} ${CURRENT_DATE}" "Build date." 1 1)
# Set up compiler information.
EXECUTE_PROCESS(COMMAND gcc --version OUTPUT_VARIABLE GCC_VERSION)
STRING (REGEX MATCH [.0-9]*\n GCC_VERSION ${GCC_VERSION})
STRING (REPLACE "\n" "" GCC_VERSION ${GCC_VERSION})
OMPI_DEF(COMPILER_FAMILYNAME GNU "Compiler family name" 1 1)
OMPI_DEF(COMPILER_VERSION ${GCC_VERSION} "Compiler version" 0 1)
OMPI_DEF(OPAL_BUILD_PLATFORM_COMPILER_FAMILYID 1 "Compiler family ID" 0 1)
OMPI_DEF(OPAL_BUILD_PLATFORM_COMPILER_FAMILYNAME ${COMPILER_FAMILYNAME} "Compiler family name" 0 1)
OMPI_DEF(OPAL_BUILD_PLATFORM_COMPILER_VERSION_STR ${GCC_VERSION} "Compiler version" 0 1)
IF(NOT MINGW_CHECK_DONE)
MESSAGE( STATUS "Start MinGW specific detection....")
GET_FILENAME_COMPONENT(CC ${CC} NAME)
GET_FILENAME_COMPONENT(CXX ${CXX} NAME)
# Default compiler settings.
SET(OMPI_C_OPTION_COMPILE "-c" CACHE INTERNAL
"C compiler option for compiling without linking.")
SET(OMPI_C_OUTPUT_OBJ "-o" CACHE INTERNAL
"C compiler option for setting object file name.")
SET(OMPI_C_OUTPUT_EXE "-o" CACHE INTERNAL
"C compiler option for setting executable file name.")
SET(OMPI_C_LAN_FLAG "-Wno-write-strings -x c" CACHE INTERNAL
"C compiler option for compiling source as C.")
SET(OMPI_CXX_LAN_FLAG "-Wno-write-strings -x c++" CACHE INTERNAL
"C compiler option for compiling source as C++.")
SET(OMPI_C_DEF_PRE "-D" CACHE INTERNAL
"C compiler option for preprocessor definition.")
SET(OMPI_C_MD_DEBUG " " CACHE INTERNAL
"C compiler option for Multi-thread Debug DLL.")
SET(OMPI_C_MD " " CACHE INTERNAL
"C compiler option for Multi-thread DLL.")
SET(OMPI_CXX_EXCEPTION " " CACHE INTERNAL
"C compiler option for C++ exceptions.")
SET(OMPI_C_INCLUDE_DIR "-I" CACHE INTERNAL
"C compiler option for including directory.")
SET(OMPI_C_LIB_DIR "-L" CACHE INTERNAL
"C compiler option for including directory.")
SET(OMPI_LIB_CMD "ar -rcs" CACHE INTERNAL
"command line for making static libraries.")
#NOTE: the space in the end of the option is important
SET(OMPI_LIB_CMD_OUTPUT "" CACHE INTERNAL
"Output option for making static libraries.")
SET(DUMP_UTIL "nm" CACHE INTERNAL "the dumpbin application.")
#SET(DUMP_UTIL_OPT "> " CACHE INTERNAL "the dumpbin application options.")
FILE(WRITE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/gcc_test.c
"int main() {return 0;}")
TRY_COMPILE(GCC_OK ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/gcc_test.c)
IF(GCC_OK)
# The atomic functions are defined in a very unuasual manner.
# Some of them are intrinsic defined in windows.h others are
# exported by kernel32.dll. If we force the usage of TRY_RUN
# here we will check for both in same time: compilation and run.
SET(FUNCTION_LIST Exchange ExchangeAcquire ExchangeRelease Exchange64)
FOREACH(FUNCTION ${FUNCTION_LIST})
MESSAGE( STATUS "Checking for InterlockedCompare${FUNCTION}...")
IF(FUNCTION STREQUAL "Exchange64")
SET(64BITS_TYPE "LONGLONG" CACHE INTERNAL "64bits type longlong")
ELSE(FUNCTION STREQUAL "Exchange64")
SET(64BITS_TYPE "LONG" CACHE INTERNAL "64bits type long")
ENDIF(FUNCTION STREQUAL "Exchange64")
STRING(TOUPPER ${FUNCTION} FUNCTION_NAME)
FILE(WRITE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/InterlockedCompare${FUNCTION}_test.c
"int main() {\n"
" ${64BITS_TYPE} dest = 0, exchange = 1, comperand = 0;\n"
" SetErrorMode(SEM_FAILCRITICALERRORS);\n"
" InterlockedCompare${FUNCTION}( &dest, exchange, comperand );\n"
" return (int)dest;\n"
" }\n")
TRY_RUN (HAVE_INTERLOCKEDCOMPARE${FUNCTION_NAME} COMPILE_RESULT
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/"
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/InterlockedCompare${FUNCTION}_test.c")
IF(HAVE_INTERLOCKEDCOMPARE${FUNCTION_NAME} STREQUAL "FAILED_TO_RUN" OR COMPILE_RESULT EQUAL FALSE)
SET (HAVE_INTERLOCKEDCOMPARE${FUNCTION_NAME} 0 CACHE INTERNAL "HAVE_INTERLOCKEDCOMPARE${FUNCTION_NAME}")
MESSAGE( STATUS "Checking for InterlockedCompare${FUNCTION}...failed")
ELSE(HAVE_INTERLOCKEDCOMPARE${FUNCTION_NAME} STREQUAL "FAILED_TO_RUN" OR COMPILE_RESULT EQUAL FALSE)
MESSAGE( STATUS "Checking for InterlockedCompare${FUNCTION}...done")
ENDIF(HAVE_INTERLOCKEDCOMPARE${FUNCTION_NAME} STREQUAL "FAILED_TO_RUN" OR COMPILE_RESULT EQUAL FALSE)
ENDFOREACH(FUNCTION)
ELSE(GCC_OK)
MESSAGE(FATAL_ERROR "No working GCC compiler found. Please check if Visual Studio VC is correctly installed.")
ENDIF(GCC_OK)
SET(MINGW_CHECK_DONE TRUE CACHE INTERNAL "MinGW check finished.")
ENDIF(NOT MINGW_CHECK_DONE)
OMPI_DEF_VAR(HAVE_INTERLOCKEDCOMPAREEXCHANGE "Whether we support 32 bits atomic operations on Windows" 0 0)
IF(${OMPI_COMPILER_BIT} STREQUAL "64")
OMPI_DEF_VAR(HAVE_INTERLOCKEDCOMPAREEXCHANGE64 "Whether we support 64 bits atomic operations on Windows" 0 0)
ENDIF(${OMPI_COMPILER_BIT} STREQUAL "64")
OMPI_DEF_VAR(HAVE_INTERLOCKEDCOMPAREEXCHANGEACQUIRE "Whether we support 32 bits atomic operations on Windows" 0 0)
OMPI_DEF_VAR(HAVE_INTERLOCKEDCOMPAREEXCHANGERELEASE "Whether we support 32 bits atomic operations on Windows" 0 0)
# a few definitions for shared memory support
OMPI_DEF(MCA_COMMON_SM_WINDOWS 1 "Whether we have shared memory support for Windows or not." 0 1)
OMPI_DEF(MCA_COMMON_SM_SYSV 0 "Whether we have shared memory support for SYSV or not." 0 1)
OMPI_DEF(MCA_COMMON_SM_POSIX 0 "Whether we have shared memory support for POSIX or not." 0 1)
OMPI_DEF(OPAL_HAVE_POSIX_THREADS 1 "Do we have POSIX threads." 0 1)
OMPI_CHECK_INCLUDE_FILE (sys/uio.h HAVE_SYS_UIO_H)
OMPI_CHECK_INCLUDE_FILE (sys/time.h HAVE_SYS_TIME_H)
OMPI_CHECK_INCLUDE_FILE (windows.h HAVE_WINDOWS_H)
OMPI_CHECK_INCLUDE_FILE (winsock2.h HAVE_WINSOCK2_H)
OMPI_CHECK_INCLUDE_FILE (wdm.h HAVE_WDM_H)
OMPI_CHECK_INCLUDE_FILE (malloc.h HAVE_MALLOC_H)
OMPI_CHECK_INCLUDE_FILE (memory.h HAVE_MEMORY_H)
OMPI_CHECK_INCLUDE_FILE (signal.h HAVE_SIGNAL_H)
OMPI_CHECK_INCLUDE_FILE (stdarg.h HAVE_STDARG_H)
OMPI_CHECK_INCLUDE_FILE (stdint.h HAVE_STDINT_H)
OMPI_CHECK_INCLUDE_FILE (stdlib.h HAVE_STDLIB_H)
OMPI_CHECK_INCLUDE_FILE (string.h HAVE_STRING_H)
OMPI_CHECK_INCLUDE_FILE (sys/stat.h HAVE_SYS_STAT_H)
OMPI_CHECK_INCLUDE_FILE (sys/types.h HAVE_SYS_TYPES_H)
OMPI_CHECK_INCLUDE_FILE (time.h HAVE_TIME_H)
OMPI_CHECK_INCLUDE_FILE(stddef.h OPAL_STDC_HEADERS)
OMPI_CHECK_FUNCTION_EXISTS (ceil HAVE_CEIL)
OMPI_CHECK_FUNCTION_EXISTS (execve HAVE_EXECVE)
OMPI_CHECK_FUNCTION_EXISTS (isatty HAVE_ISATTY)
OMPI_CHECK_FUNCTION_EXISTS (vsnprintf HAVE_VSNPRINTF)
CHECK_C_TYPE_EXISTS(socklen_t SOCKLEN_T "winsock2.h;ws2tcpip.h")
CHECK_C_TYPE_EXISTS("struct sockaddr_in" STRUCT_SOCKADDR_IN "winsock2.h")
CHECK_C_TYPE_EXISTS("struct sockaddr_in6" STRUCT_SOCKADDR_IN6 "ws2tcpip.h")
CHECK_C_TYPE_EXISTS("struct sockaddr_storage" STRUCT_SOCKADDR_STORAGE "winsock2.h;ws2tcpip.h")
OMPI_CHECK_SYMBOL_EXISTS (AF_UNSPEC winsock2.h HAVE_DECL_AF_UNSPEC)
OMPI_CHECK_SYMBOL_EXISTS (PF_UNSPEC winsock2.h HAVE_DECL_PF_UNSPEC)
OMPI_CHECK_SYMBOL_EXISTS (AF_INET6 winsock2.h HAVE_DECL_AF_INET6)
OMPI_CHECK_SYMBOL_EXISTS (PF_INET6 winsock2.h HAVE_DECL_PF_INET6)

Разница между файлами не показана из-за своего большого размера Загрузить разницу

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

@ -1,120 +0,0 @@
#
# Copyright (c) 2010 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
#Generate content for opal_config.h.cmake
#
# NAME: name of the variable to be defined in configure file
# VALUE: value to be defined for the variable
# DESC: description of the definition
# IS_STR: whether this variable should be defined with quotation marks
# FORCE_DEF: whether use "#cmakedefiine" or just "#define" in the line
# VAR_FORMAT: whether we should use the variable name instead of the value
# in the template file.
MACRO(APPEND_CONFIG_FILE NAME VAR_NAME VALUE DESC IS_STR FORCE_DEF VAR_FORMAT)
UNSET(APPEND_STRING)
IF(${VAR_FORMAT})
IF(${IS_STR})
IF(${FORCE_DEF})
SET(APPEND_STRING "/* ${DESC} */\n#define ${NAME} \"\${${VAR_NAME}}\"\n\n")
ELSE(${FORCE_DEF})
SET(APPEND_STRING "/* ${DESC} */\n#cmakedefine ${NAME} \"\${${VAR_NAME}}\"\n\n")
ENDIF(${FORCE_DEF})
ELSE(${IS_STR})
IF(${FORCE_DEF})
SET(APPEND_STRING "/* ${DESC} */\n#define ${NAME} \${${VAR_NAME}}\n\n")
ELSE(${FORCE_DEF})
SET(APPEND_STRING "/* ${DESC} */\n#cmakedefine ${NAME} \${${VAR_NAME}}\n\n")
ENDIF(${FORCE_DEF})
ENDIF(${IS_STR})
ELSE(${VAR_FORMAT})
IF(${IS_STR})
IF(${FORCE_DEF})
SET(APPEND_STRING "/* ${DESC} */\n#define ${NAME} \"${VALUE}\"\n\n")
ELSE(${FORCE_DEF})
SET(APPEND_STRING "/* ${DESC} */\n#cmakedefine ${NAME} \"${VALUE}\"\n\n")
ENDIF(${FORCE_DEF})
ELSE(${IS_STR})
IF(${FORCE_DEF})
SET(APPEND_STRING "/* ${DESC} */\n#define ${NAME} ${VALUE}\n\n")
ELSE(${FORCE_DEF})
SET(APPEND_STRING "/* ${DESC} */\n#cmakedefine ${NAME} ${VALUE}\n\n")
ENDIF(${FORCE_DEF})
ENDIF(${IS_STR})
ENDIF(${VAR_FORMAT})
FILE(APPEND ${OpenMPI_BINARY_DIR}/opal/include/opal_config.h.cmake
${APPEND_STRING})
ENDMACRO(APPEND_CONFIG_FILE NAME VAR_NAME VALUE DESC IS_STR FORCE_DEF VAR_FORMAT)
#define a name with value and
#write the line in template file.
MACRO(OMPI_DEF NAME VALUE DESC IS_STR FORCE_DEF)
SET(${NAME} ${VALUE})
APPEND_CONFIG_FILE(${NAME} ${NAME} "${VALUE}" ${DESC} ${IS_STR} ${FORCE_DEF} 0)
ENDMACRO(OMPI_DEF NAME VALUE DESC IS_STR FORCE_DEF)
#define a name with variable and
#write the line in template file.
MACRO(OMPI_DEF_VAR NAME DESC IS_STR FORCE_DEF)
APPEND_CONFIG_FILE(${NAME} ${NAME} "" ${DESC} ${IS_STR} ${FORCE_DEF} 1)
ENDMACRO(OMPI_DEF_VAR NAME DESC IS_STR FORCE_DEF)
#define/cache a name with value and
#write the line in template file.
MACRO(OMPI_DEF_CACHE NAME VALUE CACHE_TYPE DESC IS_STR FORCE_DEF)
SET(${NAME} ${VALUE} CACHE ${CACHE_TYPE} "${DESC}")
APPEND_CONFIG_FILE(${NAME} ${NAME} ${VALUE} ${DESC} ${IS_STR} ${FORCE_DEF} 0)
ENDMACRO(OMPI_DEF_CACHE NAME VALUE OPT DESC IS_STR FORCE_DEF)
#define/cache a name with variable and
#write the line in template file.
MACRO(OMPI_DEF_CACHE_VAR NAME VALUE CACHE_TYPE DESC IS_STR FORCE_DEF)
SET(${NAME} ${VALUE} CACHE ${CACHE_TYPE} "${DESC}")
APPEND_CONFIG_FILE(${NAME} ${NAME} "" ${DESC} ${IS_STR} ${FORCE_DEF} 1)
ENDMACRO(OMPI_DEF_CACHE_VAR NAME VALUE OPT DESC IS_STR FORCE_DEF)
#add an configure option and
#write the line in template file.
MACRO(OMPI_DEF_OPT OPT_NAME DEF_NAME DESC DEFAULT_VAL)
UNSET(APPEND_STRING)
OPTION(${OPT_NAME} "${DESC}" ${DEFAULT_VAL})
IF(${${OPT_NAME}} STREQUAL "OFF")
SET(${DEF_NAME}_VAL 0)
ELSE(${${OPT_NAME}} STREQUAL "OFF")
SET(${DEF_NAME}_VAL 1)
ENDIF(${${OPT_NAME}} STREQUAL "OFF")
SET(${DEF_NAME} ${${DEF_NAME}_VAL} CACHE INTERNAL "${DEF_NAME}")
APPEND_CONFIG_FILE(${DEF_NAME} ${DEF_NAME}_VAL "" ${DESC} 0 1 1)
ENDMACRO(OMPI_DEF_OPT OPT_NAME DEF_NAME DESC DEFAULT_VAL)

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

@ -1,53 +0,0 @@
# Copyright (c) 2010 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
FILE(GLOB OMPI_EXT_BASE_FILES ${PROJECT_SOURCE_DIR}/mpiext/*.h ${PROJECT_SOURCE_DIR}/mpiext/*.c)
SOURCE_GROUP(mpiext FILES ${OMPI_EXT_BASE_FILES})
SET(OMPI_EXT_FILES ${OMPI_EXT_FILES} ${OMPI_EXT_BASE_FILES})
CHECK_SUBDIRS("${PROJECT_SOURCE_DIR}/mpiext" OMPI_EXT_SUBDIRS)
FOREACH(OMPI_MPIEXT_COMPONENT ${OMPI_MPIEXT_COMPONENTS})
LIST(FIND OMPI_EXT_SUBDIRS ${OMPI_MPIEXT_COMPONENT} VALID_COMPONENT)
IF(NOT VALID_COMPONENT EQUAL -1)
FILE(GLOB ${OMPI_MPIEXT_COMPONENT}_FILES
${PROJECT_SOURCE_DIR}/mpiext/${OMPI_MPIEXT_COMPONENT}/*.h ${PROJECT_SOURCE_DIR}/mpiext/${OMPI_MPIEXT_COMPONENT}/*.c)
SOURCE_GROUP(mpiext\\${OMPI_MPIEXT_COMPONENT} FILES ${${OMPI_MPIEXT_COMPONENT}_FILES})
FILE(GLOB ${OMPI_MPIEXT_COMPONENT}_C_FILES
${PROJECT_SOURCE_DIR}/mpiext/${OMPI_MPIEXT_COMPONENT}/c/*.h ${PROJECT_SOURCE_DIR}/mpiext/${OMPI_MPIEXT_COMPONENT}/c/*.c)
SOURCE_GROUP(mpiext\\${OMPI_MPIEXT_COMPONENT}\\c FILES ${${OMPI_MPIEXT_COMPONENT}_C_FILES})
SET(OMPI_EXT_FILES ${OMPI_EXT_FILES} ${${OMPI_MPIEXT_COMPONENT}_FILES} ${${OMPI_MPIEXT_COMPONENT}_C_FILES})
ENDIF(NOT VALID_COMPONENT EQUAL -1)
ENDFOREACH(OMPI_MPIEXT_COMPONENT ${OMPI_MPIEXT_COMPONENTS})
# write out static-component.h for this mca.
FILE(WRITE "${PROJECT_BINARY_DIR}/mpiext/static-components.h"
"/*
* $HEADER$
*/
#if defined(c_plusplus) || defined(__cplusplus)
extern \"C\" {
#endif
const ompi_mpiext_component_t *ompi_mpiext_components[] = {
NULL
};
#if defined(c_plusplus) || defined(__cplusplus)
}
#endif
")

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

@ -1,48 +0,0 @@
# Copyright (c) 2008-2010 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
#
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# OMPI_FIND_TYPE(type, [list of c types], abort if not found,
# target size, variable to set)
# -----------------------------------------------------------
MACRO(OMPI_FIND_TYPE TYPE TYPE_LIST ABORT TARGET_SIZE OUTPUT_VARIABLE)
SET(oft_abort_on_fail "${ABORT}")
SET(oft_target_size ${TARGET_SIZE})
MESSAGE(STATUS "Check corresponding C type of ${TYPE}...")
SET(oft_real_type "")
IF(NOT "${oft_target_size}" STREQUAL "")
FOREACH(oft_type ${TYPE_LIST})
STRING(REGEX REPLACE " " "_" oft_type_name ${oft_type})
STRING(TOUPPER ${oft_type_name} oft_type_name)
IF(SIZEOF_${oft_type_name} EQUAL oft_target_size)
SET(oft_real_type ${oft_type})
BREAK()
ENDIF(SIZEOF_${oft_type_name} EQUAL oft_target_size)
ENDFOREACH(oft_type ${TYPE_LIST})
ENDIF(NOT "${oft_target_size}" STREQUAL "")
IF("${oft_real_type}" STREQUAL "")
SET(OUTPUT_VARIABLE "")
MESSAGE(STATUS "*** Did not find corresponding C type of ${TYPE}")
IF("${oft_abort_on_fail}" STREQUAL "yes")
MESSAGE(FATAL_ERROR "Cannot continue.")
ENDIF("${oft_abort_on_fail}" STREQUAL "yes")
ELSE("${oft_real_type}" STREQUAL "")
SET(${OUTPUT_VARIABLE} "${oft_real_type}")
MESSAGE(STATUS "Check corresponding C type of ${TYPE}... ${oft_real_type}")
ENDIF("${oft_real_type}" STREQUAL "")
ENDMACRO(OMPI_FIND_TYPE TYPE TYPE_LIST ABORT TARGET_SIZE OUTPUT_VARIABLE)

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

@ -1,131 +0,0 @@
# Copyright (c) 2010-2012 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# Only one libevent component should be used, selection is done by editing .windows in_use property.
FILE(STRINGS ${CURRENT_PATH}/.windows IN_USE REGEX "^in_use=")
STRING(REPLACE "in_use=" "" IN_USE ${IN_USE})
STRING(REGEX MATCH "libevent[0-9]+" libevent_dir "${CURRENT_PATH}")
IF(${IN_USE} STREQUAL "0")
SET(RESULT FALSE)
ELSE(${IN_USE} STREQUAL "0")
SET(LIBEVENT_FOUND TRUE CACHE INTERNAL "allow only one event mca.")
MESSAGE(STATUS "configure libevent.")
# set up event include directories.
INCLUDE_DIRECTORIES ("${CURRENT_PATH}/libevent/compat"
"${CURRENT_PATH}/libevent/WIN32-Code/"
"${CURRENT_PATH}/libevent/include/"
"${CURRENT_PATH}/libevent"
"${PROJECT_BINARY_DIR}/mca/event/${libevent_dir}")
SET(LIBEVENT_INCLUDE_DIRS ${CURRENT_PATH}/libevent/compat;${CURRENT_PATH}/libevent/WIN32-Code/;${CURRENT_PATH}/libevent/include/;${CURRENT_PATH}/libevent;${PROJECT_BINARY_DIR}/mca/event/${libevent_dir}/
CACHE INTERNAL "the libevent dirs that have to be included on the top level.")
IF(WIN32)
# generating config.h
# windows doesn't need this file, just make an empty one
FILE(WRITE ${PROJECT_BINARY_DIR}/mca/event/${libevent_dir}/libevent/config.h
" /* config.h. Generated automatically by CMake. */ ")
SET(RESULT_COMPONENT_FILES
${RESULT_COMPONENT_FILES}
${CURRENT_PATH}/${libevent_dir}_component.c
${CURRENT_PATH}/${libevent_dir}_module.c
#system sources
${CURRENT_PATH}/libevent/win32select.c
${CURRENT_PATH}/libevent/evthread_win32.c
${CURRENT_PATH}/libevent/buffer_iocp.c
${CURRENT_PATH}/libevent/event_iocp.c
${CURRENT_PATH}/libevent/bufferevent_async.c
#core sources
${CURRENT_PATH}/libevent/event.c
${CURRENT_PATH}/libevent/evthread.c
${CURRENT_PATH}/libevent/buffer.c
${CURRENT_PATH}/libevent/bufferevent.c
${CURRENT_PATH}/libevent/bufferevent_sock.c
${CURRENT_PATH}/libevent/bufferevent_pair.c
${CURRENT_PATH}/libevent/listener.c
${CURRENT_PATH}/libevent/bufferevent_ratelim.c
${CURRENT_PATH}/libevent/evmap.c
${CURRENT_PATH}/libevent/log.c
${CURRENT_PATH}/libevent/evutil.c
${CURRENT_PATH}/libevent/evutil_rand.c
${CURRENT_PATH}/libevent/strlcpy.c
${CURRENT_PATH}/libevent/signal.c
)
IF(WINDOWS_MINGW)
SET_SOURCE_FILES_PROPERTIES(${CURRENT_PATH}/libevent/win32select.c
${CURRENT_PATH}/libevent/evthread_win32.c
${CURRENT_PATH}/libevent/buffer_iocp.c
${CURRENT_PATH}/libevent/bufferevent_async.c
${CURRENT_PATH}/libevent/event.c
${CURRENT_PATH}/libevent/evthread.c
${CURRENT_PATH}/libevent/bufferevent.c
${CURRENT_PATH}/libevent/bufferevent_sock.c
${CURRENT_PATH}/libevent/bufferevent_pair.c
${CURRENT_PATH}/libevent/bufferevent_ratelim.c
${CURRENT_PATH}/libevent/evmap.c
${CURRENT_PATH}/libevent/log.c
${CURRENT_PATH}/libevent/evutil_rand.c
${CURRENT_PATH}/libevent/strlcpy.c
${CURRENT_PATH}/libevent/signal.c
PROPERTIES COMPILE_FLAGS "-D intptr_t=int -D _INTPTR_T_DEFINED")
SET(OBJ_PATH "${PROJECT_BINARY_DIR}/${CMAKE_FILES_DIRECTORY}/libopen-pal.dir/mca/event/${libevent_dir}/libevent")
SET(EVENT_OBJ_FILES "${OBJ_PATH}/*.obj" CACHE INTERNAL "event obj files")
ELSEIF(WINDOWS_VS)
SET(OBJ_PATH "${PROJECT_BINARY_DIR}/libopen-pal.dir/${CMAKE_CFG_INTDIR}")
# for generating the static library, as opal will not export event API any more.
SET(EVENT_OBJ_FILES
${OBJ_PATH}/win32select.obj
${OBJ_PATH}/evthread_win32.obj
${OBJ_PATH}/buffer_iocp.obj
${OBJ_PATH}/event_iocp.obj
${OBJ_PATH}/bufferevent_async.obj
${OBJ_PATH}/event.obj
${OBJ_PATH}/evthread.obj
${OBJ_PATH}/buffer.obj
${OBJ_PATH}/bufferevent.obj
${OBJ_PATH}/bufferevent_sock.obj
${OBJ_PATH}/bufferevent_pair.obj
${OBJ_PATH}/listener.obj
${OBJ_PATH}/bufferevent_ratelim.obj
${OBJ_PATH}/evmap.obj
${OBJ_PATH}/log.obj
${OBJ_PATH}/evutil.obj
${OBJ_PATH}/evutil_rand.obj
${OBJ_PATH}/strlcpy.obj
${OBJ_PATH}/signal.obj
CACHE INTERNAL "event obj files")
ENDIF(WINDOWS_MINGW)
OMPI_DEF(OPAL_HAVE_WORKING_EVENTOPS 1
"Whether our event component has working event operations or not if not, then assumedly it only has working timers and signals)." 0 1)
OMPI_DEF(MCA_event_IMPLEMENTATION_HEADER "${CURRENT_PATH}/${libevent_dir}.h"
"Header to include for event implementation" 1 1)
SET(LIBEVENT_CONFIG_DONE TRUE CACHE INTERNAL "Libevent config done.")
ELSE(WIN32)
SET(RESULT_COMPONENT_FILES
${RESULT_COMPONENT_FILES}
)
ENDIF(WIN32)
SET(RESULT TRUE)
ENDIF(${IN_USE} STREQUAL "0")

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

@ -1,55 +0,0 @@
#
# Copyright (c) 2009-2010 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
#
# Functions that are re-written from config/opal_functions.m4, and to be continued...
#
# OPAL_WITH_OPTION_MIN_MAX_VALUE(NAME,DEFAULT_VALUE,LOWER_BOUND,UPPER_BOUND)
# Defines a variable OPAL_MAX_xxx, with "xxx" being specified as the first parameter.
# If not set at configure-time, the default-value is assumed.
# If set, value is checked against lower and upper bound
#
MACRO(OPAL_WITH_OPTION_MIN_MAX_VALUE NAME DEFAULT_VALUE LOWER_BOUND UPPER_BOUND)
STRING(REPLACE "_" " " NAME_HELPER ${NAME})
STRING(TOUPPER "OPAL_MAX_${NAME}" OPTION_VALUE_VAR)
IF(NOT ${OPTION_VALUE_VAR})
MESSAGE(STATUS "Checking maximum length of ${NAME_HELPER}...")
MESSAGE(STATUS "Use default value ${DEFAULT_VALUE}.")
SET(${NAME}_OLD_VALUE ${DEFAULT_VALUE} CACHE INTERNAL "the value from the last configure.")
ENDIF(NOT ${OPTION_VALUE_VAR})
# check if the value is changed.
IF(NOT ${${OPTION_VALUE_VAR}} EQUAL ${NAME}_OLD_VALUE)
MESSAGE(STATUS "Checking maximum length of ${NAME_HELPER}...")
# check if the value is in the range.
IF(NOT ${${OPTION_VALUE_VAR}} EQUAL 0 AND NOT ${${OPTION_VALUE_VAR}} EQUAL no AND NOT ${${OPTION_VALUE_VAR}} EQUAL NO)
IF(${${OPTION_VALUE_VAR}} LESS ${LOWER_BOUND} OR ${${OPTION_VALUE_VAR}} GREATER ${UPPER_BOUND})
MESSAGE(FATAL_ERROR "${OPTION_VALUE_VAR} is out of range(${LOWER_BOUND}-${UPPER_BOUND}). Cannot continue.")
ENDIF(${${OPTION_VALUE_VAR}} LESS ${LOWER_BOUND} OR ${${OPTION_VALUE_VAR}} GREATER ${UPPER_BOUND})
ELSE(NOT ${${OPTION_VALUE_VAR}} EQUAL 0 AND NOT ${${OPTION_VALUE_VAR}} EQUAL no AND NOT ${${OPTION_VALUE_VAR}} EQUAL NO)
MESSAGE(FATAL_ERROR "Bad value for ${OPTION_VALUE_VAR}. Cannot continue.")
ENDIF(NOT ${${OPTION_VALUE_VAR}} EQUAL 0 AND NOT ${${OPTION_VALUE_VAR}} EQUAL no AND NOT ${${OPTION_VALUE_VAR}} EQUAL NO)
SET(${NAME}_OLD_VALUE ${${OPTION_VALUE_VAR}} CACHE INTERNAL "the value from the last configure.")
ENDIF(NOT ${${OPTION_VALUE_VAR}} EQUAL ${NAME}_OLD_VALUE)
OMPI_DEF_CACHE_VAR(${OPTION_VALUE_VAR} ${DEFAULT_VALUE} STRING
"maximum length of ${NAME} (${LOWER_BOUND}-${UPPER_BOUND}). (Default: ${DEFAULT_VALUE}.)." 0 1)
ENDMACRO(OPAL_WITH_OPTION_MIN_MAX_VALUE NAME DEFAULT_VALUE LOWER_BOUND UPPER_BOUND)

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

@ -1,117 +0,0 @@
#
# Copyright (c) 2007-2012 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
FILE(STRINGS ${OpenMPI_SOURCE_DIR}/VERSION VALUE REGEX "^major=")
STRING(REPLACE "major=" "" MAJOR_VERSION ${VALUE})
FILE(STRINGS ${OpenMPI_SOURCE_DIR}/VERSION VALUE REGEX "^minor=")
STRING(REPLACE "minor=" "" MINOR_VERSION ${VALUE})
FILE(STRINGS ${OpenMPI_SOURCE_DIR}/VERSION VALUE REGEX "^release=")
STRING(REPLACE "release=" "" RELEASE_VERSION ${VALUE})
FILE(STRINGS ${OpenMPI_SOURCE_DIR}/VERSION VALUE REGEX "^greek=")
STRING(REPLACE "greek=" "" GREEK_VERSION ${VALUE})
FILE(STRINGS ${OpenMPI_SOURCE_DIR}/VERSION VALUE REGEX "^want_repo_rev=")
STRING(REPLACE "want_repo_rev=" "" WANT_REPO_REV ${VALUE})
FILE(STRINGS ${OpenMPI_SOURCE_DIR}/VERSION VALUE REGEX "^repo_rev=")
STRING(REPLACE "repo_rev=" "" REPO_REV ${VALUE})
FILE(STRINGS ${OpenMPI_SOURCE_DIR}/VERSION VALUE REGEX "^date=")
STRING(REPLACE "date=" "" RELEASE_DATE ${VALUE})
STRING(REPLACE "\"" "" RELEASE_DATE ${RELEASE_DATE})
IF(${RELEASE_VERSION} EQUAL 0)
SET(VERSION_STRING ${MAJOR_VERSION}.${MINOR_VERSION}${GREEK_VERSION})
ELSE(${RELEASE_VERSION} EQUAL 0)
SET(VERSION_STRING ${MAJOR_VERSION}.${MINOR_VERSION}.${RELEASE_VERSION}${GREEK_VERSION})
ENDIF(${RELEASE_VERSION} EQUAL 0)
# Get the svn version
IF("${WANT_REPO_REV}" STREQUAL "1")
IF("${REPO_REV}" STREQUAL "-1")
# for VS.NET2003 users working with web projects, we should also check "_svn"
IF(EXISTS ${OpenMPI_SOURCE_DIR}/.svn OR EXISTS ${OpenMPI_SOURCE_DIR}/_svn)
EXECUTE_PROCESS (COMMAND svnversion -n
WORKING_DIRECTORY ${OpenMPI_SOURCE_DIR}
OUTPUT_VARIABLE OUTPUT
RESULT_VARIABLE RESULT
ERROR_VARIABLE ERROR)
IF(NOT RESULT STREQUAL "0")
# subversion might be not installed, let's try TortoiseSVN.
EXECUTE_PROCESS (COMMAND SubWCRev
. contrib/platform/win32/ConfigFiles/revision.in
${OpenMPI_BINARY_DIR}/revision
WORKING_DIRECTORY ${OpenMPI_SOURCE_DIR}
OUTPUT_VARIABLE OUTPUT
RESULT_VARIABLE RESULT
ERROR_VARIABLE ERROR)
IF(RESULT STREQUAL "0")
FILE(STRINGS ${OpenMPI_BINARY_DIR}/revision OUTPUT REGEX "[0-9]*")
ENDIF(RESULT STREQUAL "0")
ENDIF(NOT RESULT STREQUAL "0")
ELSEIF(EXISTS ${OpenMPI_SOURCE_DIR}/.hg)
EXECUTE_PROCESS (COMMAND hg -v -R . tip
WORKING_DIRECTORY ${OpenMPI_SOURCE_DIR}
OUTPUT_VARIABLE OUTPUT
RESULT_VARIABLE RESULT
ERROR_VARIABLE ERROR)
STRING(REGEX REPLACE "changeset:[^:]*:" "" OUTPUT ${OUTPUT})
STRING(REGEX REPLACE "tag.*" "" OUTPUT ${OUTPUT})
STRING(REPLACE "\n" "" OUTPUT ${OUTPUT})
ENDIF(EXISTS ${OpenMPI_SOURCE_DIR}/.svn OR EXISTS ${OpenMPI_SOURCE_DIR}/_svn)
IF(NOT RESULT STREQUAL "0")
MESSAGE(STATUS "SVN ERROR:${RESULT} ${ERROR}")
ELSE(NOT RESULT STREQUAL "0")
IF(${RESULT} EQUAL 0 AND NOT "${OUTPUT}" STREQUAL "exported" )
SET(SVN_VERSION "r${OUTPUT}")
ENDIF(${RESULT} EQUAL 0 AND NOT "${OUTPUT}" STREQUAL "exported")
ENDIF(NOT RESULT STREQUAL "0")
ENDIF("${REPO_REV}" STREQUAL "-1")
SET(VERSION_STRING ${VERSION_STRING}${SVN_VERSION})
ELSE("${WANT_REPO_REV}" STREQUAL "1")
SET(SVN_VERSION ${REPO_REV})
ENDIF("${WANT_REPO_REV}" STREQUAL "1")
# Set OPAL versions
OMPI_DEF(OPAL_WANT_REPO_REV ${WANT_REPO_REV} "SVN verstion of OPAL" 1 1)
OMPI_DEF(OPAL_REPO_REV "${SVN_VERSION}" "SVN verstion of OPAL" 1 1)
OMPI_DEF(OPAL_GREEK_VERSION "${GREEK_VERSION}" "Greek - alpha, beta, etc - release number of Open Portable Access Layer." 1 1)
OMPI_DEF(OPAL_MAJOR_VERSION ${MAJOR_VERSION} "Major release number of Open Portable Access Layer." 0 1)
OMPI_DEF(OPAL_MINOR_VERSION ${MINOR_VERSION} "Minor release number of Open Portable Access Layer." 0 1)
OMPI_DEF(OPAL_RELEASE_VERSION ${RELEASE_VERSION} "Release number of Open Portable Access Layer." 0 1)
OMPI_DEF(OPAL_VERSION ${VERSION_STRING} "Complete release number of Open Portable Access Layer." 1 1)
OMPI_DEF(OPAL_IDENT_STRING ${VERSION_STRING} "ident string for Open MPI." 1 1)
# Set OMPI versions
OMPI_DEF(OMPI_WANT_REPO_REV ${WANT_REPO_REV} "SVN verstion of OMPI" 1 1)
OMPI_DEF(OMPI_REPO_REV "${SVN_VERSION}" "SVN verstion of OMPI" 1 1)
OMPI_DEF(OMPI_GREEK_VERSION "${GREEK_VERSION}" "Greek - alpha, beta, etc - release number of Open Portable Access Layer." 1 1)
OMPI_DEF(OMPI_MAJOR_VERSION ${MAJOR_VERSION} "Major release number of Open MPI." 0 1)
OMPI_DEF(OMPI_MINOR_VERSION ${MINOR_VERSION} "Minor release number of Open MPI." 0 1)
OMPI_DEF(OMPI_RELEASE_VERSION ${RELEASE_VERSION} "Release number of Open MPI." 0 1)
OMPI_DEF(OMPI_VERSION ${VERSION_STRING} "Complete release number of Open MPI." 1 1)
# Set ORTE versions
OMPI_DEF(ORTE_WANT_REPO_REV ${WANT_REPO_REV} "SVN verstion of ORTE" 1 1)
OMPI_DEF(ORTE_REPO_REV "${SVN_VERSION}" "SVN verstion of ORTE" 1 1)
OMPI_DEF(ORTE_GREEK_VERSION "${GREEK_VERSION}" "Greek - alpha, beta, etc - release number of Open Run-Time Environment." 1 1)
OMPI_DEF(ORTE_MAJOR_VERSION ${MAJOR_VERSION} "Major release number of Open Run-Time Environment." 0 1)
OMPI_DEF(ORTE_MINOR_VERSION ${MINOR_VERSION} "Minor release number of Open Run-Time Environment." 0 1)
OMPI_DEF(ORTE_RELEASE_VERSION ${RELEASE_VERSION} "Release number of Open Run-Time Environment." 0 1)
OMPI_DEF(ORTE_VERSION ${VERSION_STRING} "Complete release number of Open Run-Time Environment." 1 1)

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

@ -1,84 +0,0 @@
# 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(HWLOC_PATH ${CURRENT_PATH} CACHE INERNAL "path to hwloc dir")
IF(WIN32)
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
)
IF(WINDOWS_VS)
SET(OBJ_PATH "${PROJECT_BINARY_DIR}/libopen-pal.dir/${CMAKE_CFG_INTDIR}")
# for generating the static library, as opal will not export event API any more.
SET(HWLOC_OBJ_FILES
${OBJ_PATH}/${hwloc_dir}_component.obj
${OBJ_PATH}/bind.obj
${OBJ_PATH}/cpuset.obj
${OBJ_PATH}/distances.obj
${OBJ_PATH}/dolib.obj
${OBJ_PATH}/misc.obj
${OBJ_PATH}/topology-libpci.obj
${OBJ_PATH}/topology-synthetic.obj
${OBJ_PATH}/topology-windows.obj
${OBJ_PATH}/topology-x86.obj
${OBJ_PATH}/topology-xml.obj
${OBJ_PATH}/topology.obj
${OBJ_PATH}/traversal.obj
CACHE INTERNAL "hwloc obj files")
ELSEIF(WINDOWS_MINGW)
SET(OBJ_PATH "${PROJECT_BINARY_DIR}/libopen-pal.dir/${CMAKE_CFG_INTDIR}")
# for generating the static library, as opal will not export event API any more.
SET(HWLOC_OBJ_FILES
${OBJ_PATH}/${hwloc_dir}_component.obj
${OBJ_PATH}/bind.obj
${OBJ_PATH}/cpuset.obj
${OBJ_PATH}/distances.obj
${OBJ_PATH}/dolib.obj
${OBJ_PATH}/misc.obj
${OBJ_PATH}/topology-libpci.obj
${OBJ_PATH}/topology-synthetic.obj
${OBJ_PATH}/topology-windows.obj
${OBJ_PATH}/topology-x86.obj
${OBJ_PATH}/topology-xml.obj
${OBJ_PATH}/topology.obj
${OBJ_PATH}/traversal.obj
CACHE INTERNAL "hwloc obj files")
ENDIF(WINDOWS_VS)
ELSE(WIN32)
SET(RESULT_COMPONENT_FILES
${RESULT_COMPONENT_FILES}
)
ENDIF(WIN32)
SET(RESULT TRUE)

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

@ -1,173 +0,0 @@
# Copyright (c) 2008-2010 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
#
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# first try to find a fortran compiler, will be checked when fortran support is enabled.
# There might be a bug in CMake, the CMAKE_GENERATOR_FC is set to "ifort" by default,
# which causes CMake can't find the correct Fortran compiler.
# We have to set CMAKE_GENERATOR_FC empty.
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)
# Get the size of a C size_t; that's the size of the Fortran
# MPI_OFFSET_KIND
MESSAGE( STATUS "Checking size of C size_t...")
FILE (WRITE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/check_sizeof_sizet.c"
"#include <stddef.h>
int main() {return sizeof(size_t);}
")
TRY_RUN(SIZEOF_C_SIZE_T COMPILE_RESULT "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/"
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/check_sizeof_sizet.c")
SET(OMPI_MPI_OFFSET_KIND ${SIZEOF_C_SIZE_T} CACHE INTERNAL "MPI_OFFSET_KIND")
# MPI_INTEGER_KIND is always 4
SET(OMPI_MPI_INTEGER_KIND 4 CACHE INTERNAL "MPI_INTEGER_KIND")
# MPI_ADDRESS_KIND is the size of a C (void*), which is built-in to
# Cmake.
SET(OMPI_MPI_ADDRESS_KIND ${CMAKE_SIZEOF_VOID_P} CACHE INTERNAL "MPI_ADDRESS_KIND")
# Finally, set the number of integers in MPI_STATUS_SIZE (it's 4
# integers plus 1 size_t).
MATH( EXPR __ompi_f_status "(4+(${SIZEOF_C_SIZE_T}/4))")
SET(OMPI_FORTRAN_STATUS_SIZE ${__ompi_f_status} CACHE INTERNAL "MPI_STATUS_SIZE")
# Default compiler settings.
IF(${FORTRAN} STREQUAL "ifort.exe")
#settings for Intel Fortran
SET(FORTRAN_OPTION_COMPILE "/c" CACHE INTERNAL
"Fortran compiler option for compiling without linking.")
SET(FORTRAN_OUTPUT_OBJ "/Fo" CACHE INTERNAL
"Fortran compiler option for setting object file name.")
SET(FORTRAN_OUTPUT_EXE "/Fe" CACHE INTERNAL
"Fortran compiler option for setting executable file name.")
SET(FORTRAN_DYNAMIC_FLAG_DEBUG "/MDd" CACHE INTERNAL
"Compile flag for using dynamically-loaded, multithread C runtime (Debug).")
SET(FORTRAN_DYNAMIC_FLAG "/MD" CACHE INTERNAL
"Compile flag for using dynamically-loaded, multithread C runtime.")
IF(NOT "$ENV{IFORT_COMPILER11}" STREQUAL "")
SET(IFORT_LIB_PATH "$ENV{IFORT_COMPILER11}/lib/")
ELSEIF(NOT "$ENV{IFORT_COMPILER12}" STREQUAL "")
SET(IFORT_LIB_PATH "$ENV{IFORT_COMPILER12}/compiler/lib/")
ENDIF(NOT "$ENV{IFORT_COMPILER11}" STREQUAL "")
IF(CMAKE_CL_64)
SET(FORTRAN_LIB_PATH "${IFORT_LIB_PATH}/intel64")
ELSE(CMAKE_CL_64)
SET(FORTRAN_LIB_PATH "${IFORT_LIB_PATH}/ia32")
ENDIF(CMAKE_CL_64)
IF(NOT FORTRAN_LIB_PATH)
IF(CMAKE_CL_64)
FIND_LIBRARY(FORTRAN_IFCONSOL_LIB ifconsol.lib PATHS ${FORTRAN_PATH}/../../intel64)
ELSE(CMAKE_CL_64)
FIND_LIBRARY(FORTRAN_IFCONSOL_LIB ifconsol.lib PATHS ${FORTRAN_PATH}/../../ia32)
ENDIF(CMAKE_CL_64)
GET_FILENAME_COMPONENT(FORTRAN_LIB_PATH ${FORTRAN_IFCONSOL_LIB} PATH)
UNSET(FORTRAN_IFCONSOL_LIB CACHE)
ELSE(NOT FORTRAN_LIB_PATH)
STRING(REPLACE "\\" "/" FORTRAN_LIB_PATH ${FORTRAN_LIB_PATH})
ENDIF(NOT FORTRAN_LIB_PATH)
ELSEIF(${FORTRAN} STREQUAL "g95.exe")
#settings for G95
SET(FORTRAN_OPTION_COMPILE "-c" CACHE INTERNAL
"Fortran compiler option for compiling without linking.")
SET(FORTRAN_OUTPUT_OBJ "-o" CACHE INTERNAL
"Fortran compiler option for setting object file name.")
SET(FORTRAN_OUTPUT_EXE "-o" CACHE INTERNAL
"Fortran compiler option for setting executable file name.")
ELSE(${FORTRAN} STREQUAL "ifort.exe")
# in other case, let user specify their fortran configrations.
SET(FORTRAN_OPTION_COMPILE "-c" CACHE STRING
"Fortran compiler option for compiling without linking.")
SET(FORTRAN_OUTPUT_OBJ "-o" CACHE STRING
"Fortran compiler option for setting object file name.")
SET(FORTRAN_OUTPUT_EXE "-o" CACHE STRING
"Fortran compiler option for setting executable file name.")
SET(FORTRAN_LIB_PATH "" CACHE PATH
"Library path for the fortran compiler")
SET(FORTRAN_INCLUDE_PATH "" CACHE PATH
"Include path for the fortran compiler")
ENDIF(${FORTRAN} STREQUAL "ifort.exe")
# Export env variables for fortran compiler.
SET(ENV{PATH} "${C_COMPILER_PATH};${FORTRAN_PATH};$ENV{PATH}")
SET(ENV{LIB} "${C_COMPILER_LIB};${FORTRAN_LIB_PATH};$ENV{LIB}")
SET(ENV{INCLUDE} "${C_COMPILER_INCLUDE};${FORTRAN_INCLUDE_PATH};$ENV{INCLUDE}")
SET(ENV{LIBPATH} "${C_COMPILER_LIBPATH};$ENV{LIBPATH}")
# make sure the compiler actually works, if not cross-compiling
MESSAGE(STATUS "Checking for working Fortran compiler...")
FILE(WRITE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompiler.f
"\t PROGRAM TESTFortran \n"
"\t PRINT *, 'Hello' \n"
"\t END \n")
# lets use execute_process to run the compile test
EXECUTE_PROCESS(COMMAND ${FORTRAN} testFortranCompiler.f
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp
OUTPUT_VARIABLE OUTPUT
RESULT_VARIABLE RESULT
ERROR_VARIABLE ERROR)
IF(RESULT)
SET(FORTRAN_SETUP_DONE FALSE CACHE INTERNAL "fortran setup done.")
MESSAGE(STATUS "${OUTPUT}\n${ERROR}")
MESSAGE(STATUS "Fortran compiler ${FORTRAN} can't compile a simple fortran program.")
MESSAGE(FATAL_ERROR "Cannot continue. Please check Fortran compiler installation, or disable Fortran 77 support.")
ELSE(RESULT)
MESSAGE(STATUS "Checking for working Fortran compiler...${FORTRAN}")
SET(FORTRAN_SETUP_DONE TRUE CACHE INTERNAL "fortran setup done.")
ENDIF(RESULT)
INCLUDE(FORTRAN_find_ext_symbol_convention)
# make sure we know the linking convention
# this macro will also test linking with C code
OMPI_FORTRAN_FIND_EXT_SYMBOL_CONVENTION()
ELSEIF(NOT OMPI_WANT_FORTRAN_BINDINGS)
SET(OMPI_FORTRAN_DOUBLE_UNDERSCORE 0
CACHE INTERNAL "external symbol convention - double underscore")
SET(OMPI_FORTRAN_SINGLE_UNDERSCORE 0
CACHE INTERNAL "external symbol convention - single underscore")
SET(OMPI_FORTRAN_CAPS 0
CACHE INTERNAL "external symbol convention - captital")
SET(OMPI_FORTRAN_PLAIN 0
CACHE INTERNAL "external symbol convention - plain")
UNSET(SYMBOL_CONVENTION_CHECK_DONE CACHE)
UNSET(FORTRAN_OPTION_COMPILE CACHE)
UNSET(FORTRAN_OUTPUT_OBJ CACHE)
UNSET(FORTRAN_OUTPUT_EXE CACHE)
UNSET(FORTRAN_LIB_PATH CACHE)
UNSET(FORTRAN_INCLUDE_PATH CACHE)
UNSET(FORTRAN_IFCONSOL_LIB CACHE)
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)
OMPI_DEF_VAR(OMPI_FORTRAN_CAPS "Whether fortran symbols are all caps or not." 0 1)
OMPI_DEF_VAR(OMPI_FORTRAN_PLAIN "Whether fortran symbols have no trailing underscore or not." 0 1)

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

@ -1 +0,0 @@
$WCREV$

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

@ -1,42 +0,0 @@
Flex carries the copyright used for BSD software, slightly modified
because it originated at the Lawrence Berkeley (not Livermore!) Laboratory,
which operates under a contract with the Department of Energy:
Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007 The Flex Project.
Copyright (c) 1990, 1997 The Regents of the University of California.
All rights reserved.
This code is derived from software contributed to Berkeley by
Vern Paxson.
The United States Government has rights in this work pursuant
to contract no. DE-AC03-76SF00098 between the United States
Department of Energy and the University of California.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
Neither the name of the University nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE.
This basically says "do whatever you please with this software except
remove this notice or take advantage of the University's (or the flex
authors') name".
Note that the "flex.skl" scanner skeleton carries no copyright notice.
You are free to do whatever you please with scanners generated using flex;
for them, you are not even bound by the above copyright.

Двоичные данные
contrib/platform/win32/bin/flex.exe

Двоичный файл не отображается.

Разница между файлами не показана из-за своего большого размера Загрузить разницу

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

@ -1,25 +0,0 @@
# Copyright (c) 2007-2012 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
ADD_SUBDIRECTORY(chello)
FILE(READ ${OpenMPI_SOURCE_DIR}/contrib/platform/win32/examples/chello/chello.vcxproj EXAMPLE_SOLUTION)
IF(CMAKE_CL_64)
STRING(REPLACE "Win32" "X64" EXAMPLE_SOLUTION "${EXAMPLE_SOLUTION}")
STRING(REPLACE "X86" "X64" EXAMPLE_SOLUTION "${EXAMPLE_SOLUTION}")
ENDIF(CMAKE_CL_64)
FILE(WRITE ${OpenMPI_BINARY_DIR}/contrib/platform/win32/examples/chello/chello.vcxproj "${EXAMPLE_SOLUTION}")
INSTALL(FILES ${OpenMPI_SOURCE_DIR}/contrib/platform/win32/examples/chello/chello.c
${OpenMPI_BINARY_DIR}/contrib/platform/win32/examples/chello/chello.vcxproj
DESTINATION share/examples)

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

@ -1,18 +0,0 @@
# Copyright (c) 2007-2012 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
#PROJECT(CHELLO C CXX)
SET(CHELLO_FILES
chello.c
)
ADD_EXECUTABLE (chello ${CHELLO_FILES})
TARGET_LINK_LIBRARIES (chello libmpi libopen-rte libopen-pal Ws2_32.lib shlwapi.lib)

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

@ -1,35 +0,0 @@
/* -*- C -*-
*
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology
* Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*
* The most basic of MPI applications
*/
#include <mpi.h>
#include <stdio.h>
int
main(int argc, char* argv[])
{
MPI_Init(&argc, &argv);
printf("Hello, World\n");
MPI_Finalize();
return 0;
}

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

@ -1,261 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="MinSizeRel|Win32">
<Configuration>MinSizeRel</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="RelWithDebInfo|Win32">
<Configuration>RelWithDebInfo</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGUID>{2D02214A-D960-4FED-95AA-A30F7784A0E3}</ProjectGUID>
<Keyword>Win32Proj</Keyword>
<Platform>Win32</Platform>
<ProjectName>chello</ProjectName>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.20506.1</_ProjectFileVersion>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">chello.dir\Debug\</IntDir>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">chello</TargetName>
<TargetExt Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.exe</TargetExt>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</GenerateManifest>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">chello.dir\Release\</IntDir>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">chello</TargetName>
<TargetExt Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.exe</TargetExt>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</GenerateManifest>
<IntDir Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|Win32'">chello.dir\MinSizeRel\</IntDir>
<TargetName Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|Win32'">chello</TargetName>
<TargetExt Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|Win32'">.exe</TargetExt>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|Win32'">false</LinkIncremental>
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|Win32'">true</GenerateManifest>
<IntDir Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|Win32'">chello.dir\RelWithDebInfo\</IntDir>
<TargetName Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|Win32'">chello</TargetName>
<TargetExt Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|Win32'">.exe</TargetExt>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|Win32'">true</LinkIncremental>
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|Win32'">true</GenerateManifest>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<AdditionalOptions> /Zm1000 %(AdditionalOptions)</AdditionalOptions>
<AdditionalIncludeDirectories>..\..\include</AdditionalIncludeDirectories>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<CompileAs>CompileAsC</CompileAs>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<ExceptionHandling>
</ExceptionHandling>
<InlineFunctionExpansion>Disabled</InlineFunctionExpansion>
<Optimization>Disabled</Optimization>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
<PreprocessorDefinitions>WIN32;_WINDOWS;_DEBUG;CMAKE_INTDIR="Debug";%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AssemblerListingLocation>Debug</AssemblerListingLocation>
<ObjectFileName>$(IntDir)</ObjectFileName>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>WIN32;_WINDOWS;_DEBUG;CMAKE_INTDIR=\"Debug\";%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\..\include</AdditionalIncludeDirectories>
</ResourceCompile>
<Midl>
<AdditionalIncludeDirectories>..\..\include</AdditionalIncludeDirectories>
<OutputDirectory>$(IntDir)</OutputDirectory>
<HeaderFileName>%(Filename).h</HeaderFileName>
<TypeLibraryName>%(Filename).tlb</TypeLibraryName>
<InterfaceIdentifierFileName>%(Filename)_i.c</InterfaceIdentifierFileName>
<ProxyFileName>%(Filename)_p.c</ProxyFileName>
</Midl>
<Link>
<AdditionalOptions> /machine:X86 /debug %(AdditionalOptions)</AdditionalOptions>
<AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;comdlg32.lib;advapi32.lib;..\..\lib\libmpi.lib;..\..\lib\libopen-pal.lib;..\..\lib\libopen-rte.lib</AdditionalDependencies>
<AdditionalLibraryDirectories>
</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<LinkIncremental>true</LinkIncremental>
<StackReserveSize>10000000</StackReserveSize>
<SubSystem>Console</SubSystem>
<Version>
</Version>
</Link>
<ProjectReference>
<LinkLibraryDependencies>false</LinkLibraryDependencies>
</ProjectReference>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<AdditionalOptions> /Zm1000 %(AdditionalOptions)</AdditionalOptions>
<AdditionalIncludeDirectories>..\..\include</AdditionalIncludeDirectories>
<CompileAs>CompileAsC</CompileAs>
<ExceptionHandling>
</ExceptionHandling>
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
<Optimization>MaxSpeed</Optimization>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>
</DebugInformationFormat>
<PreprocessorDefinitions>WIN32;_WINDOWS;NDEBUG;CMAKE_INTDIR="Release";%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AssemblerListingLocation>Release</AssemblerListingLocation>
<ObjectFileName>$(IntDir)</ObjectFileName>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>WIN32;_WINDOWS;NDEBUG;CMAKE_INTDIR=\"Release\";%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\..\include</AdditionalIncludeDirectories>
</ResourceCompile>
<Midl>
<AdditionalIncludeDirectories>..\..\include</AdditionalIncludeDirectories>
<OutputDirectory>$(IntDir)</OutputDirectory>
<HeaderFileName>%(Filename).h</HeaderFileName>
<TypeLibraryName>%(Filename).tlb</TypeLibraryName>
<InterfaceIdentifierFileName>%(Filename)_i.c</InterfaceIdentifierFileName>
<ProxyFileName>%(Filename)_p.c</ProxyFileName>
</Midl>
<Link>
<AdditionalOptions> /machine:X86 %(AdditionalOptions)</AdditionalOptions>
<AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;comdlg32.lib;advapi32.lib;..\..\lib\libmpi.lib;..\..\lib\libopen-pal.lib;..\..\lib\libopen-rte.lib</AdditionalDependencies>
<AdditionalLibraryDirectories>
</AdditionalLibraryDirectories>
<GenerateDebugInformation>false</GenerateDebugInformation>
<StackReserveSize>10000000</StackReserveSize>
<SubSystem>Console</SubSystem>
<Version>
</Version>
</Link>
<ProjectReference>
<LinkLibraryDependencies>false</LinkLibraryDependencies>
</ProjectReference>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|Win32'">
<ClCompile>
<AdditionalOptions> /Zm1000 %(AdditionalOptions)</AdditionalOptions>
<AdditionalIncludeDirectories>..\..\include</AdditionalIncludeDirectories>
<CompileAs>CompileAsC</CompileAs>
<ExceptionHandling>
</ExceptionHandling>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<Optimization>MinSpace</Optimization>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>
</DebugInformationFormat>
<PreprocessorDefinitions>WIN32;_WINDOWS;NDEBUG;CMAKE_INTDIR="MinSizeRel";%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AssemblerListingLocation>MinSizeRel</AssemblerListingLocation>
<ObjectFileName>$(IntDir)</ObjectFileName>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>WIN32;_WINDOWS;NDEBUG;CMAKE_INTDIR=\"MinSizeRel\";%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\..\include</AdditionalIncludeDirectories>
</ResourceCompile>
<Midl>
<AdditionalIncludeDirectories>..\..\include</AdditionalIncludeDirectories>
<OutputDirectory>$(IntDir)</OutputDirectory>
<HeaderFileName>%(Filename).h</HeaderFileName>
<TypeLibraryName>%(Filename).tlb</TypeLibraryName>
<InterfaceIdentifierFileName>%(Filename)_i.c</InterfaceIdentifierFileName>
<ProxyFileName>%(Filename)_p.c</ProxyFileName>
</Midl>
<Link>
<AdditionalOptions> /machine:X86 %(AdditionalOptions)</AdditionalOptions>
<AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;comdlg32.lib;advapi32.lib;..\..\lib\libmpi.lib;..\..\lib\libopen-pal.lib;..\..\lib\libopen-rte.lib</AdditionalDependencies>
<AdditionalLibraryDirectories>
</AdditionalLibraryDirectories>
<GenerateDebugInformation>false</GenerateDebugInformation>
<StackReserveSize>10000000</StackReserveSize>
<SubSystem>Console</SubSystem>
<Version>
</Version>
</Link>
<ProjectReference>
<LinkLibraryDependencies>false</LinkLibraryDependencies>
</ProjectReference>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|Win32'">
<ClCompile>
<AdditionalOptions> /Zm1000 %(AdditionalOptions)</AdditionalOptions>
<AdditionalIncludeDirectories>..\..\include</AdditionalIncludeDirectories>
<CompileAs>CompileAsC</CompileAs>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<ExceptionHandling>
</ExceptionHandling>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<Optimization>MaxSpeed</Optimization>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
<PreprocessorDefinitions>WIN32;_WINDOWS;NDEBUG;CMAKE_INTDIR="RelWithDebInfo";%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AssemblerListingLocation>RelWithDebInfo</AssemblerListingLocation>
<ObjectFileName>$(IntDir)</ObjectFileName>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>WIN32;_WINDOWS;NDEBUG;CMAKE_INTDIR=\"RelWithDebInfo\";%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\..\include</AdditionalIncludeDirectories>
</ResourceCompile>
<Midl>
<AdditionalIncludeDirectories>..\..\include</AdditionalIncludeDirectories>
<OutputDirectory>$(IntDir)</OutputDirectory>
<HeaderFileName>%(Filename).h</HeaderFileName>
<TypeLibraryName>%(Filename).tlb</TypeLibraryName>
<InterfaceIdentifierFileName>%(Filename)_i.c</InterfaceIdentifierFileName>
<ProxyFileName>%(Filename)_p.c</ProxyFileName>
</Midl>
<Link>
<AdditionalOptions> /machine:X86 /debug %(AdditionalOptions)</AdditionalOptions>
<AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;comdlg32.lib;advapi32.lib;..\..\lib\libmpi.lib;..\..\lib\libopen-pal.lib;..\..\lib\libopen-rte.lib</AdditionalDependencies>
<AdditionalLibraryDirectories>
</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<LinkIncremental>true</LinkIncremental>
<StackReserveSize>10000000</StackReserveSize>
<SubSystem>Console</SubSystem>
<Version>
</Version>
</Link>
<ProjectReference>
<LinkLibraryDependencies>false</LinkLibraryDependencies>
</ProjectReference>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include=".\chello.c" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

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

@ -1,27 +0,0 @@
#! /usr/bin/bash
VERSION_FILES="opal/include/opal/version.h orte/include/orte/version.h ompi/include/ompi/version.h"
CONFIG_FILES="opal/include/opal_config.h orte/include/orte_config.h ompi/include/ompi_config.h"
MISC_FILES="opal/mca/installdirs/config/install_dirs.h contrib/platform/win32/generate_windows_patch.sh contrib/platform/win32/ompi_install.sh"
MPI_FILES="ompi/include/mpi.h ompi/include/mpif-common.h ompi/include/mpif.h"
STATIC_COMP_FILES=`find . -name static-components.h`
ALL_FILES="${VERSION_FILES} ${CONFIG_FILES} ${MISC_FILES} ${MPI_FILES} ${STATIC_COMP_FILES}"
OUTPUT="../ompi_patch`date +'%m%d%y'`"
rm -f ${OUTPUT}
echo Preparing SVN diffs
svn diff > ompi_patch
echo "Preparing the tar file ${OUTPUT}.tar"
tar -c `svn status | grep ".vcproj$" | awk '{print $2}'` ompi_patch ompi-trunk.sln ${ALL_FILES} > ${OUTPUT}.tar
echo "Compressing the tar file"
bzip2 -9 ${OUTPUT}.tar
echo "Cleaning up ..."
rm -f ompi_patch
echo "Done"

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

@ -1,60 +0,0 @@
/bin/date
echo "Loading bashrc"
echo "Have fun!"
echo ""
#echo "Loading .tcshrc\n\nHave a lot of fun\n"
alias ls='ls --color=auto'
alias la='ls --color=auto -a'
alias e='easyterm -i slsrbht -a /H/ads8260.fhb'
alias d='ls -F -l --full-time -G --color=auto'
alias cls='clear'
alias ll='ls -F -al -G'
alias h='history'
alias up='cd ..'
alias xterm='\xterm -bg black -sl 50000 +tb -sk -si -rightbar -fg white -geometry 120x40 -e bash'
#PS1="\u@\h:\w >"
#export PS1="\[\e[36;1m\]\u@\H> \[\e[0m\]"
export PS1="\[\e]2; \w\a\e[32;1m\]\[\e[36;1m\]\u@\H:\W>\[\e[0m\] "
#set tperiod=120
#alias periodic='echo "\a\n\n\nTime for a break\n\n"'
set rmstar
set autolist
set correct='cmd'
set histdup='prev'
set history=5000
set savehist
set color
set listlinks
set nobeep
set autologout=0
export DISPLAY=":0.0"
export TERM=cygwin
export LS_COLORS='no=00:fi=00:di=36;01:ln=01;36:pi=40;33:so=01;35:bd=40;33;01:cd=44;33;01:or=40;31;01:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.deb=01;31:*.jpg=01;35:*.gif=01;35:*.bmp=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.mpg=01;37:*.avi=01;37:*.gl=01;37:*.dl=01;37:*.txt=01;37:*.s=00;35:*.h=01;33:*.c=00;33:*.cc=01;31:*.o=01;31:*~=00;40';
export TZ='CET-1CEST-2,M3.5.0/02:00:00,M10.5.0/03:00:00'
export PATH=.:$HOME/bin:/bin:/usr/sbin:/usr/local/bin:/usr/X11R6/bin:$PATH
##### run MTT #####
cd /cygdrive/d/tools/MTT-HLRS/mtt-files
./run-hlrs-windows-trunk.sh
#./run-hlrs-windows-v1.4.sh
#./run-hlrs-windows-v1.5.sh
./run-hlrs-windows-v1.6.sh
#./run-hlrs-windows-v1.7.sh
exit

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

@ -1,57 +0,0 @@
/bin/date
echo "Loading bashrc"
echo "Have fun!"
echo ""
#echo "Loading .tcshrc\n\nHave a lot of fun\n"
alias ls='ls --color=auto'
alias la='ls --color=auto -a'
alias e='easyterm -i slsrbht -a /H/ads8260.fhb'
alias d='ls -F -l --full-time -G --color=auto'
alias cls='clear'
alias ll='ls -F -al -G'
alias h='history'
alias up='cd ..'
alias xterm='\xterm -bg black -sl 50000 +tb -sk -si -rightbar -fg white -geometry 120x40 -e bash'
#PS1="\u@\h:\w >"
#export PS1="\[\e[36;1m\]\u@\H> \[\e[0m\]"
export PS1="\[\e]2; \w\a\e[32;1m\]\[\e[36;1m\]\u@\H:\W>\[\e[0m\] "
#set tperiod=120
#alias periodic='echo "\a\n\n\nTime for a break\n\n"'
set rmstar
set autolist
set correct='cmd'
set histdup='prev'
set history=5000
set savehist
set color
set listlinks
set nobeep
set autologout=0
export DISPLAY=":0.0"
export TERM=cygwin
export LS_COLORS='no=00:fi=00:di=36;01:ln=01;36:pi=40;33:so=01;35:bd=40;33;01:cd=44;33;01:or=40;31;01:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.deb=01;31:*.jpg=01;35:*.gif=01;35:*.bmp=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.mpg=01;37:*.avi=01;37:*.gl=01;37:*.dl=01;37:*.txt=01;37:*.s=00;35:*.h=01;33:*.c=00;33:*.cc=01;31:*.o=01;31:*~=00;40';
export TZ='CET-1CEST-2,M3.5.0/02:00:00,M10.5.0/03:00:00'
export PATH=.:$HOME/bin:/bin:/usr/sbin:/usr/local/bin:/usr/X11R6/bin:$PATH
##### run MTT #####
cd /cygdrive/c/Users/hpcfan/Documents/tools/MTT-HLRS/mtt-files
./run-hlrs-windows-trunk-local.sh
#./run-hlrs-windows-v1.4-local.sh
#./run-hlrs-windows-v1.5-local.sh
exit

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

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

@ -1,11 +0,0 @@
These folder contains files for running MTT on a Wiindows machine at HLRS.
To use it, one needs Cygwin+Perl and MTT source files. One point is that Cygwin has to be set with Visual Studio (add "call "%VS80COMNTOOLS%vsvars32.bat" >NUL:" to cygwin.bat).
run_mtt.bat and run_mtt-local.bat are the main batch file to start the test, one for submitting results to MTT server, one for run locally.
.mttrc and .mttrc-local includes corresponding settings for cygwin and different tests.
The .sh files are shell scripts that managing the open mpi versions and temp/output folders.
The .ini files are the MTT config files.

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

@ -1,61 +0,0 @@
#!/bin/sh
#
# This is REALLY important: The output of all commands
# is being parsed by MTT -- this should not be set to
# any other language, other than ENGLISH ,-]
#
unset LANG
#
# Of all the MTT-Phases, only the
# reporter-phase is run on the head-node (frbw),
# all the other ones should be run within a batch-job (hlrs-bwgrid.sh)
#
MTT_DIR=/cygdrive/d/tools/MTT-HLRS/mtt-trunk
export MTT_DIR
#
# need to find somewhere for logfiles
# currently set it to $MTT_DIR/log
if [ -d "log" ]; then
echo;
else
mkdir log;
fi
MPI_VERSION=trunk
MTT_TIME_STAMP=`date +%Y.%m.%d`
export MTT_TIME_STAMP
MTT_SCRATCH_NAME=mttscratch-$MPI_VERSION-$MTT_TIME_STAMP-loc
mkdir /cygdrive/d/temp/MTT-run/$MTT_SCRATCH_NAME
OPENMPI_MTT_SCRATCH=/cygdrive/d/temp/MTT-run/$MTT_SCRATCH_NAME
export OPENMPI_MTT_SCRATCH
# this script should be run in the mtt-files folder
# so that it can find all the configure and test files
MTT_FILE_DIR=`pwd`
mkdir $MTT_FILE_DIR/log/$MPI_VERSION-$MTT_TIME_STAMP-loc
MTT_LOG_DIR=$MTT_FILE_DIR/log/$MPI_VERSION-$MTT_TIME_STAMP-loc
MTT_LOG_FILE=$MTT_LOG_DIR/full_log_$MPI_VERSION-$MTT_TIME_STAMP.txt
export MTT_LOG_FILE
export MTT_FILE_DIR
#
# Start the Shell-Script
#
env | sort
$MTT_DIR/client/mtt --verbose --debug hlrs-windows-$MPI_VERSION-local.ini
cp $OPENMPI_MTT_SCRATCH/*.txt $MTT_LOG_DIR/
cp $OPENMPI_MTT_SCRATCH/*.html $MTT_LOG_DIR/
rm -rf $OPENMPI_MTT_SCRATCH

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

@ -1,76 +0,0 @@
#!/bin/sh
#
# This is REALLY important: The output of all commands
# is being parsed by MTT -- this should not be set to
# any other language, other than ENGLISH ,-]
#
unset LANG
#
# Of all the MTT-Phases, only the
# reporter-phase is run on the head-node (frbw),
# all the other ones should be run within a batch-job (hlrs-bwgrid.sh)
#
MTT_DIR=/cygdrive/d/tools/MTT-HLRS/mtt-trunk
export MTT_DIR
#
# need to find somewhere for logfiles
# currently set it to $MTT_DIR/log
if [ -d "log" ]; then
echo;
else
mkdir log;
fi
MPI_VERSION=trunk
MTT_TIME_STAMP=`date +%Y.%m.%d`
export MTT_TIME_STAMP
MTT_SCRATCH_NAME=mttscratch-$MPI_VERSION-$MTT_TIME_STAMP
mkdir /cygdrive/d/temp/MTT-run/$MTT_SCRATCH_NAME
OPENMPI_MTT_SCRATCH=/cygdrive/d/temp/MTT-run/$MTT_SCRATCH_NAME
export OPENMPI_MTT_SCRATCH
# this script should be run in the mtt-files folder
# so that it can find all the configure and test files
MTT_FILE_DIR=`pwd`
mkdir $MTT_FILE_DIR/log/$MPI_VERSION-$MTT_TIME_STAMP
MTT_LOG_DIR=$MTT_FILE_DIR/log/$MPI_VERSION-$MTT_TIME_STAMP
MTT_LOG_FILE=$MTT_LOG_DIR/full_log_$MPI_VERSION-$MTT_TIME_STAMP.txt
export MTT_LOG_FILE
export MTT_FILE_DIR
#
# Start the Shell-Script
#
env | sort
#need to disable the IPoIB adapter shortly,
#so that the connection to the MTT server can be established.
#e.g.:
# wmic path win32_networkadapter where index=14 call disable
# # run mpi-get and mpi-install phases
# $MTT_DIR/client/mtt --verbose --debug --mpi-phases hlrs-windows-$MPI_VERSION.ini
# # enable the IPoIB adapter, and then do the test-get,build,run phases
# wmic path win32_networkadapter where index=14 call enable
# $MTT_DIR/client/mtt --verbose --debug --test-phases hlrs-windows-$MPI_VERSION.ini
# # disable the IPoIB again, submit to the MTT server now.
# wmic path win32_networkadapter where index=14 call disable
# $MTT_DIR/client/mtt --verbose --debug --no-mpi-phases --no-test-phases hlrs-windows-$MPI_VERSION.ini
#
#
$MTT_DIR/client/mtt --verbose --debug hlrs-windows-$MPI_VERSION.ini
cp $OPENMPI_MTT_SCRATCH/*.txt $MTT_LOG_DIR/
cp $OPENMPI_MTT_SCRATCH/*.html $MTT_LOG_DIR/
rm -rf $OPENMPI_MTT_SCRATCH

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

@ -1,61 +0,0 @@
#!/bin/sh
#
# This is REALLY important: The output of all commands
# is being parsed by MTT -- this should not be set to
# any other language, other than ENGLISH ,-]
#
unset LANG
#
# Of all the MTT-Phases, only the
# reporter-phase is run on the head-node (frbw),
# all the other ones should be run within a batch-job (hlrs-bwgrid.sh)
#
MTT_DIR=/cygdrive/d/tools/MTT-HLRS/mtt-trunk
export MTT_DIR
#
# need to find somewhere for logfiles
# currently set it to $MTT_DIR/log
if [ -d "log" ]; then
echo;
else
mkdir log;
fi
MPI_VERSION=v1.4
MTT_TIME_STAMP=`date +%Y.%m.%d`
export MTT_TIME_STAMP
MTT_SCRATCH_NAME=mttscratch-$MPI_VERSION-$MTT_TIME_STAMP-loc
mkdir /cygdrive/d/temp/MTT-run/$MTT_SCRATCH_NAME
OPENMPI_MTT_SCRATCH=/cygdrive/d/temp/MTT-run/$MTT_SCRATCH_NAME
export OPENMPI_MTT_SCRATCH
# this script should be run in the mtt-files folder
# so that it can find all the configure and test files
MTT_FILE_DIR=`pwd`
mkdir $MTT_FILE_DIR/log/$MPI_VERSION-$MTT_TIME_STAMP-loc
MTT_LOG_DIR=$MTT_FILE_DIR/log/$MPI_VERSION-$MTT_TIME_STAMP-loc
MTT_LOG_FILE=$MTT_LOG_DIR/full_log_$MPI_VERSION-$MTT_TIME_STAMP.txt
export MTT_LOG_FILE
export MTT_FILE_DIR
#
# Start the Shell-Script
#
env | sort
$MTT_DIR/client/mtt --verbose --debug hlrs-windows-$MPI_VERSION-local.ini
cp $OPENMPI_MTT_SCRATCH/*.txt $MTT_LOG_DIR/
cp $OPENMPI_MTT_SCRATCH/*.html $MTT_LOG_DIR/
rm -rf $OPENMPI_MTT_SCRATCH

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

@ -1,61 +0,0 @@
#!/bin/sh
#
# This is REALLY important: The output of all commands
# is being parsed by MTT -- this should not be set to
# any other language, other than ENGLISH ,-]
#
unset LANG
#
# Of all the MTT-Phases, only the
# reporter-phase is run on the head-node (frbw),
# all the other ones should be run within a batch-job (hlrs-bwgrid.sh)
#
MTT_DIR=/cygdrive/d/tools/MTT-HLRS/mtt-trunk
export MTT_DIR
#
# need to find somewhere for logfiles
# currently set it to $MTT_DIR/log
if [ -d "log" ]; then
echo;
else
mkdir log;
fi
MPI_VERSION=v1.4
MTT_TIME_STAMP=`date +%Y.%m.%d`
export MTT_TIME_STAMP
MTT_SCRATCH_NAME=mttscratch-$MPI_VERSION-$MTT_TIME_STAMP
mkdir /cygdrive/d/temp/MTT-run/$MTT_SCRATCH_NAME
OPENMPI_MTT_SCRATCH=/cygdrive/d/temp/MTT-run/$MTT_SCRATCH_NAME
export OPENMPI_MTT_SCRATCH
# this script should be run in the mtt-files folder
# so that it can find all the configure and test files
MTT_FILE_DIR=`pwd`
mkdir $MTT_FILE_DIR/log/$MPI_VERSION-$MTT_TIME_STAMP
MTT_LOG_DIR=$MTT_FILE_DIR/log/$MPI_VERSION-$MTT_TIME_STAMP
MTT_LOG_FILE=$MTT_LOG_DIR/full_log_$MPI_VERSION-$MTT_TIME_STAMP.txt
export MTT_LOG_FILE
export MTT_FILE_DIR
#
# Start the Shell-Script
#
env | sort
$MTT_DIR/client/mtt --verbose --debug hlrs-windows-$MPI_VERSION.ini
cp $OPENMPI_MTT_SCRATCH/*.txt $MTT_LOG_DIR/
cp $OPENMPI_MTT_SCRATCH/*.html $MTT_LOG_DIR/
rm -rf $OPENMPI_MTT_SCRATCH

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

@ -1,61 +0,0 @@
#!/bin/sh
#
# This is REALLY important: The output of all commands
# is being parsed by MTT -- this should not be set to
# any other language, other than ENGLISH ,-]
#
unset LANG
#
# Of all the MTT-Phases, only the
# reporter-phase is run on the head-node (frbw),
# all the other ones should be run within a batch-job (hlrs-bwgrid.sh)
#
MTT_DIR=/cygdrive/d/tools/MTT-HLRS/mtt-trunk
export MTT_DIR
#
# need to find somewhere for logfiles
# currently set it to $MTT_DIR/log
if [ -d "log" ]; then
echo;
else
mkdir log;
fi
MPI_VERSION=v1.5
MTT_TIME_STAMP=`date +%Y.%m.%d`
export MTT_TIME_STAMP
MTT_SCRATCH_NAME=mttscratch-$MPI_VERSION-$MTT_TIME_STAMP-loc
mkdir /cygdrive/d/temp/MTT-run/$MTT_SCRATCH_NAME
OPENMPI_MTT_SCRATCH=/cygdrive/d/temp/MTT-run/$MTT_SCRATCH_NAME
export OPENMPI_MTT_SCRATCH
# this script should be run in the mtt-files folder
# so that it can find all the configure and test files
MTT_FILE_DIR=`pwd`
mkdir $MTT_FILE_DIR/log/$MPI_VERSION-$MTT_TIME_STAMP-loc
MTT_LOG_DIR=$MTT_FILE_DIR/log/$MPI_VERSION-$MTT_TIME_STAMP-loc
MTT_LOG_FILE=$MTT_LOG_DIR/full_log_$MPI_VERSION-$MTT_TIME_STAMP.txt
export MTT_LOG_FILE
export MTT_FILE_DIR
#
# Start the Shell-Script
#
env | sort
$MTT_DIR/client/mtt --verbose --debug hlrs-windows-$MPI_VERSION-local.ini
cp $OPENMPI_MTT_SCRATCH/*.txt $MTT_LOG_DIR/
cp $OPENMPI_MTT_SCRATCH/*.html $MTT_LOG_DIR/
rm -rf $OPENMPI_MTT_SCRATCH

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

@ -1,61 +0,0 @@
#!/bin/sh
#
# This is REALLY important: The output of all commands
# is being parsed by MTT -- this should not be set to
# any other language, other than ENGLISH ,-]
#
unset LANG
#
# Of all the MTT-Phases, only the
# reporter-phase is run on the head-node (frbw),
# all the other ones should be run within a batch-job (hlrs-bwgrid.sh)
#
MTT_DIR=/cygdrive/d/tools/MTT-HLRS/mtt-trunk
export MTT_DIR
#
# need to find somewhere for logfiles
# currently set it to $MTT_DIR/log
if [ -d "log" ]; then
echo;
else
mkdir log;
fi
MPI_VERSION=v1.5
MTT_TIME_STAMP=`date +%Y.%m.%d`
export MTT_TIME_STAMP
MTT_SCRATCH_NAME=mttscratch-$MPI_VERSION-$MTT_TIME_STAMP
mkdir /cygdrive/d/temp/MTT-run/$MTT_SCRATCH_NAME
OPENMPI_MTT_SCRATCH=/cygdrive/d/temp/MTT-run/$MTT_SCRATCH_NAME
export OPENMPI_MTT_SCRATCH
# this script should be run in the mtt-files folder
# so that it can find all the configure and test files
MTT_FILE_DIR=`pwd`
mkdir $MTT_FILE_DIR/log/$MPI_VERSION-$MTT_TIME_STAMP
MTT_LOG_DIR=$MTT_FILE_DIR/log/$MPI_VERSION-$MTT_TIME_STAMP
MTT_LOG_FILE=$MTT_LOG_DIR/full_log_$MPI_VERSION-$MTT_TIME_STAMP.txt
export MTT_LOG_FILE
export MTT_FILE_DIR
#
# Start the Shell-Script
#
env | sort
$MTT_DIR/client/mtt --verbose --debug hlrs-windows-$MPI_VERSION.ini
cp $OPENMPI_MTT_SCRATCH/*.txt $MTT_LOG_DIR/
cp $OPENMPI_MTT_SCRATCH/*.html $MTT_LOG_DIR/
rm -rf $OPENMPI_MTT_SCRATCH

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

@ -1,61 +0,0 @@
#!/bin/sh
#
# This is REALLY important: The output of all commands
# is being parsed by MTT -- this should not be set to
# any other language, other than ENGLISH ,-]
#
unset LANG
#
# Of all the MTT-Phases, only the
# reporter-phase is run on the head-node (frbw),
# all the other ones should be run within a batch-job (hlrs-bwgrid.sh)
#
MTT_DIR=/cygdrive/d/tools/MTT-HLRS/mtt-trunk
export MTT_DIR
#
# need to find somewhere for logfiles
# currently set it to $MTT_DIR/log
if [ -d "log" ]; then
echo;
else
mkdir log;
fi
MPI_VERSION=v1.6
MTT_TIME_STAMP=`date +%Y.%m.%d`
export MTT_TIME_STAMP
MTT_SCRATCH_NAME=mttscratch-$MPI_VERSION-$MTT_TIME_STAMP
mkdir /cygdrive/d/temp/MTT-run/$MTT_SCRATCH_NAME
OPENMPI_MTT_SCRATCH=/cygdrive/d/temp/MTT-run/$MTT_SCRATCH_NAME
export OPENMPI_MTT_SCRATCH
# this script should be run in the mtt-files folder
# so that it can find all the configure and test files
MTT_FILE_DIR=`pwd`
mkdir $MTT_FILE_DIR/log/$MPI_VERSION-$MTT_TIME_STAMP
MTT_LOG_DIR=$MTT_FILE_DIR/log/$MPI_VERSION-$MTT_TIME_STAMP
MTT_LOG_FILE=$MTT_LOG_DIR/full_log_$MPI_VERSION-$MTT_TIME_STAMP.txt
export MTT_LOG_FILE
export MTT_FILE_DIR
#
# Start the Shell-Script
#
env | sort
$MTT_DIR/client/mtt --verbose --debug hlrs-windows-$MPI_VERSION.ini
cp $OPENMPI_MTT_SCRATCH/*.txt $MTT_LOG_DIR/
cp $OPENMPI_MTT_SCRATCH/*.html $MTT_LOG_DIR/
rm -rf $OPENMPI_MTT_SCRATCH

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

@ -1,61 +0,0 @@
#!/bin/sh
#
# This is REALLY important: The output of all commands
# is being parsed by MTT -- this should not be set to
# any other language, other than ENGLISH ,-]
#
unset LANG
#
# Of all the MTT-Phases, only the
# reporter-phase is run on the head-node (frbw),
# all the other ones should be run within a batch-job (hlrs-bwgrid.sh)
#
MTT_DIR=/cygdrive/d/tools/MTT-HLRS/mtt-trunk
export MTT_DIR
#
# need to find somewhere for logfiles
# currently set it to $MTT_DIR/log
if [ -d "log" ]; then
echo;
else
mkdir log;
fi
MPI_VERSION=v1.7
MTT_TIME_STAMP=`date +%Y.%m.%d`
export MTT_TIME_STAMP
MTT_SCRATCH_NAME=mttscratch-$MPI_VERSION-$MTT_TIME_STAMP
mkdir /cygdrive/d/temp/MTT-run/$MTT_SCRATCH_NAME
OPENMPI_MTT_SCRATCH=/cygdrive/d/temp/MTT-run/$MTT_SCRATCH_NAME
export OPENMPI_MTT_SCRATCH
# this script should be run in the mtt-files folder
# so that it can find all the configure and test files
MTT_FILE_DIR=`pwd`
mkdir $MTT_FILE_DIR/log/$MPI_VERSION-$MTT_TIME_STAMP
MTT_LOG_DIR=$MTT_FILE_DIR/log/$MPI_VERSION-$MTT_TIME_STAMP
MTT_LOG_FILE=$MTT_LOG_DIR/full_log_$MPI_VERSION-$MTT_TIME_STAMP.txt
export MTT_LOG_FILE
export MTT_FILE_DIR
#
# Start the Shell-Script
#
env | sort
$MTT_DIR/client/mtt --verbose --debug hlrs-windows-$MPI_VERSION.ini
cp $OPENMPI_MTT_SCRATCH/*.txt $MTT_LOG_DIR/
cp $OPENMPI_MTT_SCRATCH/*.html $MTT_LOG_DIR/
rm -rf $OPENMPI_MTT_SCRATCH

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

@ -1,12 +0,0 @@
@echo off
call "%VS100COMNTOOLS%vsvars32.bat"
C:
chdir C:\Users\hpcfan\Documents\tools\cygwin\bin
wmic path win32_networkadapter where index=14 call disable
bash --rcfile ~/Documents/tools/MTT-HLRS/mtt-files/.mttrc-local
wmic path win32_networkadapter where index=14 call enable

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

@ -1,12 +0,0 @@
@echo off
call "%VS100COMNTOOLS%vsvars32.bat"
C:
chdir d:\tools\cygwin\bin
REM wmic path win32_networkadapter where index=14 call disable
d:\tools\cygwin\bin\bash --rcfile d:\tools\MTT-HLRS\mtt-files\.mttrc
REM wmic path win32_networkadapter where index=14 call enable

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

@ -1,61 +0,0 @@
#!/bin/sh
#
# This is REALLY important: The output of all commands
# is being parsed by MTT -- this should not be set to
# any other language, other than ENGLISH ,-]
#
unset LANG
#
# Of all the MTT-Phases, only the
# reporter-phase is run on the head-node (frbw),
# all the other ones should be run within a batch-job (hlrs-bwgrid.sh)
#
MTT_DIR=/cygdrive/c/Users/hpcfan/Documents/tools/MTT-HLRS/mtt-trunk
export MTT_DIR
#
# need to find somewhere for logfiles
# currently set it to $MTT_DIR/log
if [ -d "log" ]; then
echo;
else
mkdir log;
fi
MPI_VERSION=trunk
MTT_TIME_STAMP=`date +%Y.%m.%d`
export MTT_TIME_STAMP
MTT_SCRATCH_NAME=mttscratch-$MPI_VERSION-$MTT_TIME_STAMP
mkdir /cygdrive/c/Users/hpcfan/Documents/temp/$MTT_SCRATCH_NAME
OPENMPI_MTT_SCRATCH=/cygdrive/c/Users/hpcfan/Documents/temp/$MTT_SCRATCH_NAME
export OPENMPI_MTT_SCRATCH
# this script should be run in the mtt-files folder
# so that it can find all the configure and test files
MTT_FILE_DIR=`pwd`
mkdir $MTT_FILE_DIR/log/$MPI_VERSION-$MTT_TIME_STAMP
MTT_LOG_DIR=$MTT_FILE_DIR/log/$MPI_VERSION-$MTT_TIME_STAMP
MTT_LOG_FILE=$MTT_LOG_DIR/full_log_$MPI_VERSION-$MTT_TIME_STAMP.txt
export MTT_LOG_FILE
export MTT_FILE_DIR
#
# Start the Shell-Script
#
env | sort
$MTT_DIR/client/mtt --verbose --debug --no-section "get install"--section database hlrs-windows-$MPI_VERSION.ini
cp $OPENMPI_MTT_SCRATCH/*.txt $MTT_LOG_DIR/
cp $OPENMPI_MTT_SCRATCH/*.html $MTT_LOG_DIR/
rm -rf $OPENMPI_MTT_SCRATCH

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

@ -1,197 +0,0 @@
/* include/hwloc/autogen/config.h. Generated from config.h.in by configure. */
/* -*- c -*-
* Copyright © 2009 CNRS
* Copyright © 2009-2010 inria. All rights reserved.
* Copyright © 2009-2012 Université Bordeaux 1
* Copyright © 2009-2011 Cisco Systems, Inc. All rights reserved.
* See COPYING in top-level directory.
*/
/* The configuration file */
#ifndef HWLOC_CONFIG_H
#define HWLOC_CONFIG_H
#if (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95))
# define __hwloc_restrict __restrict
#else
# if __STDC_VERSION__ >= 199901L
# define __hwloc_restrict restrict
# else
# define __hwloc_restrict
# endif
#endif
/* Note that if we're compiling C++, then just use the "inline"
keyword, since it's part of C++ */
#if defined(c_plusplus) || defined(__cplusplus)
# define __hwloc_inline inline
#elif defined(_MSC_VER) || defined(__HP_cc)
# define __hwloc_inline __inline
#else
# define __hwloc_inline __inline__
#endif
/*
* Note: this is public. We can not assume anything from the compiler used
* by the application and thus the HWLOC_HAVE_* macros below are not
* fetched from the autoconf result here. We only automatically use a few
* well-known easy cases.
*/
/* Some handy constants to make the logic below a little more readable */
#if defined(__cplusplus) && \
(__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR >= 4))
#define GXX_ABOVE_3_4 1
#else
#define GXX_ABOVE_3_4 0
#endif
#if !defined(__cplusplus) && \
(__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95))
#define GCC_ABOVE_2_95 1
#else
#define GCC_ABOVE_2_95 0
#endif
#if !defined(__cplusplus) && \
(__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96))
#define GCC_ABOVE_2_96 1
#else
#define GCC_ABOVE_2_96 0
#endif
#if !defined(__cplusplus) && \
(__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3))
#define GCC_ABOVE_3_3 1
#else
#define GCC_ABOVE_3_3 0
#endif
/* Maybe before gcc 2.95 too */
#ifdef HWLOC_HAVE_ATTRIBUTE_UNUSED
#define __HWLOC_HAVE_ATTRIBUTE_UNUSED HWLOC_HAVE_ATTRIBUTE_UNUSED
#elif defined(__GNUC__)
# define __HWLOC_HAVE_ATTRIBUTE_UNUSED (GXX_ABOVE_3_4 || GCC_ABOVE_2_95)
#else
# define __HWLOC_HAVE_ATTRIBUTE_UNUSED 0
#endif
#if __HWLOC_HAVE_ATTRIBUTE_UNUSED
# define __hwloc_attribute_unused __attribute__((__unused__))
#else
# define __hwloc_attribute_unused
#endif
#ifdef HWLOC_HAVE_ATTRIBUTE_MALLOC
#define __HWLOC_HAVE_ATTRIBUTE_MALLOC HWLOC_HAVE_ATTRIBUTE_MALLOC
#elif defined(__GNUC__)
# define __HWLOC_HAVE_ATTRIBUTE_MALLOC (GXX_ABOVE_3_4 || GCC_ABOVE_2_96)
#else
# define __HWLOC_HAVE_ATTRIBUTE_MALLOC 0
#endif
#if __HWLOC_HAVE_ATTRIBUTE_MALLOC
# define __hwloc_attribute_malloc __attribute__((__malloc__))
#else
# define __hwloc_attribute_malloc
#endif
#ifdef HWLOC_HAVE_ATTRIBUTE_CONST
#define __HWLOC_HAVE_ATTRIBUTE_CONST HWLOC_HAVE_ATTRIBUTE_CONST
#elif defined(__GNUC__)
# define __HWLOC_HAVE_ATTRIBUTE_CONST (GXX_ABOVE_3_4 || GCC_ABOVE_2_95)
#else
# define __HWLOC_HAVE_ATTRIBUTE_CONST 0
#endif
#if __HWLOC_HAVE_ATTRIBUTE_CONST
# define __hwloc_attribute_const __attribute__((__const__))
#else
# define __hwloc_attribute_const
#endif
#ifdef HWLOC_HAVE_ATTRIBUTE_PURE
#define __HWLOC_HAVE_ATTRIBUTE_PURE HWLOC_HAVE_ATTRIBUTE_PURE
#elif defined(__GNUC__)
# define __HWLOC_HAVE_ATTRIBUTE_PURE (GXX_ABOVE_3_4 || GCC_ABOVE_2_96)
#else
# define __HWLOC_HAVE_ATTRIBUTE_PURE 0
#endif
#if __HWLOC_HAVE_ATTRIBUTE_PURE
# define __hwloc_attribute_pure __attribute__((__pure__))
#else
# define __hwloc_attribute_pure
#endif
#ifdef HWLOC_HAVE_ATTRIBUTE_DEPRECATED
#define __HWLOC_HAVE_ATTRIBUTE_DEPRECATED HWLOC_HAVE_ATTRIBUTE_DEPRECATED
#elif defined(__GNUC__)
# define __HWLOC_HAVE_ATTRIBUTE_DEPRECATED (GXX_ABOVE_3_4 || GCC_ABOVE_3_3)
#else
# define __HWLOC_HAVE_ATTRIBUTE_DEPRECATED 0
#endif
#if __HWLOC_HAVE_ATTRIBUTE_DEPRECATED
# define __hwloc_attribute_deprecated __attribute__((__deprecated__))
#else
# define __hwloc_attribute_deprecated
#endif
#ifdef HWLOC_C_HAVE_VISIBILITY
# if HWLOC_C_HAVE_VISIBILITY
# define HWLOC_DECLSPEC __attribute__((__visibility__("default")))
# else
# define HWLOC_DECLSPEC
# endif
#else
# if defined(OPAL_IMPORTS)
# define HWLOC_DECLSPEC __declspec(dllimport)
# else
# define HWLOC_DECLSPEC __declspec(dllexport)
# endif
#endif
/* Defined to 1 on Linux */
/* #undef HWLOC_LINUX_SYS */
/* Defined to 1 if the CPU_SET macro works */
/* #undef HWLOC_HAVE_CPU_SET */
/* Defined to 1 if you have the `windows.h' header. */
#define HWLOC_HAVE_WINDOWS_H 1
#define hwloc_pid_t HANDLE
#define hwloc_thread_t HANDLE
#ifdef HWLOC_HAVE_WINDOWS_H
# ifndef WIN32_LEAN_AND_MEAN
# define WIN32_LEAN_AND_MEAN
# endif
# include <windows.h>
typedef DWORDLONG hwloc_uint64_t;
#else /* HWLOC_HAVE_WINDOWS_H */
# ifdef hwloc_thread_t
# include <pthread.h>
# endif /* hwloc_thread_t */
/* Defined to 1 if you have the <stdint.h> header file. */
# define HWLOC_HAVE_STDINT_H 1
# include <unistd.h>
# ifdef HWLOC_HAVE_STDINT_H
# include <stdint.h>
# endif
typedef uint64_t hwloc_uint64_t;
#endif /* HWLOC_HAVE_WINDOWS_H */
/* Whether we need to re-define all the hwloc public symbols or not */
#define HWLOC_SYM_TRANSFORM 0
/* The hwloc symbol prefix */
#define HWLOC_SYM_PREFIX hwloc_
/* The hwloc symbol prefix in all caps */
#define HWLOC_SYM_PREFIX_CAPS HWLOC_
#endif /* HWLOC_CONFIG_H */

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

@ -1,576 +0,0 @@
/* include/private/autogen/config.h. Generated from config.h.in by configure. */
/* include/private/autogen/config.h.in. Generated from configure.ac by autoheader. */
/* -*- c -*-
*
* Copyright © 2009, 2012 CNRS, inria., Université Bordeaux 1 All rights reserved.
* Copyright © 2009 Cisco Systems, Inc. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*
* This file is automatically generated by configure. Edits will be lost
* the next time you run configure!
*/
#ifndef HWLOC_CONFIGURE_H
#define HWLOC_CONFIGURE_H
/* Define to 1 if the system has the type `CACHE_DESCRIPTOR'. */
#define HAVE_CACHE_DESCRIPTOR 1
/* Define to 1 if the system has the type `CACHE_RELATIONSHIP'. */
#define HAVE_CACHE_RELATIONSHIP 1
/* Define to 1 if you have the `clz' function. */
/* #undef HAVE_CLZ */
/* Define to 1 if you have the `clzl' function. */
/* #undef HAVE_CLZL */
/* Define to 1 if we have -lcuda */
/* #undef HAVE_CUDA */
/* Define to 1 if we have -lcudart */
/* #undef HAVE_CUDART */
/* Define to 1 if you have the <cuda.h> header file. */
/* #undef HAVE_CUDA_H */
/* Define to 1 if you have the <cuda_runtime_api.h> header file. */
/* #undef HAVE_CUDA_RUNTIME_API_H */
/* Define to 1 if you have the declaration of `CTL_HW', and to 0 if you don't.
*/
/* #undef HAVE_DECL_CTL_HW */
/* Define to 1 if you have the declaration of `fabsf', and to 0 if you don't.
*/
#define HAVE_DECL_FABSF 1
/* Define to 1 if you have the declaration of `HW_NCPU', and to 0 if you
don't. */
/* #undef HAVE_DECL_HW_NCPU */
/* Define to 1 if you have the declaration of `PCI_LOOKUP_NO_NUMBERS', and to
0 if you don't. */
/* #undef HAVE_DECL_PCI_LOOKUP_NO_NUMBERS */
/* Define to 1 if you have the declaration of `pthread_getaffinity_np', and to
0 if you don't. */
#define HAVE_DECL_PTHREAD_GETAFFINITY_NP 0
/* Define to 1 if you have the declaration of `pthread_setaffinity_np', and to
0 if you don't. */
#define HAVE_DECL_PTHREAD_SETAFFINITY_NP 0
/* Define to 1 if you have the declaration of `_SC_LARGE_PAGESIZE', and to 0
if you don't. */
#define HAVE_DECL__SC_LARGE_PAGESIZE 0
/* Define to 1 if you have the declaration of `_SC_NPROCESSORS_CONF', and to 0
if you don't. */
/* #undef HAVE_DECL__SC_NPROCESSORS_CONF */
/* Define to 1 if you have the declaration of `_SC_NPROCESSORS_ONLN', and to 0
if you don't. */
/* #undef HAVE_DECL__SC_NPROCESSORS_ONLN */
/* Define to 1 if you have the declaration of `_SC_NPROC_CONF', and to 0 if
you don't. */
#define HAVE_DECL__SC_NPROC_CONF 0
/* Define to 1 if you have the declaration of `_SC_NPROC_ONLN', and to 0 if
you don't. */
#define HAVE_DECL__SC_NPROC_ONLN 0
/* Define to 1 if you have the <dlfcn.h> header file. */
#define HAVE_DLFCN_H 1
/* Define to 1 if you have the `ffs' function. */
/* #undef HAVE_FFS */
/* Define to 1 if you have the `ffsl' function. */
/* #undef HAVE_FFSL */
/* Define to 1 if you have the `fls' function. */
/* #undef HAVE_FLS */
/* Define to 1 if you have the `flsl' function. */
/* #undef HAVE_FLSL */
/* Define to 1 if you have the `getpagesize' function. */
#define HAVE_GETPAGESIZE 1
/* Define to 1 if the system has the type `GROUP_AFFINITY'. */
#define HAVE_GROUP_AFFINITY 1
/* Define to 1 if the system has the type `GROUP_RELATIONSHIP'. */
#define HAVE_GROUP_RELATIONSHIP 1
/* Define to 1 if you have the `host_info' function. */
/* #undef HAVE_HOST_INFO */
/* Define to 1 if you have the <infiniband/verbs.h> header file. */
/* #undef HAVE_INFINIBAND_VERBS_H */
/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1
/* Define to 1 if the system has the type `KAFFINITY'. */
/* #undef HAVE_KAFFINITY */
/* Define to 1 if you have the <kstat.h> header file. */
/* #undef HAVE_KSTAT_H */
/* Define to 1 if you have the <langinfo.h> header file. */
#define HAVE_LANGINFO_H 1
/* Define to 1 if we have -lgdi32 */
#define HAVE_LIBGDI32 1
/* Define to 1 if we have -libverbs */
/* #undef HAVE_LIBIBVERBS */
/* Define to 1 if we have -lkstat */
/* #undef HAVE_LIBKSTAT */
/* Define to 1 if we have -llgrp */
/* #undef HAVE_LIBLGRP */
/* Define to 1 if you have the `pci' library (-lpci). */
/* #undef HAVE_LIBPCI */
/* Define to 1 if you have the <locale.h> header file. */
#define HAVE_LOCALE_H 1
/* Define to 1 if the system has the type `LOGICAL_PROCESSOR_RELATIONSHIP'. */
#define HAVE_LOGICAL_PROCESSOR_RELATIONSHIP 1
/* Define to 1 if you have the <mach/mach_host.h> header file. */
/* #undef HAVE_MACH_MACH_HOST_H */
/* Define to 1 if you have the <mach/mach_init.h> header file. */
/* #undef HAVE_MACH_MACH_INIT_H */
/* Define to 1 if you have the <malloc.h> header file. */
#define HAVE_MALLOC_H 1
/* Define to 1 if you have the `memalign' function. */
/* #undef HAVE_MEMALIGN */
/* Define to 1 if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1
/* Define to 1 if you have the <myriexpress.h> header file. */
/* #undef HAVE_MYRIEXPRESS_H */
/* Define to 1 if you have the `nl_langinfo' function. */
#define HAVE_NL_LANGINFO 1
/* Define to 1 if you have the <numaif.h> header file. */
/* #undef HAVE_NUMAIF_H */
/* Define to 1 if the system has the type `NUMA_NODE_RELATIONSHIP'. */
#define HAVE_NUMA_NODE_RELATIONSHIP 1
/* Define to 1 if you have the `openat' function. */
#define HAVE_OPENAT 1
/* Define to 1 if you have the <pci/pci.h> header file. */
/* #undef HAVE_PCI_PCI_H */
/* Define to 1 if you have the <picl.h> header file. */
/* #undef HAVE_PICL_H */
/* Define to 1 if the system has the type `PROCESSOR_CACHE_TYPE'. */
#define HAVE_PROCESSOR_CACHE_TYPE 1
/* Define to 1 if the system has the type `PROCESSOR_GROUP_INFO'. */
#define HAVE_PROCESSOR_GROUP_INFO 1
/* Define to 1 if the system has the type `PROCESSOR_RELATIONSHIP'. */
#define HAVE_PROCESSOR_RELATIONSHIP 1
/* Define to 1 if the system has the type `PSAPI_WORKING_SET_EX_BLOCK'. */
/* #undef HAVE_PSAPI_WORKING_SET_EX_BLOCK */
/* Define to 1 if the system has the type `PSAPI_WORKING_SET_EX_INFORMATION'.
*/
/* #undef HAVE_PSAPI_WORKING_SET_EX_INFORMATION */
/* Define to 1 if you have the <pthread_np.h> header file. */
/* #undef HAVE_PTHREAD_NP_H */
/* Define to 1 if the system has the type `pthread_t'. */
/* #undef HAVE_PTHREAD_T */
/* Define to 1 if you have the `putwc' function. */
#define HAVE_PUTWC 1
/* Define to 1 if the system has the type `RelationProcessorPackage'. */
/* #undef HAVE_RELATIONPROCESSORPACKAGE */
/* Define to 1 if you have the `setlocale' function. */
#define HAVE_SETLOCALE 1
/* Define to 1 if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1
/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
/* Define to 1 if you have the `strftime' function. */
#define HAVE_STRFTIME 1
/* Define to 1 if you have the <strings.h> header file. */
/* #undef HAVE_STRINGS_H */
/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1
/* Define to 1 if you have the `strncasecmp' function. */
#define HAVE_STRNCASECMP 1
/* Define to 1 if you have the `sysctl' function. */
/* #undef HAVE_SYSCTL */
/* Define to 1 if you have the `sysctlbyname' function. */
/* #undef HAVE_SYSCTLBYNAME */
/* Define to 1 if the system has the type
`SYSTEM_LOGICAL_PROCESSOR_INFORMATION'. */
#define HAVE_SYSTEM_LOGICAL_PROCESSOR_INFORMATION 1
/* Define to 1 if the system has the type
`SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX'. */
#define HAVE_SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX 1
/* Define to 1 if you have the <sys/cpuset.h> header file. */
/* #undef HAVE_SYS_CPUSET_H */
/* Define to 1 if you have the <sys/lgrp_user.h> header file. */
/* #undef HAVE_SYS_LGRP_USER_H */
/* Define to 1 if you have the <sys/mman.h> header file. */
/* #undef HAVE_SYS_MMAN_H */
/* Define to 1 if you have the <sys/param.h> header file. */
/* #undef HAVE_SYS_PARAM_H */
/* Define to 1 if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1
/* Define to 1 if you have the <sys/sysctl.h> header file. */
/* #undef HAVE_SYS_SYSCTL_H */
/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1
/* Define to 1 if you have the <sys/utsname.h> header file. */
/* #undef HAVE_SYS_UTSNAME_H */
/* Define to 1 if you have the `uname' function. */
/* #undef HAVE_UNAME */
/* Define to 1 if you have the <unistd.h> header file. */
/* #undef HAVE_UNISTD_H */
/* Define to 1 if you have the `uselocale' function. */
/* #undef HAVE_USELOCALE */
/* Define to 1 if the system has the type `wchar_t'. */
#define HAVE_WCHAR_T 1
/* Define to 1 if you have the <X11/keysym.h> header file. */
/* #undef HAVE_X11_KEYSYM_H */
/* Define to 1 if you have the <X11/Xlib.h> header file. */
/* #undef HAVE_X11_XLIB_H */
/* Define to 1 if you have the <X11/Xutil.h> header file. */
/* #undef HAVE_X11_XUTIL_H */
/* Define to 1 if you have the <xlocale.h> header file. */
/* #undef HAVE_XLOCALE_H */
/* Define to 1 on AIX */
/* #undef HWLOC_AIX_SYS */
/* Whether C compiler supports symbol visibility or not */
/* #undef HWLOC_C_HAVE_VISIBILITY */
/* Define to 1 on Darwin */
/* #undef HWLOC_DARWIN_SYS */
/* Whether we are in debugging mode or not */
/* #undef HWLOC_DEBUG */
/* Define to 1 on *FREEBSD */
/* #undef HWLOC_FREEBSD_SYS */
/* Define to 1 if your `ffs' function is known to be broken. */
/* #undef HWLOC_HAVE_BROKEN_FFS */
/* Define to 1 if you have the `cairo' library. */
/* #undef HWLOC_HAVE_CAIRO */
/* Define to 1 if you have the `clz' function. */
/* #undef HWLOC_HAVE_CLZ */
/* Define to 1 if you have the `clzl' function. */
/* #undef HWLOC_HAVE_CLZL */
/* Define to 1 if you have cpuid */
/* #undef HWLOC_HAVE_CPUID */
/* Define to 1 if the CPU_SET macro works */
/* #undef HWLOC_HAVE_CPU_SET */
/* Define to 1 if the CPU_SET_S macro works */
/* #undef HWLOC_HAVE_CPU_SET_S */
/* Define to 1 if function `clz' is declared by system headers */
/* #undef HWLOC_HAVE_DECL_CLZ */
/* Define to 1 if function `clzl' is declared by system headers */
/* #undef HWLOC_HAVE_DECL_CLZL */
/* Define to 1 if function `ffs' is declared by system headers */
/* #undef HWLOC_HAVE_DECL_FFS */
/* Define to 1 if function `ffsl' is declared by system headers */
/* #undef HWLOC_HAVE_DECL_FFSL */
/* Define to 1 if function `fls' is declared by system headers */
/* #undef HWLOC_HAVE_DECL_FLS */
/* Define to 1 if function `flsl' is declared by system headers */
/* #undef HWLOC_HAVE_DECL_FLSL */
/* Define to 1 if you have the `ffs' function. */
/* #undef HWLOC_HAVE_FFS */
/* Define to 1 if you have the `ffsl' function. */
/* #undef HWLOC_HAVE_FFSL */
/* Define to 1 if you have the `fls' function. */
/* #undef HWLOC_HAVE_FLS */
/* Define to 1 if you have the `flsl' function. */
/* #undef HWLOC_HAVE_FLSL */
/* Define to 1 if you have the `libpci' library. */
/* #undef HWLOC_HAVE_LIBPCI */
/* Define to 1 if you have a library providing the termcap interface */
/* #undef HWLOC_HAVE_LIBTERMCAP */
/* Define to 1 if you have the `libxml2' library. */
/* #undef HWLOC_HAVE_LIBXML2 */
/* Define to 1 if mbind is available. */
/* #undef HWLOC_HAVE_MBIND */
/* Define to 1 if migrate_pages is available. */
/* #undef HWLOC_HAVE_MIGRATE_PAGES */
/* Define to 1 if glibc provides the old prototype (without length) of
sched_setaffinity() */
/* #undef HWLOC_HAVE_OLD_SCHED_SETAFFINITY */
/* Define to 1 if struct pci_dev has a `device_class' field. */
/* #undef HWLOC_HAVE_PCIDEV_DEVICE_CLASS */
/* Define to 1 if struct pci_dev has a `domain' field. */
/* #undef HWLOC_HAVE_PCIDEV_DOMAIN */
/* Define to 1 if `libpci' has the `pci_find_cap' function. */
/* #undef HWLOC_HAVE_PCI_FIND_CAP */
/* `Define to 1 if you have pthread_getthrds_np' */
/* #undef HWLOC_HAVE_PTHREAD_GETTHRDS_NP */
/* Define to 1 if glibc provides a prototype of sched_setaffinity() */
/* #undef HWLOC_HAVE_SCHED_SETAFFINITY */
/* Define to 1 if set_mempolicy is available. */
/* #undef HWLOC_HAVE_SET_MEMPOLICY */
/* Define to 1 if you have the <stdint.h> header file. */
#define HWLOC_HAVE_STDINT_H 1
/* Define to 1 if you have the `windows.h' header. */
#define HWLOC_HAVE_WINDOWS_H 1
/* Define to 1 if X11 libraries are available. */
/* #undef HWLOC_HAVE_X11 */
/* Define to 1 if the _syscall3 macro works */
/* #undef HWLOC_HAVE__SYSCALL3 */
/* Define to 1 on HP-UX */
/* #undef HWLOC_HPUX_SYS */
/* Define to 1 on Irix */
/* #undef HWLOC_IRIX_SYS */
/* Define to 1 on Linux */
/* #undef HWLOC_LINUX_SYS */
/* Major version of hwloc */
#define HWLOC_MAJOR_VERSION 1
/* Minor version of hwloc */
#define HWLOC_MINOR_VERSION 5
/* Define to 1 on OSF */
/* #undef HWLOC_OSF_SYS */
/* Release version of hwloc */
#define HWLOC_RELEASE_VERSION 0
/* The size of `unsigned int', as computed by sizeof */
#define HWLOC_SIZEOF_UNSIGNED_INT 4
/* The size of `unsigned long', as computed by sizeof */
#define HWLOC_SIZEOF_UNSIGNED_LONG 4
/* Define to 1 on Solaris */
/* #undef HWLOC_SOLARIS_SYS */
/* The hwloc symbol prefix */
#define HWLOC_SYM_PREFIX hwloc_
/* The hwloc symbol prefix in all caps */
#define HWLOC_SYM_PREFIX_CAPS HWLOC_
/* Whether we need to re-define all the hwloc public symbols or not */
#define HWLOC_SYM_TRANSFORM 0
/* Define to 1 on unsupported systems */
/* #undef HWLOC_UNSUPPORTED_SYS */
/* Define to 1 if ncurses works, preferred over curses */
/* #undef HWLOC_USE_NCURSES */
/* Define to 1 on WINDOWS */
#define HWLOC_WIN_SYS 1
/* Define to 1 on x86_32 */
#define HWLOC_X86_32_ARCH 1
/* Define to 1 on x86_64 */
/* #undef HWLOC_X86_64_ARCH */
/* Define to the sub-directory in which libtool stores uninstalled libraries.
*/
#define LT_OBJDIR ".libs/"
/* Define to 1 if your C compiler doesn't accept -c and -o together. */
/* #undef NO_MINUS_C_MINUS_O */
/* Name of package */
#define PACKAGE "hwloc"
/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT "http://www.open-mpi.org/projects/hwloc/"
/* Define to the full name of this package. */
#define PACKAGE_NAME "hwloc"
/* Define to the full name and version of this package. */
#define PACKAGE_STRING "hwloc 1.5a1"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "hwloc"
/* Define to the home page for this package. */
#define PACKAGE_URL ""
/* Define to the version of this package. */
#define PACKAGE_VERSION "1.5a1"
/* The size of `unsigned int', as computed by sizeof. */
#define SIZEOF_UNSIGNED_INT 4
/* The size of `unsigned long', as computed by sizeof. */
#define SIZEOF_UNSIGNED_LONG 4
/* The size of `void *', as computed by sizeof. */
#define SIZEOF_VOID_P 4
/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1
/* Enable extensions on HP-UX. */
#ifndef _HPUX_SOURCE
# define _HPUX_SOURCE 1
#endif
/* Enable extensions on AIX 3, Interix. */
#ifndef _ALL_SOURCE
# define _ALL_SOURCE 1
#endif
/* Enable GNU extensions on systems that have them. */
#ifndef _GNU_SOURCE
# define _GNU_SOURCE 1
#endif
/* Enable threading extensions on Solaris. */
#ifndef _POSIX_PTHREAD_SEMANTICS
# define _POSIX_PTHREAD_SEMANTICS 1
#endif
/* Enable extensions on HP NonStop. */
#ifndef _TANDEM_SOURCE
# define _TANDEM_SOURCE 1
#endif
/* Enable general extensions on Solaris. */
#ifndef __EXTENSIONS__
# define __EXTENSIONS__ 1
#endif
/* Version number of package */
#define VERSION "1.5a1"
/* Define to 1 if the X Window System is missing or not being used. */
/* #undef X_DISPLAY_MISSING */
/* Are we building for HP-UX? */
#define _HPUX_SOURCE 1
/* Define to 1 if on MINIX. */
/* #undef _MINIX */
/* Define to 2 if the system does not provide POSIX.1 features except with
this defined. */
/* #undef _POSIX_1_SOURCE */
/* Define to 1 if you need to in order for `stat' and other things to work. */
/* #undef _POSIX_SOURCE */
/* Define this to the process ID type */
#define hwloc_pid_t HANDLE
/* Define this to either strncasecmp or strncmp */
#define hwloc_strncasecmp strncasecmp
/* Define this to the thread ID type */
#define hwloc_thread_t HANDLE
typedef long ssize_t;
#define snprintf _snprintf
#define vsnprintf _vsnprintf
#define strcasecmp _stricmp
#define strncasecmp _strnicmp
#define strtoull _strtoui64
#define HWLOC_INSIDE_LIBHWLOC 1
#endif /* HWLOC_CONFIGURE_H */

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Двоичные данные
contrib/platform/win32/ompi-static.tgz

Двоичный файл не отображается.

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

@ -1,119 +0,0 @@
#!/bin/sh
SOURCE=x64/debug
DEST=/cygdrive/z/ompi/
mkdir -p ${DEST}/bin
mkdir -p ${DEST}/etc
mkdir -p ${DEST}/include
mkdir -p ${DEST}/lib
mkdir -p ${DEST}/lib/openmpi
mkdir -p ${DEST}/share
mkdir -p ${DEST}/share/openmpi
#
# Copy all includes
#
cp opal/include/opal_config.h ${DEST}/share/openmpi/
cp opal/include/opal_config_bottom.h ${DEST}/share/openmpi/
cp orte/include/orte_config.h ${DEST}/share/openmpi/
cp ompi/include/mpi.h ${DEST}/include
cp ompi/include/mpif.h ${DEST}/include
cp ompi/include/mpif-config.h ${DEST}/share/openmpi/
cp ompi/include/mpif-common.h ${DEST}/share/openmpi/
cp ompi/include/ompi_config.h ${DEST}/share/openmpi/
#
# Copy the helpers .txt files
#
cp AUTHORS ${DEST}/
#
# OPAL
#
cp opal/etc/openmpi-mca-params.conf ${DEST}/etc
cp opal/mca/base/help-mca-base.txt ${DEST}/share/openmpi
cp opal/mca/base/help-mca-param.txt ${DEST}/share/openmpi
cp opal/runtime/help-opal-runtime.txt ${DEST}/share/openmpi
cp opal/tools/wrappers/help-opal-wrapper.txt ${DEST}/share/openmpi
cp opal/tools/wrappers/opalc++-wrapper-data.txt ${DEST}/share/openmpi
cp opal/tools/wrappers/opalcc-wrapper-data.txt ${DEST}/share/openmpi
#
# ORTE
#
cp orte/mca/odls/default/help-odls-default.txt ${DEST}/share/openmpi
cp orte/mca/odls/process/help-odls-process.txt ${DEST}/share/openmpi
cp orte/mca/pls/base/help-pls-base.txt ${DEST}/share/openmpi
cp orte/mca/pls/bproc/help-pls-bproc.txt ${DEST}/share/openmpi
cp orte/mca/pls/gridengine/help-pls-gridengine.txt ${DEST}/share/openmpi
cp orte/mca/pls/rsh/help-pls-rsh.txt ${DEST}/share/openmpi
cp orte/mca/pls/slurm/help-pls-slurm.txt ${DEST}/share/openmpi
cp orte/mca/pls/tm/help-pls-tm.txt ${DEST}/share/openmpi
cp orte/mca/ras/gridengine/help-ras-gridengine.txt ${DEST}/share/openmpi/
cp orte/mca/ras/slurm/help-ras-slurm.txt ${DEST}/share/openmpi/
cp orte/mca/rds/hostfile/help-rds-hostfile.txt ${DEST}/share/openmpi
cp orte/mca/rmaps/base/help-orte-rmaps-base.txt ${DEST}/share/openmpi
cp orte/mca/rmaps/round_robin/help-orte-rmaps-rr.txt ${DEST}/share/openmpi
cp orte/mca/rmgr/base/help-rmgr-base.txt ${DEST}/share/openmpi
cp orte/runtime/help-orte-runtime.txt ${DEST}/share/openmpi
cp orte/tools/console/help-orteconsole.txt ${DEST}/share/openmpi/
cp orte/tools/orte-clean/help-orte-clean.txt ${DEST}/share/openmpi
cp orte/tools/orte-clean/orte-clean.1 ${DEST}/share/openmpi
cp orte/tools/orte-ps/help-orte-ps.txt ${DEST}/share/openmpi/
cp orte/tools/orte-ps/orte-ps.1 ${DEST}/share/openmpi
cp orte/tools/orted/help-orted.txt ${DEST}/share/openmpi
cp orte/tools/orteprobe/help-orteprobe.txt ${DEST}/share/openmpi
cp orte/tools/orterun/help-orterun.txt ${DEST}/share/openmpi
cp orte/tools/orterun/orterun.1 ${DEST}/share/openmpi/
cp orte/tools/wrappers/ortec++-wrapper-data.txt ${DEST}/share/openmpi
cp orte/tools/wrappers/ortecc-wrapper-data.txt ${DEST}/share/openmpi
#
# OMPI
#
cp ompi/mca/bml/r2/help-mca-bml-r2.txt ${DEST}/share/openmpi/
cp ompi/mca/btl/base/help-mpi-btl-base.txt ${DEST}/share/openmpi/
cp ompi/mca/btl/mvapi/help-mpi-btl-mvapi.txt ${DEST}/share/openmpi/
cp ompi/mca/btl/openib/help-mpi-btl-openib.txt ${DEST}/share/openmpi
cp ompi/mca/btl/mvapi/help-mpi-btl-mvapi.txt ${DEST}/share/openmpi
cp ompi/mca/coll/base/help-mca-coll-base.txt ${DEST}/share/openmpi
cp ompi/mca/coll/sm/help-coll-sm.txt ${DEST}/share/openmpi
cp ompi/mpi/help-mpi-api.txt ${DEST}/share/openmpi
cp ompi/runtime/help-mpi-runtime.txt ${DEST}/share/openmpi/
cp ompi/tools/ompi_info/help-ompi_info.txt ${DEST}/share/openmpi
cp ompi/tools/wrappers/mpic++-wrapper-data.txt ${DEST}/share/openmpi/
cp ompi/tools/wrappers/mpicc-wrapper-data.txt ${DEST}/share/openmpi
cp ompi/tools/wrappers/mpicxx-wrapper-data.txt ${DEST}/share/openmpi
cp ompi/tools/wrappers/mpif77-wrapper-data.txt ${DEST}/share/openmpi/
cp ompi/tools/wrappers/mpif90-wrapper-data.txt ${DEST}/share/openmpi
#
# Copy the libraries
#
cp ${SOURCE}/liborte.lib ${DEST}/lib/
cp ${SOURCE}/libompi.lib ${DEST}/lib/
cp ${SOURCE}/libopal.lib ${DEST}/lib/
cp ${SOURCE}/liborte.dll ${DEST}/lib/
cp ${SOURCE}/libompi.dll ${DEST}/lib/
cp ${SOURCE}/libopal.dll ${DEST}/lib/
cp ${SOURCE}/liborte.dll ${DEST}/bin/
cp ${SOURCE}/libompi.dll ${DEST}/bin/
cp ${SOURCE}/libopal.dll ${DEST}/bin/
cp ${SOURCE}/mca_*.dll ${DEST}/lib/openmpi
cp ${SOURCE}/mca_*.lib ${DEST}/lib/openmpi
#
# Copy the executables
#
cp ${SOURCE}/*.exe ${DEST}/bin/
cp ${SOURCE}/opal_wrapper.exe ${DEST}/bin/
cp ${SOURCE}/opal_wrapper.exe ${DEST}/bin/ortecc.exe
cp ${SOURCE}/opal_wrapper.exe ${DEST}/bin/ortec++.exe
cp ${SOURCE}/opal_wrapper.exe ${DEST}/bin/ortecxx.exe
cp ${SOURCE}/opal_wrapper.exe ${DEST}/bin/mpicc.exe
cp ${SOURCE}/opal_wrapper.exe ${DEST}/bin/mpic++.exe
cp ${SOURCE}/opal_wrapper.exe ${DEST}/bin/mpicxx.exe
cp ${SOURCE}/opal_wrapper.exe ${DEST}/bin/mpif77.exe
cp ${SOURCE}/opal_wrapper.exe ${DEST}/bin/mpif90.exe
cp ${SOURCE}/orterun.exe ${DEST}/bin/mpirun.exe
cp ${SOURCE}/orterun.exe ${DEST}/bin/mpiexec.exe
#cp ${DEST}/share/openmpi

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

@ -1,36 +0,0 @@
SET src=%1
SET cwd=D:\temp\OpenMPI
copy open-mpi-logo.ico %src%\contrib\platform\win32\
copy uninstall.ico %src%\contrib\platform\win32\
REM build 32 debug version
cd %cwd%\COMPILE
md %src%-shared-debug-32
cd %src%-shared-debug-32
cmake -G "Visual Studio 10" -D CMAKE_INSTALL_PREFIX:PATH=%cwd%\%src%\installed-32 -D BUILD_SHARED_LIBS:BOOL=TRUE -D CMAKE_BUILD_TYPE:STRING=debug -D ORTE_WANT_CCP:BOOL=FALSE -D OMPI_WANT_CXX_BINDINGS:BOOL=TRUE -D OMPI_RELEASE_BUILD:BOOL=TRUE -D CMAKE_Fortran_COMPILER:FILEPATH="C:/Program Files (x86)/Intel/ComposerXE-2011/bin/ia32/ifort.exe" -D OMPI_WANT_F77_BINDINGS:BOOL=TRUE ..\..\%src% > configure-log.txt
devenv.com OpenMPI.sln /build debug > build-log.txt
devenv.com OpenMPI.sln /project INSTALL.vcxproj /build debug
cd ..\..
REM build 32 release version
cd %cwd%\COMPILE
md %src%-shared-release-32
cd %src%-shared-release-32
cmake -G "Visual Studio 10" -D CMAKE_INSTALL_PREFIX:PATH=%cwd%\%src%\installed-32 -D BUILD_SHARED_LIBS:BOOL=TRUE -D CMAKE_BUILD_TYPE:STRING=release -D ORTE_WANT_CCP:BOOL=FALSE -D OMPI_WANT_CXX_BINDINGS:BOOL=TRUE -D CMAKE_Fortran_COMPILER:FILEPATH="C:/Program Files (x86)/Intel/ComposerXE-2011/bin/ia32/ifort.exe" -D OMPI_WANT_F77_BINDINGS:BOOL=TRUE ..\..\%src% > configure-log.txt
devenv.com OpenMPI.sln /build release > build-log.txt
devenv.com OpenMPI.sln /project INSTALL.vcxproj /build release
devenv.com OpenMPI.sln /project PACKAGE.vcxproj /build release
cd ..\..

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

@ -1,34 +0,0 @@
SET src=%1
SET cwd=D:\temp\OpenMPI
copy open-mpi-logo.ico %src%\contrib\platform\win32\
copy uninstall.ico %src%\contrib\platform\win32\
REM build 64 debug version
cd %cwd%\COMPILE
md %src%-shared-debug-64
cd %src%-shared-debug-64
cmake -G "Visual Studio 10 Win64" -D CMAKE_INSTALL_PREFIX:PATH=%cwd%\%src%\installed-64 -D BUILD_SHARED_LIBS:BOOL=TRUE -D CMAKE_BUILD_TYPE:STRING=debug -D OMPI_WANT_CXX_BINDINGS:BOOL=TRUE -D OMPI_RELEASE_BUILD:BOOL=TRUE -D CMAKE_Fortran_COMPILER:FILEPATH="C:/Program Files (x86)/Intel/ComposerXE-2011/bin/amd64/ifort.exe" -D OMPI_WANT_F77_BINDINGS:BOOL=TRUE ..\..\%src% > configure-log.txt
devenv.com OpenMPI.sln /build debug > build-log.txt
devenv.com OpenMPI.sln /project INSTALL.vcxproj /build debug
cd ..\..
REM build 32 release version
cd %cwd%\COMPILE
md %src%-shared-release-64
cd %src%-shared-release-64
cmake -G "Visual Studio 10 Win64" -D CMAKE_INSTALL_PREFIX:PATH=%cwd%\%src%\installed-64 -D BUILD_SHARED_LIBS:BOOL=TRUE -D CMAKE_BUILD_TYPE:STRING=release -D OMPI_WANT_CXX_BINDINGS:BOOL=TRUE -D OMPI_RELEASE_BUILD:BOOL=TRUE -D CMAKE_Fortran_COMPILER:FILEPATH="C:/Program Files (x86)/Intel/ComposerXE-2011/bin/amd64/ifort.exe" -D OMPI_WANT_F77_BINDINGS:BOOL=TRUE ..\..\%src% > configure-log.txt
devenv.com OpenMPI.sln /build release > build-log.txt
devenv.com OpenMPI.sln /project INSTALL.vcxproj /build release
devenv.com OpenMPI.sln /project PACKAGE.vcxproj /build release
cd ..\..

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

@ -1,36 +0,0 @@
SET src=%1
SET cwd=D:\temp\OpenMPI
copy open-mpi-logo.ico %src%\contrib\platform\win32\
copy uninstall.ico %src%\contrib\platform\win32\
REM build 32 debug version
cd %cwd%\COMPILE
md %src%-static-debug-32
cd %src%-static-debug-32
cmake -G "Visual Studio 10" -D CMAKE_INSTALL_PREFIX:PATH=%cwd%\%src%\installed-32 -D BUILD_SHARED_LIBS:BOOL=FALSE -D CMAKE_BUILD_TYPE:STRING=debug -D ORTE_WANT_CCP:BOOL=FALSE -D OMPI_WANT_CXX_BINDINGS:BOOL=TRUE -D OMPI_RELEASE_BUILD:BOOL=TRUE -D CMAKE_Fortran_COMPILER:FILEPATH="C:/Program Files (x86)/Intel/ComposerXE-2011/bin/ia32/ifort.exe" -D OMPI_WANT_F77_BINDINGS:BOOL=TRUE ..\..\%src% > configure-log.txt
devenv.com OpenMPI.sln /build debug > build-log.txt
devenv.com OpenMPI.sln /project INSTALL.vcxproj /build debug
cd ..\..
REM build 32 release version
cd %cwd%\COMPILE
md %src%-static-release-32
cd %src%-static-release-32
cmake -G "Visual Studio 10" -D CMAKE_INSTALL_PREFIX:PATH=%cwd%\%src%\installed-32 -D BUILD_SHARED_LIBS:BOOL=FALSE -D CMAKE_BUILD_TYPE:STRING=release -D ORTE_WANT_CCP:BOOL=FALSE-D -D OMPI_WANT_CXX_BINDINGS:BOOL=TRUE -D OMPI_RELEASE_BUILD:BOOL=TRUE -D CMAKE_Fortran_COMPILER:FILEPATH="C:/Program Files (x86)/Intel/ComposerXE-2011/bin/ia32/ifort.exe" -D OMPI_WANT_F77_BINDINGS:BOOL=TRUE ..\..\%src% > configure-log.txt
devenv.com OpenMPI.sln /build release > build-log.txt
devenv.com OpenMPI.sln /project INSTALL.vcxproj /build release
devenv.com OpenMPI.sln /project PACKAGE.vcxproj /build release
cd ..\..

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

@ -1,34 +0,0 @@
SET src=%1
SET cwd=D:\temp\OpenMPI
copy open-mpi-logo.ico %src%\contrib\platform\win32\
copy uninstall.ico %src%\contrib\platform\win32\
REM build 64 debug version
cd %cwd%\COMPILE
md %src%-static-debug-64
cd %src%-static-debug-64
cmake -G "Visual Studio 10 Win64" -D CMAKE_INSTALL_PREFIX:PATH=%cwd%\%src%\installed-64 -D BUILD_SHARED_LIBS:BOOL=FALSE -D CMAKE_BUILD_TYPE:STRING=debug -D OMPI_WANT_CXX_BINDINGS:BOOL=TRUE -D OMPI_RELEASE_BUILD:BOOL=TRUE -D CMAKE_Fortran_COMPILER:FILEPATH="C:/Program Files (x86)/Intel/ComposerXE-2011/bin/amd64/ifort.exe" -D OMPI_WANT_F77_BINDINGS:BOOL=TRUE ..\..\%src% > configure-log.txt
devenv.com OpenMPI.sln /build debug > build-log.txt
devenv.com OpenMPI.sln /project INSTALL.vcxproj /build debug
cd ..\..
REM build 32 release version
cd %cwd%\COMPILE
md %src%-static-release-64
cd %src%-static-release-64
cmake -G "Visual Studio 10 Win64" -D CMAKE_INSTALL_PREFIX:PATH=%cwd%\%src%\installed-64 -D BUILD_SHARED_LIBS:BOOL=FALSE -D CMAKE_BUILD_TYPE:STRING=release -D OMPI_WANT_CXX_BINDINGS:BOOL=TRUE -D CMAKE_Fortran_COMPILER:FILEPATH="C:/Program Files (x86)/Intel/ComposerXE-2011/bin/amd64/ifort.exe" -D OMPI_WANT_F77_BINDINGS:BOOL=TRUE ..\..\%src% > configure-log.txt
devenv.com OpenMPI.sln /build release > build-log.txt
devenv.com OpenMPI.sln /project INSTALL.vcxproj /build release
devenv.com OpenMPI.sln /project PACKAGE.vcxproj /build release
cd ..\..

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

@ -1,8 +0,0 @@
This folder contains the batch files for building Open MPI releases.
Using the scripts is very straightforward, just specify the path to the ompi source as the first (only) parameter, e.g.:
build_release_shared_64.bat OpenMPI/openmpi-1.7
In the script, one may have to modify the cwd variable to a proper place, which is the absolute working path.
The ompi icons may be also put in the same directory, so the generated installers will look better.

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

@ -1,12 +0,0 @@
#
# Copyright (c) 2008-2010 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# Specific to this module
mca_link_libraries=libmpi

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

@ -17,8 +17,6 @@
# $HEADER$
#
EXTRA_DIST = .windows
sources = \
allocator_basic.c \
allocator_basic.h

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

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

@ -17,8 +17,6 @@
# $HEADER$
#
EXTRA_DIST = .windows
sources = \
allocator_bucket.c \
allocator_bucket_alloc.c \

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

@ -1,12 +0,0 @@
#
# Copyright (c) 2008-2010 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# Specific to this module
mca_link_libraries=libmpi libopen-rte

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

@ -15,8 +15,6 @@
# $HEADER$
#
EXTRA_DIST = .windows
r2_sources = \
bml_r2.c \
bml_r2.h \

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

@ -1,14 +0,0 @@
#
# Copyright (c) 2008-2010 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# Specific to this module
mca_link_libraries=libopen-rte Ws2_32.lib
exclude_list=btl_openib_failover.c;btl_openib_failover.h;btl_openib_fd.c;btl_openib_fd.h;connect/btl_openib_connect_ibcm.h;connect/btl_openib_connect_ibcm.c;connect/btl_openib_connect_xoob.h;connect/btl_openib_connect_xoob.c
required_check=find_ofed_sdk

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

@ -21,8 +21,6 @@
# $HEADER$
#
EXTRA_DIST = .windows
AM_CPPFLAGS = $(btl_openib_CPPFLAGS)
AM_LFLAGS = -Pbtl_openib_ini_yy
LEX_OUTPUT_ROOT = lex.btl_openib_ini_yy

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

@ -1,12 +0,0 @@
#
# Copyright (c) 2008-2010 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# Specific to this module
mca_link_libraries=libmpi

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

@ -17,8 +17,6 @@
# $HEADER$
#
EXTRA_DIST = .windows
libmca_btl_self_la_sources = \
btl_self.c \
btl_self.h \

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

@ -1,12 +0,0 @@
#
# Copyright (c) 2008-2010 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# Specific to this module
mca_link_libraries=libmpi libopen-rte libmca_common_sm

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

@ -17,8 +17,6 @@
# $HEADER$
#
EXTRA_DIST = .windows
dist_pkgdata_DATA = help-mpi-btl-sm.txt
libmca_btl_sm_la_sources = \

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

@ -1,12 +0,0 @@
#
# Copyright (c) 2008-2010 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# Specific to this module
mca_link_libraries=libmpi libopen-rte Ws2_32.lib

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

@ -17,8 +17,6 @@
# $HEADER$
#
EXTRA_DIST = .windows
dist_pkgdata_DATA = help-mpi-btl-tcp.txt
sources = \

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

@ -1,13 +0,0 @@
#
# Copyright (c) 2008-2010 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# Specific to this module
mca_link_libraries=libopen-rte Ws2_32.lib
required_check=find_winverbs

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

@ -1,79 +0,0 @@
#
# Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
# University Research and Technology
# Corporation. All rights reserved.
# Copyright (c) 2004-2005 The University of Tennessee and The University
# of Tennessee Research Foundation. All rights
# reserved.
# Copyright (c) 2004-2010 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2008-2010 Cisco Systems, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
EXTRA_DIST = .windows
AM_CPPFLAGS = $(btl_wv_CPPFLAGS)
dist_pkgdata_DATA = help-mpi-btl-wv.txt \
mca-btl-wv-device-params.ini \
connect/help-mpi-btl-wv-cpc-base.txt
sources = \
btl_wv.c \
btl_wv.h \
btl_wv_component.c \
btl_wv_def.h \
btl_wv_eager_rdma.h \
btl_wv_endpoint.c \
btl_wv_endpoint.h \
btl_wv_frag.c \
btl_wv_frag.h \
btl_wv_ini.c \
btl_wv_ini.h \
btl_wv_lex.h \
btl_wv_lex.l \
btl_wv_mca.c \
btl_wv_mca.h \
btl_wv_proc.c \
btl_wv_proc.h \
connect/base.h \
connect/btl_wv_connect_base.c \
connect/btl_wv_connect_oob.c \
connect/btl_wv_connect_oob.h \
connect/btl_wv_connect_empty.c \
connect/btl_wv_connect_empty.h \
connect/connect.h
# Make the output library in this directory, and name it either
# mca_<type>_<name>.la (for DSO builds) or libmca_<type>_<name>.la
# (for static builds).
if MCA_BUILD_ompi_btl_wv_DSO
lib =
lib_sources =
component = mca_btl_wv.la
component_sources = $(sources)
else
lib = libmca_btl_wv.la
lib_sources = $(sources)
component =
component_sources =
endif
mcacomponentdir = $(pkglibdir)
mcacomponent_LTLIBRARIES = $(component)
mca_btl_wv_la_SOURCES = $(component_sources)
mca_btl_wv_la_LDFLAGS = -module -avoid-version $(btl_wv_LDFLAGS)
mca_btl_wv_la_LIBADD = $(btl_wv_LIBS)
noinst_LTLIBRARIES = $(lib)
libmca_btl_wv_la_SOURCES = $(lib_sources)
libmca_btl_wv_la_LDFLAGS = -module -avoid-version $(btl_wv_LDFLAGS)
libmca_btl_wv_la_LIBADD = $(btl_wv_LIBS)

Разница между файлами не показана из-за своего большого размера Загрузить разницу

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

@ -1,687 +0,0 @@
/* -*- Mode: C; c-basic-offset:4 ; -*- */
/*
* Copyright (c) 2004-2007 The Trustees of Indiana University and Indiana
* University Research and Technology
* Corporation. All rights reserved.
* Copyright (c) 2004-2009 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2004-2007 High Performance Computing Center Stuttgart,
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2006-2008 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2006-2009 Mellanox Technologies. All rights reserved.
* Copyright (c) 2006-2007 Los Alamos National Security, LLC. All rights
* reserved.
* Copyright (c) 2006-2007 Voltaire All rights reserved.
* Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*
* @file
*/
#ifndef MCA_BTL_IB_H
#define MCA_BTL_IB_H
#include "ompi_config.h"
#include <sys/types.h>
#include <string.h>
#include "btl_wv_def.h"
/* Open MPI includes */
#include "ompi/class/ompi_free_list.h"
#include "opal/class/opal_pointer_array.h"
#include "opal/class/opal_hash_table.h"
#include "opal/util/output.h"
#include "opal/mca/event/event.h"
#include "opal/threads/threads.h"
#include "ompi/mca/btl/btl.h"
#include "ompi/mca/mpool/mpool.h"
#include "ompi/mca/btl/base/btl_base_error.h"
#include "ompi/mca/btl/btl.h"
#include "ompi/mca/btl/base/base.h"
#include "connect/connect.h"
BEGIN_C_DECLS
#define MCA_BTL_IB_LEAVE_PINNED 1
#define IB_DEFAULT_GID_PREFIX 0xfe80000000000000ll
#define MCA_BTL_IB_PKEY_MASK 0x7fff
/*--------------------------------------------------------------------*/
#if OPAL_ENABLE_DEBUG
#define ATTACH() do { \
int i = 0; \
opal_output(0, "WAITING TO DEBUG ATTACH"); \
while (i == 0) sleep(5); \
} while(0);
#else
#define ATTACH()
#endif
/*--------------------------------------------------------------------*/
/**
* Infiniband (IB) BTL component.
*/
typedef enum {
MCA_BTL_WV_TRANSPORT_IB,
MCA_BTL_WV_TRANSPORT_IWARP,
MCA_BTL_WV_TRANSPORT_RDMAOE,
MCA_BTL_WV_TRANSPORT_UNKNOWN,
MCA_BTL_WV_TRANSPORT_SIZE
} mca_btl_wv_transport_type_t;
typedef enum {
MCA_BTL_WV_PP_QP,
MCA_BTL_WV_SRQ_QP,
} mca_btl_wv_qp_type_t;
struct mca_btl_wv_pp_qp_info_t {
int32_t rd_win;
int32_t rd_rsv;
}; typedef struct mca_btl_wv_pp_qp_info_t mca_btl_wv_pp_qp_info_t;
struct mca_btl_wv_srq_qp_info_t {
int32_t sd_max;
/* The init value for rd_curr_num variables of all SRQs */
int32_t rd_init;
/* The watermark, threshold - if the number of WQEs in SRQ is less then this value =>
the SRQ limit event will be generated on corresponding SRQ.
As result the maximal number of pre-posted WQEs on the SRQ will be increased */
int32_t srq_limit;
}; typedef struct mca_btl_wv_srq_qp_info_t mca_btl_wv_srq_qp_info_t;
struct mca_btl_wv_qp_info_t {
mca_btl_wv_qp_type_t type;
size_t size;
int32_t rd_num;
int32_t rd_low;
union {
mca_btl_wv_pp_qp_info_t pp_qp;
mca_btl_wv_srq_qp_info_t srq_qp;
} u;
}; typedef struct mca_btl_wv_qp_info_t mca_btl_wv_qp_info_t;
#define BTL_WV_QP_TYPE(Q) (mca_btl_wv_component.qp_infos[(Q)].type)
#define BTL_WV_QP_TYPE_PP(Q) \
(BTL_WV_QP_TYPE(Q) == MCA_BTL_WV_PP_QP)
#define BTL_WV_QP_TYPE_SRQ(Q) \
(BTL_WV_QP_TYPE(Q) == MCA_BTL_WV_SRQ_QP)
typedef enum {
BTL_WV_RQ_SOURCE_DEFAULT,
BTL_WV_RQ_SOURCE_MCA,
BTL_WV_RQ_SOURCE_DEVICE_INI,
BTL_WV_RQ_SOURCE_MAX
} btl_wv_receive_queues_source_t;
typedef enum {
BTL_WV_DT_IB,
BTL_WV_DT_IWARP,
BTL_WV_DT_ALL
} btl_wv_device_type_t;
struct mca_btl_wv_component_t {
/**< base BTL component */
mca_btl_base_component_2_0_0_t super;
/**< maximum number of devices available to wv component */
int ib_max_btls;
/**< number of devices available to the wv component */
int ib_num_btls;
/**< array of available BTLs */
struct mca_btl_wv_module_t **wv_btls;
/**< array of available devices */
opal_pointer_array_t devices;
int devices_count;
/**< initial size of free lists */
int ib_free_list_num;
/**< maximum size of free lists */
int ib_free_list_max;
/**< number of elements to alloc when growing free lists */
int ib_free_list_inc;
/**< list of ib proc structures */
opal_list_t ib_procs;
/**< event structure for sends */
opal_event_t ib_send_event;
/**< event structure for recvs */
opal_event_t ib_recv_event;
/**< lock for accessing module state */
opal_mutex_t ib_lock;
/**< name of ib memory pool */
char* ib_mpool_name;
/**< number of pp qp's */
uint8_t num_pp_qps;
/**< number of srq qp's */
uint8_t num_srq_qps;
/**< total number of qp's */
uint8_t num_qps;
mca_btl_wv_qp_info_t *qp_infos;
/**< Eager send limit of first fragment, in Bytes */
size_t eager_limit;
/**< Maximum send size, in Bytes */
size_t max_send_size;
/**< Maximum message size for RDMA protocols in Bytes */
int32_t max_hw_msg_size;
/**< Length of the registration cache most recently used list */
uint32_t reg_mru_len;
/**< Use the Shared Receive Queue (SRQ mode) */
uint32_t use_srq;
/**< Max outstanding CQE on the CQ */
uint32_t ib_cq_size[2];
/**< Max size of inline data */
int32_t ib_max_inline_data;
uint32_t ib_pkey_val;
uint32_t ib_psn;
uint32_t ib_qp_ous_rd_atom;
uint32_t ib_mtu;
uint32_t ib_min_rnr_timer;
uint32_t ib_timeout;
uint32_t ib_retry_count;
uint32_t ib_rnr_retry;
uint32_t ib_max_rdma_dst_ops;
uint32_t ib_service_level;
uint32_t ib_path_rec_service_level;
int32_t use_eager_rdma;
/**< After this number of msg, use RDMA for short messages, always */
int32_t eager_rdma_threshold;
int32_t eager_rdma_num;
int32_t max_eager_rdma;
uint32_t btls_per_lid;
uint32_t max_lmc;
int32_t apm_lmc;
int32_t apm_ports;
/**< Preferred communication buffer alignment in Bytes (must be power of two) */
uint32_t buffer_alignment;
btl_wv_device_type_t device_type;
char *if_include;
char **if_include_list;
char *if_exclude;
char **if_exclude_list;
char *ipaddr_include;
char *ipaddr_exclude;
/* MCA param btl_wv_receive_queues */
char *receive_queues;
/* Whether we got a non-default value of btl_wv_receive_queues */
btl_wv_receive_queues_source_t receive_queues_source;
/** Colon-delimited list of filenames for device parameters */
char *device_params_file_names;
/** Whether we're in verbose mode or not */
bool verbose;
/** Whether we want a warning if no device-specific parameters are
found in INI files */
bool warn_no_device_params_found;
/** Whether we want a warning if non default GID prefix is not configured
on multiport setup */
bool warn_default_gid_prefix;
/** Whether we want a warning if the user specifies a non-existent
device and/or port via btl_wv_if_[in|ex]clude MCA params */
bool warn_nonexistent_if;
/** Dummy argv-style list; a copy of names from the
if_[in|ex]clude list that we use for error checking (to ensure
that they all exist) */
char **if_list;
bool use_message_coalescing;
uint32_t cq_poll_ratio;
uint32_t cq_poll_progress;
uint32_t eager_rdma_poll_ratio;
int rdma_qp;
/* qp used for software flow control */
int credits_qp;
bool cpc_explicitly_defined;
/**< free list of frags only; used for pining user memory */
ompi_free_list_t send_user_free;
/**< free list of frags only; used for pining user memory */
ompi_free_list_t recv_user_free;
/**< frags for coalesced massages */
ompi_free_list_t send_free_coalesced;
/** Default receive queues */
char *default_recv_qps;
/** Whether we want a dynamically resizing srq, enabled by default */
bool enable_srq_resize;
#if BTL_WV_FAILOVER_ENABLED
int verbose_failover;
#endif
}; typedef struct mca_btl_wv_component_t mca_btl_wv_component_t;
OMPI_MODULE_DECLSPEC extern mca_btl_wv_component_t mca_btl_wv_component;
typedef mca_btl_base_recv_reg_t mca_btl_wv_recv_reg_t;
/**
* Common information for all ports that is sent in the modex message
*/
typedef struct mca_btl_wv_modex_message_t {
/** The subnet ID of this port */
uint64_t subnet_id;
/** LID of this port */
uint16_t lid;
/** APM LID for this port */
uint16_t apm_lid;
/** The MTU used by this port */
uint8_t mtu;
/** vendor id define device type and tuning */
uint32_t vendor_id;
/** vendor part id define device type and tuning */
uint32_t vendor_part_id;
/** Transport type of remote port */
uint8_t transport_type;
/** Dummy field used to calculate the real length */
uint8_t end;
} mca_btl_wv_modex_message_t;
#define MCA_BTL_WV_MODEX_MSG_NTOH(hdr) \
do { \
(hdr).subnet_id = ntoh64((hdr).subnet_id); \
(hdr).lid = ntohs((hdr).lid); \
} while (0)
#define MCA_BTL_WV_MODEX_MSG_HTON(hdr) \
do { \
(hdr).subnet_id = hton64((hdr).subnet_id); \
(hdr).lid = htons((hdr).lid); \
} while (0)
typedef struct mca_btl_wv_device_qp_t {
ompi_free_list_t send_free; /**< free lists of send buffer descriptors */
ompi_free_list_t recv_free; /**< free lists of receive buffer descriptors */
} mca_btl_wv_device_qp_t;
struct mca_btl_base_endpoint_t;
typedef struct mca_btl_wv_device_t {
opal_object_t super;
struct wv_device *ib_dev; /* the ib device */
opal_mutex_t device_lock; /* device level lock */
struct wv_context *ib_dev_context;
WV_DEVICE_ATTRIBUTES ib_dev_attr;
struct wv_pd *ib_pd;
struct wv_cq *ib_cq[2];
uint32_t cq_size[2];
mca_mpool_base_module_t *mpool;
/* MTU for this device */
uint32_t mtu;
/* Whether this device supports eager RDMA */
uint8_t use_eager_rdma;
uint8_t btls; /** < number of btls using this device */
opal_pointer_array_t *endpoints;
opal_pointer_array_t *device_btls;
uint16_t hp_cq_polls;
uint16_t eager_rdma_polls;
bool pollme;
int32_t non_eager_rdma_endpoints;
int32_t eager_rdma_buffers_count;
struct mca_btl_base_endpoint_t **eager_rdma_buffers;
/**< frags for control massages */
ompi_free_list_t send_free_control;
/* QP types and attributes that will be used on this device */
mca_btl_wv_device_qp_t *qps;
/* Maximum value supported by this device for max_inline_data */
uint32_t max_inline_data;
} mca_btl_wv_device_t;
OBJ_CLASS_DECLARATION(mca_btl_wv_device_t);
struct mca_btl_wv_module_pp_qp_t {
int32_t dummy;
}; typedef struct mca_btl_wv_module_pp_qp_t mca_btl_wv_module_pp_qp_t;
struct mca_btl_wv_module_srq_qp_t {
struct wv_srq *srq;
int32_t rd_posted;
int32_t sd_credits; /* the max number of outstanding sends on a QP when using SRQ */
/* i.e. the number of frags that can be outstanding (down counter) */
opal_list_t pending_frags[2]; /**< list of high/low prio frags */
/** The number of receive buffers that can be post in the current time.
The value starts from (rd_num / 4) and increased up to rd_num */
int32_t rd_curr_num;
/** We post additional WQEs only if a number of WQEs (in specific SRQ) is less of this value.
The value increased together with rd_curr_num. The value is unique for every SRQ. */
int32_t rd_low_local;
bool srq_limit_event_flag;
/**< In difference of the "--mca enable_srq_resize" parameter that says, if we want(or no)
to start with small num of pre-posted receive buffers (rd_curr_num) and to increase this number by needs
(the max of this value is rd_num Ц the whole size of SRQ), the "srq_limit_event_flag" says if we want to get limit event
from device if the defined srq limit was reached (signal to the main thread) and we put off this flag if the rd_curr_num
was increased up to rd_num.*/
}; typedef struct mca_btl_wv_module_srq_qp_t mca_btl_wv_module_srq_qp_t;
struct mca_btl_wv_module_qp_t {
union {
mca_btl_wv_module_pp_qp_t pp_qp;
mca_btl_wv_module_srq_qp_t srq_qp;
} u;
}; typedef struct mca_btl_wv_module_qp_t mca_btl_wv_module_qp_t;
/**
* IB BTL Interface
*/
struct mca_btl_wv_module_t {
/* Base BTL module */
mca_btl_base_module_t super;
bool btl_inited;
/** Common information about all ports */
mca_btl_wv_modex_message_t port_info;
/** Array of CPCs on this port */
ompi_btl_wv_connect_base_module_t **cpcs;
/** Number of elements in the cpcs array */
uint8_t num_cpcs;
mca_btl_wv_device_t *device;
uint8_t port_num; /**< ID of the PORT */
uint16_t pkey_index;
WV_PORT_ATTRIBUTES ib_port_attr;
uint16_t lid; /**< lid that is actually used (for LMC) */
int apm_port; /**< Alternative port that may be used for APM */
uint8_t src_path_bits; /**< offset from base lid (for LMC) */
int32_t num_peers;
opal_mutex_t ib_lock; /**< module level lock */
size_t eager_rdma_frag_size; /**< length of eager frag */
volatile int32_t eager_rdma_channels; /**< number of open RDMA channels */
mca_btl_base_module_error_cb_fn_t error_cb; /**< error handler */
mca_btl_wv_module_qp_t * qps;
};
typedef struct mca_btl_wv_module_t mca_btl_wv_module_t;
extern mca_btl_wv_module_t mca_btl_wv_module;
struct mca_btl_wv_reg_t {
mca_mpool_base_registration_t base;
struct wv_mr *mr;
};
typedef struct mca_btl_wv_reg_t mca_btl_wv_reg_t;
/**
* Register a callback function that is called on error..
*
* @param btl (IN) BTL module
* @return Status indicating if cleanup was successful
*/
int mca_btl_wv_register_error_cb(
struct mca_btl_base_module_t* btl,
mca_btl_base_module_error_cb_fn_t cbfunc
);
/**
* Cleanup any resources held by the BTL.
*
* @param btl BTL instance.
* @return OMPI_SUCCESS or error status on failure.
*/
extern int mca_btl_wv_finalize(
struct mca_btl_base_module_t* btl
);
/**
* PML->BTL notification of change in the process list.
*
* @param btl (IN) BTL module
* @param nprocs (IN) Number of processes
* @param procs (IN) Set of processes
* @param peers (OUT) Set of (optional) peer addressing info.
* @param reachable (IN/OUT) Set of processes that are reachable via this BTL.
* @return OMPI_SUCCESS or error status on failure.
*
*/
extern int mca_btl_wv_add_procs(
struct mca_btl_base_module_t* btl,
size_t nprocs,
struct ompi_proc_t **procs,
struct mca_btl_base_endpoint_t** peers,
opal_bitmap_t* reachable
);
/**
* PML->BTL notification of change in the process list.
*
* @param btl (IN) BTL instance
* @param nproc (IN) Number of processes.
* @param procs (IN) Set of processes.
* @param peers (IN) Set of peer data structures.
* @return Status indicating if cleanup was successful
*
*/
extern int mca_btl_wv_del_procs(
struct mca_btl_base_module_t* btl,
size_t nprocs,
struct ompi_proc_t **procs,
struct mca_btl_base_endpoint_t** peers
);
/**
* PML->BTL Initiate a send of the specified size.
*
* @param btl (IN) BTL instance
* @param btl_peer (IN) BTL peer addressing
* @param descriptor (IN) Descriptor of data to be transmitted.
* @param tag (IN) Tag.
*/
extern int mca_btl_wv_send(
struct mca_btl_base_module_t* btl,
struct mca_btl_base_endpoint_t* btl_peer,
struct mca_btl_base_descriptor_t* descriptor,
mca_btl_base_tag_t tag
);
/**
* PML->BTL Initiate a immediate send of the specified size.
*
* @param btl (IN) BTL instance
* @param ep (IN) Endpoint
* @param convertor (IN) Datatypes converter
* @param header (IN) PML header
* @param header_size (IN) PML header size
* @param payload_size (IN) Payload size
* @param order (IN) Order
* @param flags (IN) Flags
* @param tag (IN) Tag
* @param descriptor (OUT) Messages descriptor
*/
extern int mca_btl_wv_sendi( struct mca_btl_base_module_t* btl,
struct mca_btl_base_endpoint_t* ep,
struct opal_convertor_t* convertor,
void* header,
size_t header_size,
size_t payload_size,
uint8_t order,
uint32_t flags,
mca_btl_base_tag_t tag,
mca_btl_base_descriptor_t** descriptor
);
/**
* PML->BTL Initiate a put of the specified size.
*
* @param btl (IN) BTL instance
* @param btl_peer (IN) BTL peer addressing
* @param descriptor (IN) Descriptor of data to be transmitted.
*/
extern int mca_btl_wv_put(
struct mca_btl_base_module_t* btl,
struct mca_btl_base_endpoint_t* btl_peer,
struct mca_btl_base_descriptor_t* descriptor
);
/**
* PML->BTL Initiate a get of the specified size.
*
* @param btl (IN) BTL instance
* @param btl_base_peer (IN) BTL peer addressing
* @param descriptor (IN) Descriptor of data to be transmitted.
*/
extern int mca_btl_wv_get(
struct mca_btl_base_module_t* btl,
struct mca_btl_base_endpoint_t* btl_peer,
struct mca_btl_base_descriptor_t* descriptor
);
/**
* Allocate a descriptor.
*
* @param btl (IN) BTL module
* @param size (IN) Requested descriptor size.
*/
extern mca_btl_base_descriptor_t* mca_btl_wv_alloc(
struct mca_btl_base_module_t* btl,
struct mca_btl_base_endpoint_t* endpoint,
uint8_t order,
size_t size,
uint32_t flags);
/**
* Return a segment allocated by this BTL.
*
* @param btl (IN) BTL module
* @param descriptor (IN) Allocated descriptor.
*/
extern int mca_btl_wv_free(
struct mca_btl_base_module_t* btl,
mca_btl_base_descriptor_t* des);
/**
* Pack data and return a descriptor that can be
* used for send/put.
*
* @param btl (IN) BTL module
* @param peer (IN) BTL peer addressing
*/
mca_btl_base_descriptor_t* mca_btl_wv_prepare_src(
struct mca_btl_base_module_t* btl,
struct mca_btl_base_endpoint_t* peer,
mca_mpool_base_registration_t* registration,
struct opal_convertor_t* convertor,
uint8_t order,
size_t reserve,
size_t* size,
uint32_t flags
);
/**
* Allocate a descriptor initialized for RDMA write.
*
* @param btl (IN) BTL module
* @param peer (IN) BTL peer addressing
*/
extern mca_btl_base_descriptor_t* mca_btl_wv_prepare_dst(
struct mca_btl_base_module_t* btl,
struct mca_btl_base_endpoint_t* peer,
mca_mpool_base_registration_t* registration,
struct opal_convertor_t* convertor,
uint8_t order,
size_t reserve,
size_t* size,
uint32_t flags);
extern void mca_btl_wv_frag_progress_pending_put_get(
struct mca_btl_base_endpoint_t*, const int);
/**
* Fault Tolerance Event Notification Function
*
* @param state (IN) Checkpoint State
* @return OMPI_SUCCESS or failure status
*/
extern int mca_btl_wv_ft_event(int state);
/**
* Show an error during init, particularly when running out of
* registered memory.
*/
void mca_btl_wv_show_init_error(const char *file, int line,
const char *func, const char *dev);
#define BTL_WV_HP_CQ 0
#define BTL_WV_LP_CQ 1
/**
* Post to Shared Receive Queue with certain priority
*
* @param wv_btl (IN) BTL module
* @param additional (IN) Additional Bytes to reserve
* @param prio (IN) Priority (either BTL_WV_HP_QP or BTL_WV_LP_QP)
* @return OMPI_SUCCESS or failure status
*/
int mca_btl_wv_post_srr(mca_btl_wv_module_t* wv_btl, const int qp);
/**
* Get a transport name of btl by its transport type.
*/
const char* btl_wv_get_transport_name(mca_btl_wv_transport_type_t transport_type);
/**
* Get a transport type of btl.
*/
mca_btl_wv_transport_type_t mca_btl_wv_get_transport_type(mca_btl_wv_module_t* wv_btl);
static inline int qp_cq_prio(const int qp)
{
if(0 == qp)
return BTL_WV_HP_CQ; /* smallest qp is always HP */
/* If the size for this qp is <= the eager limit, make it a
high priority QP. Otherwise, make it a low priority QP. */
return (mca_btl_wv_component.qp_infos[qp].size <=
mca_btl_wv_component.eager_limit) ?
BTL_WV_HP_CQ : BTL_WV_LP_CQ;
}
#define BTL_WV_RDMA_QP(QP) \
((QP) == mca_btl_wv_component.rdma_qp)
END_C_DECLS
#endif /* MCA_BTL_IB_H */

Разница между файлами не показана из-за своего большого размера Загрузить разницу

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

@ -1,166 +0,0 @@
/*
* Structs for infiniband
*/
#ifndef BTL_WV_DEF_H
#define BTL_WV_DEF_H
#include <windows.h>
#include <rdma\winverbs.h>
#include <comp_channel.h>
typedef unsigned __int8 uint8_t;
typedef unsigned __int16 uint16_t;
typedef unsigned __int32 uint32_t;
typedef unsigned __int64 uint64_t;
union wv_gid
{
uint8_t raw[16];
struct
{
uint64_t subnet_prefix;
uint64_t interface_id;
}global;
};
enum wv_node_type
{
WV_NODE_UNKNOWN = -1,
WV_NODE_CA = 1,
WV_NODE_SWITCH,
WV_NODE_ROUTER,
};
struct wv_device
{
enum wv_node_type node_type;
WV_DEVICE_TYPE transport_type;
char name[64];
};
struct wv_context
{
struct wv_device *device;
IWVDevice *device_if;
COMP_CHANNEL channel;
};
enum wv_mtu
{
WV_MTU_256 = 1,
WV_MTU_512 = 2,
WV_MTU_1024 = 3,
WV_MTU_2048 = 4,
WV_MTU_4096 = 5
};
struct wv_pd
{
struct wv_context *context;
IWVProtectionDomain *handle;
};
struct wv_mr
{
struct wv_context *context;
struct wv_pd *pd;
void *addr;
size_t length;
uint32_t lkey;
uint32_t rkey;
};
struct wv_srq_attr
{
uint32_t max_wr;
uint32_t max_sge;
uint32_t srq_limit;
};
struct wv_srq_init_attr
{
void *srq_context;
struct wv_srq_attr attr;
};
struct wv_recv_wr
{
uint64_t wr_id;
struct wv_recv_wr *next;
WV_SGE *sg_list;
int num_sge;
};
struct wv_srq
{
struct wv_context *context;
void *srq_context;
struct wv_pd *pd;
IWVSharedReceiveQueue *handle;
};
struct wv_qp
{
struct wv_context *context;
void *qp_context;
struct wv_pd *pd;
struct wv_cq *send_cq;
struct wv_cq *recv_cq;
struct wv_srq *srq;
IWVQueuePair *handle;
union
{
IWVDatagramQueuePair *ud_handle;
IWVConnectQueuePair *conn_handle;
};
uint32_t qp_num;
WV_QP_STATE state;
WV_QP_TYPE qp_type;
};
struct wv_comp_channel
{
struct wv_context *context;
COMP_CHANNEL comp_channel;
};
struct wv_cq
{
struct wv_context *context;
struct wv_comp_channel *channel;
void *cq_context;
IWVCompletionQueue *handle;
int cqe;
COMP_ENTRY comp_entry;
LONG volatile notify_cnt;
LONG volatile ack_cnt;
};
struct wverbs_device
{
struct wv_device device;
uint64_t guid;
uint8_t phys_port_cnt;
};
struct wverbs_port
{
COMP_ENTRY comp_entry;
DWORD event_flag;
uint8_t port_num;
};
struct wverbs_context
{
struct wv_context context;
struct wverbs_device device;
uint8_t closing;
struct wverbs_port *port;
wverbs_port *event_port;
};
struct wv_ah
{
IWVAddressHandle *handle;
ULONG_PTR key;
};
#endif

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

@ -1,98 +0,0 @@
/*
* Copyright (c) 2006-2007 Voltaire All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*/
#ifndef MCA_BTL_WV_EAGER_RDMA_BUF_H
#define MCA_BTL_WV_EAGER_RDMA_BUF_H
#include "ompi_config.h"
#include "btl_wv.h"
BEGIN_C_DECLS
struct mca_btl_wv_eager_rdma_local_t {
ompi_ptr_t base; /**< buffer for RDMAing eager messages */
mca_btl_wv_recv_frag_t *frags;
mca_btl_wv_reg_t *reg;
uint16_t head; /**< RDMA buffer to poll */
uint16_t tail; /**< Needed for credit managment */
int32_t credits; /**< number of RDMA credits */
int32_t rd_win;
#if OPAL_ENABLE_DEBUG
uint32_t seq;
#endif
opal_mutex_t lock; /**< guard access to RDMA buffer */
int32_t rd_low;
};
typedef struct mca_btl_wv_eager_rdma_local_t mca_btl_wv_eager_rdma_local_t;
struct mca_btl_wv_eager_rdma_remote_t {
ompi_ptr_t base; /**< address of remote buffer */
uint32_t rkey; /**< RKey for accessing remote buffer */
int32_t head; /**< RDMA buffer to post to */
int32_t tokens; /**< number of rdam tokens */
#if OPAL_ENABLE_DEBUG
uint32_t seq;
#endif
};
typedef struct mca_btl_wv_eager_rdma_remote_t mca_btl_wv_eager_rdma_remote_t;
#define MCA_BTL_WV_RDMA_FRAG(F) \
(wv_frag_type(F) == MCA_BTL_WV_FRAG_EAGER_RDMA)
#define EAGER_RDMA_BUFFER_REMOTE (0)
#define EAGER_RDMA_BUFFER_LOCAL (0xff)
#ifdef WORDS_BIGENDIAN
#define MCA_BTL_WV_RDMA_FRAG_GET_SIZE(F) ((F)->u.size >> 8)
#define MCA_BTL_WV_RDMA_FRAG_SET_SIZE(F, S) \
((F)->u.size = (S) << 8)
#else
#define MCA_BTL_WV_RDMA_FRAG_GET_SIZE(F) ((F)->u.size & 0x00ffffff)
#define MCA_BTL_WV_RDMA_FRAG_SET_SIZE(F, S) \
((F)->u.size = (S) & 0x00ffffff)
#endif
#define MCA_BTL_WV_RDMA_FRAG_LOCAL(F) \
(((volatile uint8_t*)(F)->ftr->u.buf)[3] != EAGER_RDMA_BUFFER_REMOTE)
#define MCA_BTL_WV_RDMA_FRAG_REMOTE(F) \
(!MCA_BTL_WV_RDMA_FRAG_LOCAL(F))
#define MCA_BTL_WV_RDMA_MAKE_REMOTE(F) do { \
((volatile uint8_t*)(F)->u.buf)[3] = EAGER_RDMA_BUFFER_REMOTE; \
}while (0)
#define MCA_BTL_WV_RDMA_MAKE_LOCAL(F) do { \
((volatile uint8_t*)(F)->u.buf)[3] = EAGER_RDMA_BUFFER_LOCAL; \
}while (0)
#define MCA_BTL_WV_GET_LOCAL_RDMA_FRAG(E, I) \
(&(E)->eager_rdma_local.frags[(I)])
#define MCA_BTL_WV_RDMA_NEXT_INDEX(I) do { \
(I) = ((I) + 1); \
if((I) == \
mca_btl_wv_component.eager_rdma_num) \
(I) = 0; \
} while (0)
#define MCA_BTL_WV_RDMA_MOVE_INDEX(HEAD, OLD_HEAD) \
do { \
int32_t new_head; \
do { \
OLD_HEAD = HEAD; \
new_head = OLD_HEAD + 1; \
if(new_head == mca_btl_wv_component.eager_rdma_num) \
new_head = 0; \
} while(!OPAL_ATOMIC_CMPSET_32(&HEAD, OLD_HEAD, new_head)); \
} while(0)
END_C_DECLS
#endif

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

@ -1,943 +0,0 @@
/* -*- Mode: C; c-basic-offset:4 ; -*- */
/*
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology
* Corporation. All rights reserved.
* Copyright (c) 2004-2007 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2006-2009 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2006-2012 Los Alamos National Security, LLC. All rights
* reserved.
* Copyright (c) 2006-2007 Voltaire All rights reserved.
* Copyright (c) 2006-2009 Mellanox Technologies, Inc. All rights reserved.
* Copyright (c) 2010 IBM Corporation. All rights reserved.
* Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved
*
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*/
#include "ompi_config.h"
#include <time.h>
#include <errno.h>
#include <string.h>
#include "opal_stdint.h"
#include "opal/util/output.h"
#include "ompi/types.h"
#include "ompi/class/ompi_free_list.h"
#include "btl_wv_endpoint.h"
#include "btl_wv_proc.h"
#include "connect/connect.h"
static void mca_btl_wv_endpoint_construct(mca_btl_base_endpoint_t* endpoint);
static void mca_btl_wv_endpoint_destruct(mca_btl_base_endpoint_t* endpoint);
static inline int acruire_wqe(mca_btl_wv_endpoint_t *ep,
mca_btl_wv_send_frag_t *frag)
{
int qp = to_base_frag(frag)->base.order;
int prio = !(to_base_frag(frag)->base.des_flags & MCA_BTL_DES_FLAGS_PRIORITY);
if(qp_get_wqe(ep, qp) < 0) {
qp_put_wqe(ep, qp);
opal_list_append(&ep->qps[qp].no_wqe_pending_frags[prio],
(opal_list_item_t *)frag);
return OMPI_ERR_OUT_OF_RESOURCE;
}
return OMPI_SUCCESS;
}
static int acquire_send_credit(mca_btl_wv_endpoint_t *endpoint,
mca_btl_wv_send_frag_t *frag)
{
mca_btl_wv_module_t *wv_btl = endpoint->endpoint_btl;
int qp = to_base_frag(frag)->base.order;
int prio = !(to_base_frag(frag)->base.des_flags & MCA_BTL_DES_FLAGS_PRIORITY);
if(BTL_WV_QP_TYPE_PP(qp)) {
if(OPAL_THREAD_ADD32(&endpoint->qps[qp].u.pp_qp.sd_credits, -1) < 0) {
OPAL_THREAD_ADD32(&endpoint->qps[qp].u.pp_qp.sd_credits, 1);
opal_list_append(&endpoint->qps[qp].no_credits_pending_frags[prio],
(opal_list_item_t *)frag);
return OMPI_ERR_OUT_OF_RESOURCE;
}
} else {
if(OPAL_THREAD_ADD32(&wv_btl->qps[qp].u.srq_qp.sd_credits, -1) < 0)
{
OPAL_THREAD_ADD32(&wv_btl->qps[qp].u.srq_qp.sd_credits, 1);
OPAL_THREAD_LOCK(&wv_btl->ib_lock);
opal_list_append(&wv_btl->qps[qp].u.srq_qp.pending_frags[prio],
(opal_list_item_t *)frag);
OPAL_THREAD_UNLOCK(&wv_btl->ib_lock);
return OMPI_ERR_OUT_OF_RESOURCE;
}
}
return OMPI_SUCCESS;
}
/* this function is called with endpoint->endpoint_lock held */
int mca_btl_wv_endpoint_post_send(mca_btl_wv_endpoint_t *endpoint,
mca_btl_wv_send_frag_t *frag)
{
mca_btl_wv_header_t *hdr = frag->hdr;
mca_btl_base_descriptor_t *des = &to_base_frag(frag)->base;
int qp, ib_rc;
int32_t cm_return;
bool do_rdma = false;
size_t eager_limit;
if(OPAL_LIKELY(des->order == MCA_BTL_NO_ORDER))
des->order = frag->qp_idx;
qp = des->order;
if(acruire_wqe(endpoint, frag) != OMPI_SUCCESS)
return OMPI_ERR_RESOURCE_BUSY;
eager_limit = mca_btl_wv_component.eager_limit +
sizeof(mca_btl_wv_header_coalesced_t) +
sizeof(mca_btl_wv_control_header_t);
if(des->des_src->seg_len + frag->coalesced_length <= eager_limit &&
(des->des_flags & MCA_BTL_DES_FLAGS_PRIORITY)) {
/* High priority frag. Try to send over eager RDMA */
if(acquire_eager_rdma_send_credit(endpoint) == OMPI_SUCCESS)
do_rdma = true;
}
if(!do_rdma && acquire_send_credit(endpoint, frag) != OMPI_SUCCESS) {
qp_put_wqe(endpoint, qp);
return OMPI_ERR_RESOURCE_BUSY;
}
BTL_WV_GET_CREDITS(endpoint->eager_rdma_local.credits, hdr->credits);
if(hdr->credits)
hdr->credits |= BTL_WV_RDMA_CREDITS_FLAG;
if(!do_rdma) {
if(BTL_WV_QP_TYPE_PP(qp) && 0 == hdr->credits) {
BTL_WV_GET_CREDITS(endpoint->qps[qp].u.pp_qp.rd_credits, hdr->credits);
}
} else {
hdr->credits |= (qp << 11);
}
BTL_WV_GET_CREDITS(endpoint->qps[qp].u.pp_qp.cm_return, cm_return);
/* cm_seen is only 8 bytes, but cm_return is 32 bytes */
if(cm_return > 255) {
hdr->cm_seen = 255;
cm_return -= 255;
OPAL_THREAD_ADD32(&endpoint->qps[qp].u.pp_qp.cm_return, cm_return);
} else {
hdr->cm_seen = cm_return;
}
ib_rc = post_send(endpoint, frag, do_rdma);
if(!ib_rc)
return OMPI_SUCCESS;
if(endpoint->nbo)
BTL_WV_HEADER_NTOH(*hdr);
if(BTL_WV_IS_RDMA_CREDITS(hdr->credits)) {
OPAL_THREAD_ADD32(&endpoint->eager_rdma_local.credits,
BTL_WV_CREDITS(hdr->credits));
}
qp_put_wqe(endpoint, qp);
if(do_rdma) {
OPAL_THREAD_ADD32(&endpoint->eager_rdma_remote.tokens, 1);
} else {
if(BTL_WV_QP_TYPE_PP(qp)) {
OPAL_THREAD_ADD32(&endpoint->qps[qp].u.pp_qp.rd_credits,
hdr->credits);
OPAL_THREAD_ADD32(&endpoint->qps[qp].u.pp_qp.sd_credits, 1);
} else if BTL_WV_QP_TYPE_SRQ(qp){
mca_btl_wv_module_t *wv_btl = endpoint->endpoint_btl;
OPAL_THREAD_ADD32(&wv_btl->qps[qp].u.srq_qp.sd_credits, 1);
}
}
BTL_ERROR(("error posting send request error %d: %s\n",
ib_rc, strerror(ib_rc)));
return OMPI_ERROR;
}
OBJ_CLASS_INSTANCE(mca_btl_wv_endpoint_t,
opal_list_item_t, mca_btl_wv_endpoint_construct,
mca_btl_wv_endpoint_destruct);
/*
* Initialize state of the endpoint instance.
*
*/
static mca_btl_wv_qp_t *endpoint_alloc_qp(void)
{
mca_btl_wv_qp_t *qp = (mca_btl_wv_qp_t *) calloc(1, sizeof(mca_btl_wv_qp_t));
if(!qp) {
BTL_ERROR(("Failed to allocate memory for qp"));
return NULL;
}
OBJ_CONSTRUCT(&qp->lock, opal_mutex_t);
return qp;
}
static void
endpoint_init_qp_pp(mca_btl_wv_endpoint_qp_t *ep_qp, const int qp)
{
mca_btl_wv_qp_info_t *qp_info = &mca_btl_wv_component.qp_infos[qp];
ep_qp->qp = endpoint_alloc_qp();
ep_qp->qp->users++;
/* local credits are set here such that on initial posting
* of the receive buffers we end up with zero credits to return
* to our peer. The peer initializes his sd_credits to reflect this
* below. Note that this may be a problem for iWARP as the sender
* now has credits even if the receive buffers are not yet posted
*/
ep_qp->u.pp_qp.rd_credits = -qp_info->rd_num;
ep_qp->u.pp_qp.rd_posted = 0;
ep_qp->u.pp_qp.cm_sent = 0;
ep_qp->u.pp_qp.cm_return = -qp_info->u.pp_qp.rd_rsv;
ep_qp->u.pp_qp.cm_received = qp_info->u.pp_qp.rd_rsv;
/* initialize the local view of credits */
ep_qp->u.pp_qp.sd_credits = qp_info->rd_num;
/* number of available send WQEs */
ep_qp->qp->sd_wqe = qp_info->rd_num;
}
static void
endpoint_init_qp_srq(mca_btl_wv_endpoint_qp_t *ep_qp, const int qp)
{
ep_qp->qp = endpoint_alloc_qp();
ep_qp->qp->users++;
/* number of available send WQEs */
ep_qp->qp->sd_wqe = mca_btl_wv_component.qp_infos[qp].u.srq_qp.sd_max;
}
static void endpoint_init_qp(mca_btl_base_endpoint_t *ep, const int qp)
{
mca_btl_wv_endpoint_qp_t *ep_qp = &ep->qps[qp];
ep_qp->rd_credit_send_lock = 0;
ep_qp->credit_frag = NULL;
OBJ_CONSTRUCT(&ep_qp->no_wqe_pending_frags[0], opal_list_t);
OBJ_CONSTRUCT(&ep_qp->no_wqe_pending_frags[1], opal_list_t);
OBJ_CONSTRUCT(&ep_qp->no_credits_pending_frags[0], opal_list_t);
OBJ_CONSTRUCT(&ep_qp->no_credits_pending_frags[1], opal_list_t);
switch(BTL_WV_QP_TYPE(qp)) {
case MCA_BTL_WV_PP_QP:
endpoint_init_qp_pp(ep_qp, qp);
break;
case MCA_BTL_WV_SRQ_QP:
endpoint_init_qp_srq(ep_qp, qp);
break;
default:
BTL_ERROR(("Wrong QP type"));
break;
}
}
void mca_btl_wv_endpoint_init(mca_btl_wv_module_t *btl,
mca_btl_base_endpoint_t *ep,
ompi_btl_wv_connect_base_module_t *local_cpc,
mca_btl_wv_proc_modex_t *remote_proc_info,
ompi_btl_wv_connect_base_module_data_t *remote_cpc_data)
{
int qp;
ep->endpoint_btl = btl;
ep->use_eager_rdma = btl->device->use_eager_rdma &
mca_btl_wv_component.use_eager_rdma;
ep->subnet_id = btl->port_info.subnet_id;
ep->endpoint_local_cpc = local_cpc;
ep->endpoint_remote_cpc_data = remote_cpc_data;
ep->rem_info.rem_lid = remote_proc_info->pm_port_info.lid;
ep->rem_info.rem_subnet_id = remote_proc_info->pm_port_info.subnet_id;
ep->rem_info.rem_mtu = remote_proc_info->pm_port_info.mtu;
opal_output(-1, "Got remote LID, subnet, MTU: %d, 0x%" PRIx64 ", %d",
ep->rem_info.rem_lid,
ep->rem_info.rem_subnet_id,
ep->rem_info.rem_mtu);
ep->rem_info.rem_vendor_id = (remote_proc_info->pm_port_info).vendor_id;
ep->rem_info.rem_vendor_part_id = (remote_proc_info->pm_port_info).vendor_part_id;
ep->rem_info.rem_transport_type =
(mca_btl_wv_transport_type_t) (remote_proc_info->pm_port_info).transport_type;
for (qp = 0; qp < mca_btl_wv_component.num_qps; qp++) {
endpoint_init_qp(ep, qp);
}
}
static void mca_btl_wv_endpoint_construct(mca_btl_base_endpoint_t* endpoint)
{
/* setup qp structures */
endpoint->qps = (mca_btl_wv_endpoint_qp_t*)
calloc(mca_btl_wv_component.num_qps,
sizeof(mca_btl_wv_endpoint_qp_t));
endpoint->rem_info.rem_qps = (mca_btl_wv_rem_qp_info_t*)
calloc(mca_btl_wv_component.num_qps,
sizeof(mca_btl_wv_rem_qp_info_t));
endpoint->rem_info.rem_srqs = NULL;
endpoint->endpoint_btl = 0;
endpoint->endpoint_proc = 0;
endpoint->endpoint_local_cpc = NULL;
endpoint->endpoint_remote_cpc_data = NULL;
endpoint->endpoint_initiator = false;
endpoint->endpoint_tstamp = 0.0;
endpoint->endpoint_state = MCA_BTL_IB_CLOSED;
endpoint->endpoint_retries = 0;
OBJ_CONSTRUCT(&endpoint->endpoint_lock, opal_mutex_t);
OBJ_CONSTRUCT(&endpoint->pending_lazy_frags, opal_list_t);
OBJ_CONSTRUCT(&endpoint->pending_get_frags, opal_list_t);
OBJ_CONSTRUCT(&endpoint->pending_put_frags, opal_list_t);
endpoint->get_tokens = mca_btl_wv_component.ib_qp_ous_rd_atom;
/* initialize RDMA eager related parts */
endpoint->eager_recv_count = 0;
memset(&endpoint->eager_rdma_remote, 0,
sizeof(mca_btl_wv_eager_rdma_remote_t));
memset(&endpoint->eager_rdma_local, 0,
sizeof(mca_btl_wv_eager_rdma_local_t));
OBJ_CONSTRUCT(&endpoint->eager_rdma_local.lock, opal_mutex_t);
endpoint->rem_info.rem_lid = 0;
endpoint->rem_info.rem_subnet_id = 0;
endpoint->rem_info.rem_mtu = 0;
endpoint->nbo = false;
endpoint->use_eager_rdma = false;
endpoint->eager_rdma_remote.tokens = 0;
endpoint->eager_rdma_local.credits = 0;
endpoint->endpoint_cts_mr = NULL;
endpoint->endpoint_cts_frag.super.super.base.super.registration = NULL;
endpoint->endpoint_cts_frag.super.super.base.super.ptr = NULL;
endpoint->endpoint_posted_recvs = false;
endpoint->endpoint_cts_received = false;
endpoint->endpoint_cts_sent = false;
}
/*
* Destroy a endpoint
*
*/
static void mca_btl_wv_endpoint_destruct(mca_btl_base_endpoint_t* endpoint)
{
bool pval_clean = false;
int qp;
/* If the CPC has an endpoint_finalize function, call it */
if (NULL != endpoint->endpoint_local_cpc->cbm_endpoint_finalize) {
endpoint->endpoint_local_cpc->cbm_endpoint_finalize(endpoint);
}
/* Release CTS buffer */
ompi_btl_wv_connect_base_free_cts(endpoint);
/* Release memory resources */
do {
/* Make sure that mca_btl_wv_endpoint_connect_eager_rdma ()
* was not in "connect" or "bad" flow (failed to allocate memory)
* and changed the pointer back to NULL
*/
if(!opal_atomic_cmpset_ptr(&endpoint->eager_rdma_local.base.pval, NULL,
(void*)1)) {
if ((void*)1 != endpoint->eager_rdma_local.base.pval &&
NULL != endpoint->eager_rdma_local.base.pval) {
endpoint->endpoint_btl->super.btl_mpool->mpool_free(endpoint->endpoint_btl->super.btl_mpool,
endpoint->eager_rdma_local.base.pval,
(mca_mpool_base_registration_t*)endpoint->eager_rdma_local.reg);
pval_clean=true;
}
} else {
pval_clean=true;
}
} while (!pval_clean);
/* Close opened QPs if we have them*/
for(qp = 0; qp < mca_btl_wv_component.num_qps; qp++) {
MCA_BTL_WV_CLEAN_PENDING_FRAGS(&endpoint->qps[qp].no_credits_pending_frags[0]);
MCA_BTL_WV_CLEAN_PENDING_FRAGS(&endpoint->qps[qp].no_credits_pending_frags[1]);
OBJ_DESTRUCT(&endpoint->qps[qp].no_credits_pending_frags[0]);
OBJ_DESTRUCT(&endpoint->qps[qp].no_credits_pending_frags[1]);
MCA_BTL_WV_CLEAN_PENDING_FRAGS(
&endpoint->qps[qp].no_wqe_pending_frags[0]);
MCA_BTL_WV_CLEAN_PENDING_FRAGS(
&endpoint->qps[qp].no_wqe_pending_frags[1]);
OBJ_DESTRUCT(&endpoint->qps[qp].no_wqe_pending_frags[0]);
OBJ_DESTRUCT(&endpoint->qps[qp].no_wqe_pending_frags[1]);
if(--endpoint->qps[qp].qp->users != 0)
continue;
if(endpoint->qps[qp].qp->lcl_qp != NULL) {
endpoint->qps[qp].qp->lcl_qp->handle->CancelOverlappedRequests();
endpoint->qps[qp].qp->lcl_qp->conn_handle->Release();
endpoint->qps[qp].qp->lcl_qp->handle->Release();
free(endpoint->qps[qp].qp->lcl_qp);
}
free(endpoint->qps[qp].qp);
}
/* free the qps */
free(endpoint->qps);
endpoint->qps = NULL;
OBJ_DESTRUCT(&endpoint->endpoint_lock);
/* Clean pending lists */
MCA_BTL_WV_CLEAN_PENDING_FRAGS(&endpoint->pending_lazy_frags);
OBJ_DESTRUCT(&endpoint->pending_lazy_frags);
MCA_BTL_WV_CLEAN_PENDING_FRAGS(&endpoint->pending_get_frags);
OBJ_DESTRUCT(&endpoint->pending_get_frags);
MCA_BTL_WV_CLEAN_PENDING_FRAGS(&endpoint->pending_put_frags);
OBJ_DESTRUCT(&endpoint->pending_put_frags);
}
/*
* Called when the connect module has created all the qp's on an
* endpoint and needs to have some receive buffers posted.
*/
int mca_btl_wv_endpoint_post_recvs(mca_btl_wv_endpoint_t *endpoint)
{
int qp;
for (qp = 0; qp < mca_btl_wv_component.num_qps; ++qp) {
if (BTL_WV_QP_TYPE_PP(qp)) {
mca_btl_wv_endpoint_post_rr_nolock(endpoint, qp);
} else {
mca_btl_wv_post_srr(endpoint->endpoint_btl, qp);
}
}
return OMPI_SUCCESS;
}
static void cts_sent(mca_btl_base_module_t* btl,
struct mca_btl_base_endpoint_t* ep,
struct mca_btl_base_descriptor_t* des,
int status)
{
/* Nothing to do/empty function (we can't pass in a NULL pointer
for the des_cbfunc) */
OPAL_OUTPUT((-1, "CTS send to %s completed",
ep->endpoint_proc->proc_ompi->proc_hostname));
}
/*
* Send CTS control fragment
*/
void mca_btl_wv_endpoint_send_cts(mca_btl_wv_endpoint_t *endpoint)
{
mca_btl_wv_send_control_frag_t *sc_frag;
mca_btl_base_descriptor_t *base_des;
mca_btl_wv_frag_t *wv_frag;
mca_btl_wv_com_frag_t *com_frag;
mca_btl_wv_control_header_t *ctl_hdr;
OPAL_OUTPUT((-1, "SENDING CTS to %s on qp index %d (QP num %d)",
endpoint->endpoint_proc->proc_ompi->proc_hostname,
mca_btl_wv_component.credits_qp,
endpoint->qps[mca_btl_wv_component.credits_qp].qp->lcl_qp->qp_num));
sc_frag = alloc_control_frag(endpoint->endpoint_btl);
if (OPAL_UNLIKELY(NULL == sc_frag)) {
BTL_ERROR(("Failed to allocate control buffer"));
mca_btl_wv_endpoint_invoke_error(endpoint);
return;
}
/* I dislike using the "to_<foo>()" macros; I prefer using the
explicit member fields to ensure I get the types right. Since
this is not a performance-criticial part of the code, it's
ok. */
com_frag = &(sc_frag->super.super);
wv_frag = &(com_frag->super);
base_des = &(wv_frag->base);
base_des->des_cbfunc = cts_sent;
base_des->des_cbdata = NULL;
base_des->des_flags |= MCA_BTL_DES_FLAGS_PRIORITY|MCA_BTL_DES_SEND_ALWAYS_CALLBACK;
base_des->order = mca_btl_wv_component.credits_qp;
wv_frag->segment.base.seg_len = sizeof(mca_btl_wv_control_header_t);
com_frag->endpoint = endpoint;
sc_frag->hdr->tag = MCA_BTL_TAG_BTL;
sc_frag->hdr->cm_seen = 0;
sc_frag->hdr->credits = 0;
ctl_hdr = (mca_btl_wv_control_header_t*)
wv_frag->segment.base.seg_addr.pval;
ctl_hdr->type = MCA_BTL_WV_CONTROL_CTS;
/* Send the fragment */
OPAL_THREAD_LOCK(&endpoint->endpoint_lock);
if (OMPI_SUCCESS != mca_btl_wv_endpoint_post_send(endpoint, sc_frag)) {
BTL_ERROR(("Failed to post CTS send"));
mca_btl_wv_endpoint_invoke_error(endpoint);
}
endpoint->endpoint_cts_sent = true;
OPAL_THREAD_UNLOCK(&endpoint->endpoint_lock);
}
/*
* Called when the CPC has established a connection on an endpoint
*/
void mca_btl_wv_endpoint_cpc_complete(mca_btl_wv_endpoint_t *endpoint)
{
/* If the CPC uses the CTS protocol, then start it up */
if (endpoint->endpoint_local_cpc->cbm_uses_cts) {
int transport_type_ib_p = 0;
/* Post our receives, which will make credit management happy
(i.e., rd_credits will be 0) */
if (OMPI_SUCCESS != mca_btl_wv_endpoint_post_recvs(endpoint)) {
BTL_ERROR(("Failed to post receive buffers"));
mca_btl_wv_endpoint_invoke_error(endpoint);
return;
}
endpoint->endpoint_posted_recvs = true;
/* If this is IB, send the CTS immediately. If this is iWARP,
then only send the CTS if this endpoint was the initiator
of the connection (the receiver will send its CTS when it
receives this side's CTS). Also send the CTS if we already
received the peer's CTS (e.g., if this process was slow to
call cpc_complete(). */
OPAL_OUTPUT((-1, "cpc_complete to peer %s: is IB %d, initiatior %d, cts received: %d",
endpoint->endpoint_proc->proc_ompi->proc_hostname,
transport_type_ib_p,
endpoint->endpoint_initiator,
endpoint->endpoint_cts_received));
if (transport_type_ib_p ||
endpoint->endpoint_initiator ||
endpoint->endpoint_cts_received) {
mca_btl_wv_endpoint_send_cts(endpoint);
/* If we've already got the CTS from the other side, then
mark us as connected */
if (endpoint->endpoint_cts_received) {
OPAL_OUTPUT((-1, "cpc_complete to %s -- already got CTS, so marking endpoint as complete",
endpoint->endpoint_proc->proc_ompi->proc_hostname));
mca_btl_wv_endpoint_connected(endpoint);
}
}
OPAL_OUTPUT((-1, "cpc_complete to %s -- done",
endpoint->endpoint_proc->proc_ompi->proc_hostname));
return;
}
/* Otherwise, just set the endpoint to "connected" */
mca_btl_wv_endpoint_connected(endpoint);
}
/*
* called when the connect module has completed setup of an endpoint
*/
void mca_btl_wv_endpoint_connected(mca_btl_wv_endpoint_t *endpoint)
{
opal_list_item_t *frag_item;
mca_btl_wv_send_frag_t *frag;
bool master = false;
opal_output(-1, "Now we are CONNECTED");
endpoint->endpoint_state = MCA_BTL_IB_CONNECTED;
endpoint->endpoint_btl->device->non_eager_rdma_endpoints++;
/* The connection is correctly setup. Now we can decrease the
event trigger. */
opal_progress_event_users_decrement();
/* Process pending packet on the endpoint */
/* While there are frags in the list, process them */
while (!opal_list_is_empty(&(endpoint->pending_lazy_frags))) {
frag_item = opal_list_remove_first(&(endpoint->pending_lazy_frags));
frag = to_send_frag(frag_item);
/* We need to post this one */
if(OMPI_SUCCESS != mca_btl_wv_endpoint_post_send(endpoint, frag))
BTL_ERROR(("Error posting send"));
}
OPAL_THREAD_UNLOCK(&endpoint->endpoint_lock);
/* if upper layer called put or get before connection moved to connected
* state then we restart them here */
mca_btl_wv_frag_progress_pending_put_get(endpoint,
mca_btl_wv_component.rdma_qp);
}
/*
* Attempt to send a fragment using a given endpoint. If the endpoint is not
* connected, queue the fragment and start the connection as required.
*/
int mca_btl_wv_endpoint_send(mca_btl_base_endpoint_t* ep,
mca_btl_wv_send_frag_t* frag)
{
int rc;
OPAL_THREAD_LOCK(&ep->endpoint_lock);
rc = check_endpoint_state(ep, &to_base_frag(frag)->base,
&ep->pending_lazy_frags);
if(OPAL_LIKELY(OMPI_SUCCESS == rc)) {
rc = mca_btl_wv_endpoint_post_send(ep, frag);
}
OPAL_THREAD_UNLOCK(&ep->endpoint_lock);
if (OPAL_UNLIKELY(OMPI_ERR_RESOURCE_BUSY == rc)) {
rc = OMPI_SUCCESS;
}
return rc;
}
/**
* Return control fragment.
*/
static void mca_btl_wv_endpoint_credits(
mca_btl_base_module_t* btl,
struct mca_btl_base_endpoint_t* ep,
struct mca_btl_base_descriptor_t* des,
int status)
{
int qp;
mca_btl_wv_send_control_frag_t *frag = to_send_control_frag(des);
qp = frag->qp_idx;
/* we don't acquire a WQE for credit message - so decrement.
* Note: doing it for QP used for credit management */
qp_get_wqe(ep, des->order);
if(check_send_credits(ep, qp) || check_eager_rdma_credits(ep))
mca_btl_wv_endpoint_send_credits(ep, qp);
else {
BTL_WV_CREDITS_SEND_UNLOCK(ep, qp);
/* check one more time if credits are available after unlock */
send_credits(ep, qp);
}
}
/**
* Return credits to peer
*/
void mca_btl_wv_endpoint_send_credits(mca_btl_wv_endpoint_t* endpoint,
const int qp)
{
mca_btl_wv_module_t* wv_btl = endpoint->endpoint_btl;
mca_btl_wv_send_control_frag_t* frag;
mca_btl_wv_rdma_credits_header_t *credits_hdr;
int rc;
bool do_rdma = false;
int32_t cm_return;
frag = endpoint->qps[qp].credit_frag;
if(OPAL_UNLIKELY(NULL == frag)) {
frag = alloc_control_frag(wv_btl);
frag->qp_idx = qp;
endpoint->qps[qp].credit_frag = frag;
/* set those once and forever */
to_base_frag(frag)->base.order = mca_btl_wv_component.credits_qp;
to_base_frag(frag)->base.des_cbfunc = mca_btl_wv_endpoint_credits;
to_base_frag(frag)->base.des_cbdata = NULL;
to_base_frag(frag)->base.des_flags |= MCA_BTL_DES_SEND_ALWAYS_CALLBACK;;
to_com_frag(frag)->endpoint = endpoint;
frag->hdr->tag = MCA_BTL_TAG_BTL;
to_base_frag(frag)->segment.base.seg_len =
sizeof(mca_btl_wv_rdma_credits_header_t);
}
assert(frag->qp_idx == qp);
credits_hdr = (mca_btl_wv_rdma_credits_header_t*)
to_base_frag(frag)->segment.base.seg_addr.pval;
if(OMPI_SUCCESS == acquire_eager_rdma_send_credit(endpoint)) {
do_rdma = true;
} else {
if(OPAL_THREAD_ADD32(&endpoint->qps[qp].u.pp_qp.cm_sent, 1) >
(mca_btl_wv_component.qp_infos[qp].u.pp_qp.rd_rsv - 1)) {
OPAL_THREAD_ADD32(&endpoint->qps[qp].u.pp_qp.cm_sent, -1);
BTL_WV_CREDITS_SEND_UNLOCK(endpoint, qp);
return;
}
}
BTL_WV_GET_CREDITS(endpoint->qps[qp].u.pp_qp.rd_credits, frag->hdr->credits);
frag->hdr->cm_seen = 0;
BTL_WV_GET_CREDITS(endpoint->qps[qp].u.pp_qp.cm_return, cm_return);
if(cm_return > 255) {
frag->hdr->cm_seen = 255;
cm_return -= 255;
OPAL_THREAD_ADD32(&endpoint->qps[qp].u.pp_qp.cm_return, cm_return);
} else {
frag->hdr->cm_seen = cm_return;
}
BTL_WV_GET_CREDITS(endpoint->eager_rdma_local.credits, credits_hdr->rdma_credits);
credits_hdr->qpn = qp;
credits_hdr->control.type = MCA_BTL_WV_CONTROL_CREDITS;
if(endpoint->nbo)
BTL_WV_RDMA_CREDITS_HEADER_HTON(*credits_hdr);
if((rc = post_send(endpoint, frag, do_rdma)) == 0)
return;
if(endpoint->nbo) {
BTL_WV_HEADER_NTOH(*frag->hdr);
BTL_WV_RDMA_CREDITS_HEADER_NTOH(*credits_hdr);
}
BTL_WV_CREDITS_SEND_UNLOCK(endpoint, qp);
OPAL_THREAD_ADD32(&endpoint->qps[qp].u.pp_qp.rd_credits,
frag->hdr->credits);
OPAL_THREAD_ADD32(&endpoint->eager_rdma_local.credits,
credits_hdr->rdma_credits);
if(do_rdma)
OPAL_THREAD_ADD32(&endpoint->eager_rdma_remote.tokens, 1);
else
OPAL_THREAD_ADD32(&endpoint->qps[qp].u.pp_qp.cm_sent, -1);
BTL_ERROR(("error posting send request errno %d says %s", rc,
strerror(errno)));
}
/* local callback function for completion of eager rdma connect */
static void mca_btl_wv_endpoint_eager_rdma_connect_cb(
mca_btl_base_module_t* btl,
struct mca_btl_base_endpoint_t* endpoint,
struct mca_btl_base_descriptor_t* descriptor,
int status)
{
mca_btl_wv_device_t *device = endpoint->endpoint_btl->device;
OPAL_THREAD_ADD32(&device->non_eager_rdma_endpoints, -1);
assert(device->non_eager_rdma_endpoints >= 0);
MCA_BTL_IB_FRAG_RETURN(descriptor);
}
/* send the eager rdma connect message to the remote endpoint */
static int mca_btl_wv_endpoint_send_eager_rdma(
mca_btl_base_endpoint_t* endpoint)
{
mca_btl_wv_module_t* wv_btl = endpoint->endpoint_btl;
mca_btl_wv_eager_rdma_header_t *rdma_hdr;
mca_btl_wv_send_control_frag_t* frag;
int rc;
frag = alloc_control_frag(wv_btl);
if(NULL == frag) {
return -1;
}
to_base_frag(frag)->base.des_cbfunc =
mca_btl_wv_endpoint_eager_rdma_connect_cb;
to_base_frag(frag)->base.des_cbdata = NULL;
to_base_frag(frag)->base.des_flags |= MCA_BTL_DES_FLAGS_PRIORITY|MCA_BTL_DES_SEND_ALWAYS_CALLBACK;
to_base_frag(frag)->base.order = mca_btl_wv_component.credits_qp;
to_base_frag(frag)->segment.base.seg_len =
sizeof(mca_btl_wv_eager_rdma_header_t);
to_com_frag(frag)->endpoint = endpoint;
frag->hdr->tag = MCA_BTL_TAG_BTL;
rdma_hdr = (mca_btl_wv_eager_rdma_header_t*)to_base_frag(frag)->segment.base.seg_addr.pval;
rdma_hdr->control.type = MCA_BTL_WV_CONTROL_RDMA;
rdma_hdr->rkey = endpoint->eager_rdma_local.reg->mr->rkey;
rdma_hdr->rdma_start.lval = ompi_ptr_ptol(endpoint->eager_rdma_local.base.pval);
BTL_VERBOSE(("sending rkey %" PRIu32 ", rdma_start.lval %" PRIx64
", pval %p, ival %" PRIu32 " type %d and sizeof(rdma_hdr) %d\n",
rdma_hdr->rkey,
rdma_hdr->rdma_start.lval,
rdma_hdr->rdma_start.pval,
rdma_hdr->rdma_start.ival,
rdma_hdr->control.type,
(int) sizeof(mca_btl_wv_eager_rdma_header_t)
));
if(endpoint->nbo) {
BTL_WV_EAGER_RDMA_CONTROL_HEADER_HTON((*rdma_hdr));
BTL_VERBOSE(("after HTON: sending rkey %" PRIu32 ", rdma_start.lval %" PRIx64 ", pval %p, ival %" PRIu32 "\n",
rdma_hdr->rkey,
rdma_hdr->rdma_start.lval,
rdma_hdr->rdma_start.pval,
rdma_hdr->rdma_start.ival
));
}
rc = mca_btl_wv_endpoint_send(endpoint, frag);
if (OMPI_SUCCESS == rc || OMPI_ERR_RESOURCE_BUSY == rc)
return OMPI_SUCCESS;
MCA_BTL_IB_FRAG_RETURN(frag);
BTL_ERROR(("Error sending RDMA buffer: %s", strerror(errno)));
return rc;
}
/* Setup eager RDMA buffers and notify the remote endpoint*/
void mca_btl_wv_endpoint_connect_eager_rdma(
mca_btl_wv_endpoint_t* endpoint)
{
mca_btl_wv_module_t* wv_btl = endpoint->endpoint_btl;
char *buf;
mca_btl_wv_recv_frag_t *headers_buf;
int i;
/* Set local rdma pointer to 1 temporarily so other threads will not try
* to enter the function */
if(!opal_atomic_cmpset_ptr(&endpoint->eager_rdma_local.base.pval, NULL,
(void*)1))
return;
headers_buf = (mca_btl_wv_recv_frag_t*)
malloc(sizeof(mca_btl_wv_recv_frag_t) *
mca_btl_wv_component.eager_rdma_num);
if(NULL == headers_buf)
goto unlock_rdma_local;
buf = (char *) wv_btl->super.btl_mpool->mpool_alloc(wv_btl->super.btl_mpool,
wv_btl->eager_rdma_frag_size *
mca_btl_wv_component.eager_rdma_num,
mca_btl_wv_component.buffer_alignment,
MCA_MPOOL_FLAGS_CACHE_BYPASS,
(mca_mpool_base_registration_t**)&endpoint->eager_rdma_local.reg);
if(!buf)
goto free_headers_buf;
buf = buf + wv_btl->eager_rdma_frag_size -
sizeof(mca_btl_wv_footer_t) - wv_btl->super.btl_eager_limit -
sizeof(mca_btl_wv_header_t);
for(i = 0; i < mca_btl_wv_component.eager_rdma_num; i++) {
ompi_free_list_item_t *item;
mca_btl_wv_recv_frag_t * frag;
mca_btl_wv_frag_init_data_t init_data;
item = (ompi_free_list_item_t*)&headers_buf[i];
item->registration = (mca_mpool_base_registration_t *)endpoint->eager_rdma_local.reg;
item->ptr = buf + i * wv_btl->eager_rdma_frag_size;
OBJ_CONSTRUCT(item, mca_btl_wv_recv_frag_t);
init_data.order = mca_btl_wv_component.credits_qp;
init_data.list = NULL;
mca_btl_wv_frag_init(item, &init_data);
frag = to_recv_frag(item);
to_base_frag(frag)->type = MCA_BTL_WV_FRAG_EAGER_RDMA;
to_com_frag(frag)->endpoint = endpoint;
frag->ftr = (mca_btl_wv_footer_t*)
((char*)to_base_frag(frag)->segment.base.seg_addr.pval +
mca_btl_wv_component.eager_limit);
MCA_BTL_WV_RDMA_MAKE_REMOTE(frag->ftr);
}
endpoint->eager_rdma_local.frags = headers_buf;
endpoint->eager_rdma_local.rd_win =
mca_btl_wv_component.eager_rdma_num >> 2;
endpoint->eager_rdma_local.rd_win =
endpoint->eager_rdma_local.rd_win?endpoint->eager_rdma_local.rd_win:1;
/* set local rdma pointer to real value */
opal_atomic_cmpset_ptr(&endpoint->eager_rdma_local.base.pval, (void*)1,
buf);
if(mca_btl_wv_endpoint_send_eager_rdma(endpoint) == OMPI_SUCCESS) {
mca_btl_wv_device_t *device = endpoint->endpoint_btl->device;
mca_btl_wv_endpoint_t **p;
OBJ_RETAIN(endpoint);
assert(((opal_object_t*)endpoint)->obj_reference_count == 2);
do {
p = &device->eager_rdma_buffers[device->eager_rdma_buffers_count];
} while(!opal_atomic_cmpset_ptr(p, NULL, endpoint));
OPAL_THREAD_ADD32(&wv_btl->eager_rdma_channels, 1);
/* from this point progress function starts to poll new buffer */
OPAL_THREAD_ADD32(&device->eager_rdma_buffers_count, 1);
return;
}
wv_btl->super.btl_mpool->mpool_free(wv_btl->super.btl_mpool,
buf, (mca_mpool_base_registration_t*)endpoint->eager_rdma_local.reg);
free_headers_buf:
free(headers_buf);
unlock_rdma_local:
/* set local rdma pointer back to zero. Will retry later */
opal_atomic_cmpset_ptr(&endpoint->eager_rdma_local.base.pval,
endpoint->eager_rdma_local.base.pval, NULL);
endpoint->eager_rdma_local.frags = NULL;
}
/*
* Invoke an error on the btl associated with an endpoint. If we
* don't have an endpoint, then just use the first one on the
* component list of BTLs.
*/
void *mca_btl_wv_endpoint_invoke_error(void *context)
{
mca_btl_wv_endpoint_t *endpoint = (mca_btl_wv_endpoint_t*) context;
mca_btl_wv_module_t *btl = NULL;
if (NULL == endpoint) {
int i;
for (i = 0; i < mca_btl_wv_component.ib_num_btls; ++i) {
if (NULL != mca_btl_wv_component.wv_btls[i] &&
NULL != mca_btl_wv_component.wv_btls[i]->error_cb) {
btl = mca_btl_wv_component.wv_btls[i];
break;
}
}
} else {
btl = endpoint->endpoint_btl;
}
/* If we didn't find a BTL, then just bail :-( */
if (NULL == btl || NULL == btl->error_cb) {
opal_show_help("help-mpi-btl-wv.txt",
"cannot raise btl error", true,
ompi_process_info.nodename,
__FILE__, __LINE__);
exit(1);
}
/* Invoke the callback to the upper layer */
btl->error_cb(&(btl->super), MCA_BTL_ERROR_FLAGS_FATAL, NULL, NULL);
/* Will likely never get here */
return NULL;
}

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

@ -1,518 +0,0 @@
/*
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology
* Corporation. All rights reserved.
* Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2007-2009 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2006-2007 Los Alamos National Security, LLC. All rights
* reserved.
* Copyright (c) 2006-2007 Voltaire All rights reserved.
* Copyright (c) 2007-2009 Mellanox Technologies. All rights reserved.
* Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*/
#ifndef MCA_BTL_IB_ENDPOINT_H
#define MCA_BTL_IB_ENDPOINT_H
#include "opal/class/opal_list.h"
#include "opal/mca/event/event.h"
#include "opal/util/output.h"
#include "ompi/mca/btl/btl.h"
#include "btl_wv.h"
#include "btl_wv_frag.h"
#include "btl_wv_eager_rdma.h"
#include <errno.h>
#include <string.h>
#include "ompi/mca/btl/base/btl_base_error.h"
#include "connect/base.h"
BEGIN_C_DECLS
struct mca_btl_wv_frag_t;
struct mca_btl_wv_proc_modex_t;
/**
* State of IB endpoint connection.
*/
typedef enum {
/* Defines the state in which this BTL instance
* has started the process of connection */
MCA_BTL_IB_CONNECTING,
/* Waiting for ack from endpoint */
MCA_BTL_IB_CONNECT_ACK,
/*Waiting for final connection ACK from endpoint */
MCA_BTL_IB_WAITING_ACK,
/* Connected ... both sender & receiver have
* buffers associated with this connection */
MCA_BTL_IB_CONNECTED,
/* Connection is closed, there are no resources
* associated with this */
MCA_BTL_IB_CLOSED,
/* Maximum number of retries have been used.
* Report failure on send to upper layer */
MCA_BTL_IB_FAILED
} mca_btl_wv_endpoint_state_t;
typedef struct mca_btl_wv_rem_qp_info_t {
uint32_t rem_qp_num;
/* Remote QP number */
uint32_t rem_psn;
/* Remote processes port sequence number */
} mca_btl_wv_rem_qp_info_t;
typedef struct mca_btl_wv_rem_srq_info_t {
/* Remote SRQ number */
uint32_t rem_srq_num;
} mca_btl_wv_rem_srq_info_t;
typedef struct mca_btl_wv_rem_info_t {
/* Local identifier of the remote process */
uint16_t rem_lid;
/* subnet id of remote process */
uint64_t rem_subnet_id;
/* MTU of remote process */
uint32_t rem_mtu;
/* index of remote endpoint in endpoint array */
uint32_t rem_index;
/* Remote QPs */
mca_btl_wv_rem_qp_info_t *rem_qps;
/* Remote xrc_srq info, used only with XRC connections */
mca_btl_wv_rem_srq_info_t *rem_srqs;
/* Vendor id of remote HCA */
uint32_t rem_vendor_id;
/* Vendor part id of remote HCA */
uint32_t rem_vendor_part_id;
/* Transport type of remote port */
mca_btl_wv_transport_type_t rem_transport_type;
} mca_btl_wv_rem_info_t;
/**
* Agggregates all per peer qp info for an endpoint
*/
typedef struct mca_btl_wv_endpoint_pp_qp_t {
int32_t sd_credits; /**< this rank's view of the credits
* available for sending:
* this is the credits granted by the
* remote peer which has some relation to the
* number of receive buffers posted remotely
*/
int32_t rd_posted; /**< number of descriptors posted to the nic*/
int32_t rd_credits; /**< number of credits to return to peer */
int32_t cm_received; /**< Credit messages received */
int32_t cm_return; /**< how may credits to return */
int32_t cm_sent; /**< Outstanding number of credit messages */
} mca_btl_wv_endpoint_pp_qp_t;
/**
* Aggregates all srq qp info for an endpoint
*/
typedef struct mca_btl_wv_endpoint_srq_qp_t {
int32_t dummy;
} mca_btl_wv_endpoint_srq_qp_t;
typedef struct mca_btl_wv_qp_t {
struct wv_qp *lcl_qp;
uint32_t lcl_psn;
int32_t sd_wqe; /**< number of available send wqe entries */
int users;
opal_mutex_t lock;
} mca_btl_wv_qp_t;
typedef struct mca_btl_wv_endpoint_qp_t {
mca_btl_wv_qp_t *qp;
opal_list_t no_credits_pending_frags[2]; /**< put fragment here if there is no credits
available */
opal_list_t no_wqe_pending_frags[2]; /**< put fragments here if there is no wqe
available */
int32_t rd_credit_send_lock; /**< Lock credit send fragment */
mca_btl_wv_send_control_frag_t *credit_frag;
size_t ib_inline_max; /**< max size of inline send*/
union {
mca_btl_wv_endpoint_srq_qp_t srq_qp;
mca_btl_wv_endpoint_pp_qp_t pp_qp;
} u;
} mca_btl_wv_endpoint_qp_t;
/**
* An abstraction that represents a connection to a endpoint process.
* An instance of mca_btl_base_endpoint_t is associated w/ each process
* and BTL pair at startup. However, connections to the endpoint
* are established dynamically on an as-needed basis:
*/
struct mca_btl_base_endpoint_t {
opal_list_item_t super;
/** BTL module that created this connection */
struct mca_btl_wv_module_t* endpoint_btl;
/** proc structure corresponding to endpoint */
struct mca_btl_wv_proc_t* endpoint_proc;
/** local CPC to connect to this endpoint */
ompi_btl_wv_connect_base_module_t *endpoint_local_cpc;
/** hook for local CPC to hang endpoint-specific data */
void *endpoint_local_cpc_data;
/** If endpoint_local_cpc->cbm_uses_cts is true and this endpoint
is iWARP, then endpoint_initiator must be true on the side
that actually initiates the QP, false on the other side. This
bool is used to know which way to send the first CTS
message. */
bool endpoint_initiator;
/** pointer to remote proc's CPC data (essentially its CPC modex
message) */
ompi_btl_wv_connect_base_module_data_t *endpoint_remote_cpc_data;
/** current state of the connection */
mca_btl_wv_endpoint_state_t endpoint_state;
/** number of connection retries attempted */
size_t endpoint_retries;
/** timestamp of when the first connection was attempted */
double endpoint_tstamp;
/** lock for concurrent access to endpoint state */
opal_mutex_t endpoint_lock;
/** list of pending frags due to lazy connection establishment
for this endpotint */
opal_list_t pending_lazy_frags;
mca_btl_wv_endpoint_qp_t *qps;
/** list of pending rget ops */
opal_list_t pending_get_frags;
/** list of pending rput ops */
opal_list_t pending_put_frags;
/** number of available get tokens */
int32_t get_tokens;
/** subnet id of this endpoint*/
uint64_t subnet_id;
/** number of eager received */
int32_t eager_recv_count;
/** info about remote RDMA buffer */
mca_btl_wv_eager_rdma_remote_t eager_rdma_remote;
/** info about local RDMA buffer */
mca_btl_wv_eager_rdma_local_t eager_rdma_local;
/** index of the endpoint in endpoints array */
int32_t index;
/** does the endpoint require network byte ordering? */
bool nbo;
/** use eager rdma for this peer? */
bool use_eager_rdma;
/** information about the remote port */
mca_btl_wv_rem_info_t rem_info;
/** Frag for initial wireup CTS protocol; will be NULL if CPC
indicates that it does not want to use CTS */
mca_btl_wv_recv_frag_t endpoint_cts_frag;
/** Memory registration info for the CTS frag */
struct wv_mr *endpoint_cts_mr;
/** Whether we've posted receives on this EP or not (only used in
CTS protocol) */
bool endpoint_posted_recvs;
/** Whether we've received the CTS from the peer or not (only used
in CTS protocol) */
bool endpoint_cts_received;
/** Whether we've send out CTS to the peer or not (only used in
CTS protocol) */
bool endpoint_cts_sent;
};
typedef struct mca_btl_base_endpoint_t mca_btl_base_endpoint_t;
typedef mca_btl_base_endpoint_t mca_btl_wv_endpoint_t;
OBJ_CLASS_DECLARATION(mca_btl_wv_endpoint_t);
static inline int32_t qp_get_wqe(mca_btl_wv_endpoint_t *ep, const int qp)
{
return OPAL_THREAD_ADD32(&ep->qps[qp].qp->sd_wqe, -1);
}
static inline int32_t qp_put_wqe(mca_btl_wv_endpoint_t *ep, const int qp)
{
return OPAL_THREAD_ADD32(&ep->qps[qp].qp->sd_wqe, 1);
}
int mca_btl_wv_endpoint_send(mca_btl_base_endpoint_t*,
mca_btl_wv_send_frag_t*);
int mca_btl_wv_endpoint_post_send(mca_btl_wv_endpoint_t*,
mca_btl_wv_send_frag_t*);
void mca_btl_wv_endpoint_send_credits(mca_btl_base_endpoint_t*, const int);
void mca_btl_wv_endpoint_connect_eager_rdma(mca_btl_wv_endpoint_t*);
int mca_btl_wv_endpoint_post_recvs(mca_btl_wv_endpoint_t*);
void mca_btl_wv_endpoint_send_cts(mca_btl_wv_endpoint_t *endpoint);
void mca_btl_wv_endpoint_cpc_complete(mca_btl_wv_endpoint_t*);
void mca_btl_wv_endpoint_connected(mca_btl_wv_endpoint_t*);
void mca_btl_wv_endpoint_init(mca_btl_wv_module_t*,
mca_btl_base_endpoint_t*,
ompi_btl_wv_connect_base_module_t *local_cpc,
struct mca_btl_wv_proc_modex_t *remote_proc_info,
ompi_btl_wv_connect_base_module_data_t *remote_cpc_data);
/*
* Invoke an error on the btl associated with an endpoint. If we
* don't have an endpoint, then just use the first one on the
* component list of BTLs.
*/
void *mca_btl_wv_endpoint_invoke_error(void *endpoint);
static inline int post_recvs(mca_btl_base_endpoint_t *ep, const int qp,
const int num_post)
{
int i;
struct wv_recv_wr *wr = NULL;
mca_btl_wv_module_t *wv_btl = ep->endpoint_btl;
HRESULT hr = 0;
if(0 == num_post)
return OMPI_SUCCESS;
for(i = 0; i < num_post; i++) {
int rc;
ompi_free_list_item_t* item;
OMPI_FREE_LIST_WAIT(&wv_btl->device->qps[qp].recv_free, item, rc);
to_base_frag(item)->base.order = qp;
to_com_frag(item)->endpoint = ep;
wr = &to_recv_frag(item)->rd_desc;
hr = ep->qps[qp].qp->lcl_qp->handle->PostReceive(wr->wr_id,wr->sg_list,
wr->num_sge);
}
if(SUCCEEDED(hr)) {
return OMPI_SUCCESS;
}else {
BTL_ERROR(("posting receive on qp %d", qp));
return OMPI_ERROR;
}
}
static inline int mca_btl_wv_endpoint_post_rr_nolock(
mca_btl_base_endpoint_t *ep, const int qp)
{
int rd_rsv = mca_btl_wv_component.qp_infos[qp].u.pp_qp.rd_rsv;
int rd_num = mca_btl_wv_component.qp_infos[qp].rd_num;
int rd_low = mca_btl_wv_component.qp_infos[qp].rd_low;
int cqp = mca_btl_wv_component.credits_qp, rc;
int cm_received = 0, num_post = 0;
assert(BTL_WV_QP_TYPE_PP(qp));
if(ep->qps[qp].u.pp_qp.rd_posted <= rd_low)
num_post = rd_num - ep->qps[qp].u.pp_qp.rd_posted;
assert(num_post >= 0);
if(ep->qps[qp].u.pp_qp.cm_received >= (rd_rsv >> 2))
cm_received = ep->qps[qp].u.pp_qp.cm_received;
if((rc = post_recvs(ep, qp, num_post)) != OMPI_SUCCESS) {
return rc;
}
OPAL_THREAD_ADD32(&ep->qps[qp].u.pp_qp.rd_posted, num_post);
OPAL_THREAD_ADD32(&ep->qps[qp].u.pp_qp.rd_credits, num_post);
/* post buffers for credit management on credit management qp */
if((rc = post_recvs(ep, cqp, cm_received)) != OMPI_SUCCESS) {
return rc;
}
OPAL_THREAD_ADD32(&ep->qps[qp].u.pp_qp.cm_return, cm_received);
OPAL_THREAD_ADD32(&ep->qps[qp].u.pp_qp.cm_received, -cm_received);
assert(ep->qps[qp].u.pp_qp.rd_credits <= rd_num &&
ep->qps[qp].u.pp_qp.rd_credits >= 0);
return OMPI_SUCCESS;
}
static inline int mca_btl_wv_endpoint_post_rr(
mca_btl_base_endpoint_t *ep, const int qp)
{
int ret;
OPAL_THREAD_LOCK(&ep->endpoint_lock);
ret = mca_btl_wv_endpoint_post_rr_nolock(ep, qp);
OPAL_THREAD_UNLOCK(&ep->endpoint_lock);
return ret;
}
#define BTL_WV_CREDITS_SEND_TRYLOCK(E, Q) \
OPAL_ATOMIC_CMPSET_32(&(E)->qps[(Q)].rd_credit_send_lock, 0, 1)
#define BTL_WV_CREDITS_SEND_UNLOCK(E, Q) \
OPAL_ATOMIC_CMPSET_32(&(E)->qps[(Q)].rd_credit_send_lock, 1, 0)
#define BTL_WV_GET_CREDITS(FROM, TO) \
do { \
TO = FROM; \
} while(0 == OPAL_ATOMIC_CMPSET_32(&FROM, TO, 0))
static inline bool check_eager_rdma_credits(const mca_btl_wv_endpoint_t *ep)
{
return (ep->eager_rdma_local.credits > ep->eager_rdma_local.rd_win) ? true :
false;
}
static inline bool
check_send_credits(const mca_btl_wv_endpoint_t *ep, const int qp)
{
if(!BTL_WV_QP_TYPE_PP(qp))
return false;
return (ep->qps[qp].u.pp_qp.rd_credits >=
mca_btl_wv_component.qp_infos[qp].u.pp_qp.rd_win) ? true : false;
}
static inline void send_credits(mca_btl_wv_endpoint_t *ep, int qp)
{
if(BTL_WV_QP_TYPE_PP(qp)) {
if(check_send_credits(ep, qp))
goto try_send;
} else {
qp = mca_btl_wv_component.credits_qp;
}
if(!check_eager_rdma_credits(ep))
return;
try_send:
if(BTL_WV_CREDITS_SEND_TRYLOCK(ep, qp))
mca_btl_wv_endpoint_send_credits(ep, qp);
}
static inline int check_endpoint_state(mca_btl_wv_endpoint_t *ep,
mca_btl_base_descriptor_t *des, opal_list_t *pending_list)
{
int rc = OMPI_ERR_RESOURCE_BUSY;
switch(ep->endpoint_state) {
case MCA_BTL_IB_CLOSED:
rc = ep->endpoint_local_cpc->cbm_start_connect(ep->endpoint_local_cpc, ep);
if (OMPI_SUCCESS == rc) {
rc = OMPI_ERR_RESOURCE_BUSY;
}
/*
* As long as we expect a message from the peer (in order
* to setup the connection) let the event engine pool the
* OOB events. Note: we increment it once peer active
* connection.
*/
opal_progress_event_users_increment();
/* fall through */
default:
opal_list_append(pending_list, (opal_list_item_t *)des);
break;
case MCA_BTL_IB_FAILED:
rc = OMPI_ERR_UNREACH;
break;
case MCA_BTL_IB_CONNECTED:
rc = OMPI_SUCCESS;
break;
}
return rc;
}
static inline __opal_attribute_always_inline__ int
ib_send_flags(uint32_t size, mca_btl_wv_endpoint_qp_t *qp)
{
return WV_SEND_SIGNALED |
((size <= qp->ib_inline_max) ? WV_SEND_INLINE : 0);
}
static inline int
acquire_eager_rdma_send_credit(mca_btl_wv_endpoint_t *endpoint)
{
if(OPAL_THREAD_ADD32(&endpoint->eager_rdma_remote.tokens, -1) < 0) {
OPAL_THREAD_ADD32(&endpoint->eager_rdma_remote.tokens, 1);
return OMPI_ERR_OUT_OF_RESOURCE;
}
return OMPI_SUCCESS;
}
#define ntohll(x) (((_int64)(ntohl((int)((x << 32) >> 32))) << 32)|(unsigned int)ntohl(((int)(x >> 32))))
#define htonll(x) ntohll(x)
static inline int post_send(mca_btl_wv_endpoint_t *ep,
mca_btl_wv_send_frag_t *frag, const bool rdma)
{
mca_btl_wv_module_t *wv_btl = ep->endpoint_btl;
mca_btl_base_segment_t *seg = (mca_btl_base_segment_t *) &to_base_frag(frag)->segment;
WV_SGE *sg = &to_com_frag(frag)->sg_entry;
WV_SEND_REQUEST *sr_desc = &to_out_frag(frag)->sr_desc;
WV_SEND_REQUEST *bad_wr;
HRESULT hr = 0;
int qp = to_base_frag(frag)->base.order;
sg->Length = seg->seg_len + sizeof(mca_btl_wv_header_t) +
(rdma ? sizeof(mca_btl_wv_footer_t) : 0) + frag->coalesced_length;
sr_desc->Flags = ib_send_flags(sg->Length, &(ep->qps[qp]));
if(ep->nbo)
BTL_WV_HEADER_HTON(*frag->hdr);
if(rdma) {
int32_t head;
mca_btl_wv_footer_t* ftr =
(mca_btl_wv_footer_t*)(((char*)frag->hdr) + sg->Length -
sizeof(mca_btl_wv_footer_t));
sr_desc->Opcode = WvRdmaWrite;
MCA_BTL_WV_RDMA_FRAG_SET_SIZE(ftr, sg->Length);
MCA_BTL_WV_RDMA_MAKE_LOCAL(ftr);
if(ep->nbo)
BTL_WV_FOOTER_HTON(*ftr);
sr_desc->Wr.Rdma.Rkey = htonl(ep->eager_rdma_remote.rkey);
MCA_BTL_WV_RDMA_MOVE_INDEX(ep->eager_rdma_remote.head, head);
sr_desc->Wr.Rdma.RemoteAddress =
ep->eager_rdma_remote.base.lval +
head * wv_btl->eager_rdma_frag_size +
sizeof(mca_btl_wv_header_t) +
mca_btl_wv_component.eager_limit +
sizeof(mca_btl_wv_footer_t);
sr_desc->Wr.Rdma.RemoteAddress = htonll(sr_desc->Wr.Rdma.RemoteAddress - sg->Length);
} else {
if(BTL_WV_QP_TYPE_PP(qp)) {
sr_desc->Opcode = WvSend;
} else {
sr_desc->Opcode = WvSend;
sr_desc->Flags |= WV_SEND_IMMEDIATE;
sr_desc->ImmediateData = ep->rem_info.rem_index;
}
}
assert(sg->pAddress == (void*)(uintptr_t)frag->hdr);
hr = ep->qps[qp].qp->lcl_qp->handle->PostSend(sr_desc,
(WV_SEND_REQUEST**)&bad_wr);
if(SUCCEEDED(hr))
return 0;
else
return 1;
}
END_C_DECLS
#endif

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше