Remove all remaining vestiges of the Windows integration
This commit was SVN r28137.
This commit is contained in:
parent
e71b40fdcb
commit
a4b6fb241f
2
README
2
README
@ -115,8 +115,6 @@ General notes
|
||||
- ARMv4, ARMv5, ARMv6, ARMv7 (when using non-inline assembly; only
|
||||
ARMv7 is fully supported when -DOMPI_DISABLE_INLINE_ASM is used).
|
||||
- Other 64 bit platforms (e.g., Linux on PPC64)
|
||||
- Microsoft Windows CCP (Microsoft Windows server 2003 and 2008);
|
||||
see the README.WINDOWS file.
|
||||
|
||||
Compiler Notes
|
||||
--------------
|
||||
|
@ -1,179 +0,0 @@
|
||||
10 July 2009
|
||||
---------------
|
||||
|
||||
This version of Open MPI compiles and runs under Microsoft Windows
|
||||
platforms, including Windows XP, Windows HPC Server 2003/2008 and also
|
||||
Windows 7 RC. It provides two remote process launch components, one is
|
||||
using WMI, and the other is using Windows CCP API for Windows HPC
|
||||
Servers. But it has received limited testing compared to other POSIX-like
|
||||
environments, so feedbacks are important and helpful for us.
|
||||
|
||||
You can download an Open MPI tarball from the main web site
|
||||
(http://www.open-mpi.org) or check out a developer copy via Subversion
|
||||
(more information about SVN checkout available on the Open MPI web
|
||||
site).
|
||||
|
||||
The rest of the document is divided on 3 sections. The first and
|
||||
second sections are for "easy" setup, based on some files that are
|
||||
distributed in Open MPI (32 and 64 bits versions). The third section
|
||||
is only for advanced users or developers who want to deeply dig into
|
||||
the software.
|
||||
|
||||
============================================================================
|
||||
|
||||
First approach: Using CMake
|
||||
|
||||
NOTE: CMake support is available in the Open MPI development
|
||||
trunk and 1.3.3 release.
|
||||
|
||||
|
||||
I. Build Open MPI
|
||||
|
||||
1. Download the latest version of CMake (at least v2.4).
|
||||
|
||||
2. In the CMake GUI, add the source path and build path of Open MPI
|
||||
(out of source build is recommended).
|
||||
|
||||
3. Then configure, and after the first time configuration, all
|
||||
available options will show up in the CMake GUI. Select the
|
||||
options that you require.
|
||||
|
||||
4. Run configure again to generate all Windows solution files; they
|
||||
will be generated in build path.
|
||||
|
||||
5. Go to the build directory, open the generated Windows solution
|
||||
file, and compile.
|
||||
|
||||
6. Build the 'INSTALL' project to install files into the path that
|
||||
has been set with CMAKE_INSTALL_PREFIX variable in CMake GUI.
|
||||
|
||||
7. (optional) To generate a installer, you should install NSIS, and build the
|
||||
'PACKAGE' project in the Open MPI sulotion.
|
||||
|
||||
|
||||
II. Build MPI applications with Open MPI
|
||||
|
||||
After successfully built and installed Open MPI, there are two ways
|
||||
to compile and link your applications against the generated libraries:
|
||||
|
||||
Using Visual Studio IDE
|
||||
|
||||
1. In your application's Visual Studio solution, on the target project
|
||||
that needs to link with MPI, add the installed Open MPI library path
|
||||
(for example C:\Program Files\OpenMPI_v1.4\lib) into "Project Property Pages" ->
|
||||
"Configuration Properties" -> Linker -> General -> "Additional Library Directories"
|
||||
|
||||
2. Also put the library names, for example libopen-mpi.lib, into
|
||||
"Project Property Pages" -> "Configuration Properties" -> Linker ->
|
||||
Input -> "Additional Dependencies". Please note that, if you built
|
||||
debug version of Open MPI, the generated library names will have
|
||||
suffix 'd', for example, libopen-mpid.lib.
|
||||
|
||||
Using Open MPI compiler wrappers in VS Command Prompt
|
||||
|
||||
1. Open up a Visual Studio Command Prompt, so that the Visual Studio
|
||||
environment is set, and the VS compiler command cl.exe is available.
|
||||
|
||||
2. Set up Open MPI path environment variable, for example,
|
||||
"set PATH=c:\Program Files\OpenMPI_v1.4\bin;%PATH%", or set it up in
|
||||
the system settings. Please note, using an Open MPI installer, there
|
||||
will be an option to set the system variables automatically.
|
||||
|
||||
3. Simply use one of the Open MPI compiler wrapper to compile and
|
||||
link your application with one single command, for example:
|
||||
c:\> mpicc app.c
|
||||
|
||||
|
||||
III. Run MPI applications
|
||||
|
||||
To launch the application, use the mpirun command, for example:
|
||||
c:\> mpirun -np 2 app.exe
|
||||
or
|
||||
c:\> mpirun -np 2 -host host1 host2 app.exe
|
||||
|
||||
Please note, in order to launch remote MPI processes using WMI, a few Windows
|
||||
settings has to be configured on all nodes, please refer to the following links:
|
||||
http://msdn.microsoft.com/en-us/library/aa393266(VS.85).aspx
|
||||
http://community.spiceworks.com/topic/578
|
||||
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
Second approach: Simple and straightforward
|
||||
|
||||
Step 1: Untar the contrib/platform/win32/ompi-static.tgz tarball in
|
||||
the root directory of the Open MPI distribution.
|
||||
|
||||
Step 2: Go in the ompi/datatype subdirectory in the Open MPI
|
||||
distribution and copy the following:
|
||||
|
||||
datatype_pack.c to datatype_pack_checksum.c
|
||||
datatype_unpack.c to datatype_unpack_checksum.c
|
||||
|
||||
Step 3: Add the following to ompi/tools/ompi_info/ompi_info.h and
|
||||
change the relevant information inside (i.e., replace
|
||||
everything between @'s).
|
||||
|
||||
#define OPAL_CONFIGURE_USER "@USER_NAME@"
|
||||
#define OPAL_CONFIGURE_HOST "@HOST_NAME@"
|
||||
#define OPAL_CONFIGURE_DATE "@TODAY_DATE@"
|
||||
#define OMPI_BUILD_USER OPAL_CONFIGURE_USER
|
||||
#define OMPI_BUILD_HOST OPAL_CONFIGURE_HOST
|
||||
#define OMPI_BUILD_DATE OPAL_CONFIGURE_DATE
|
||||
#define OMPI_BUILD_CFLAGS "/Od /Gm /EHsc /RTC1 /MDd"
|
||||
#define OMPI_BUILD_CPPFLAGS "-I${HOME}/ompi-trunk -I${HOME}/opal/include -I${HOME}/ompi-trunk/orte/include -I${HOME}/ompi-trunk/ompi/include"
|
||||
#define OMPI_BUILD_CXXFLAGS "/Od /Gm /EHsc /RTC1 /MDd"
|
||||
#define OMPI_BUILD_CXXCPPFLAGS "-I${HOME}/ompi-trunk -I../../.. -I$(HOME}/ompi-trunk/opal/include -I${HOME}/ompi-trunk/orte/include -I${HOME}/ompi-trunk/ompi/include"
|
||||
#define OMPI_BUILD_FFLAGS ""
|
||||
#define OMPI_BUILD_FCFLAGS ""
|
||||
#define OMPI_BUILD_LDFLAGS " "
|
||||
#define OMPI_BUILD_LIBS " "
|
||||
#define OPAL_CC_ABSOLUTE "cl"
|
||||
#define OMPI_CXX_ABSOLUTE "cl"
|
||||
#define OMPI_F77_ABSOLUTE "none"
|
||||
#define OMPI_F90_ABSOLUTE "none"
|
||||
#define OMPI_F90_BUILD_SIZE "small"
|
||||
|
||||
Step 4: Open the Open MPI project (.sln file) from the root directory
|
||||
of the distribution.
|
||||
|
||||
Step 5: Choose which version you want to build (from the project
|
||||
manager).
|
||||
|
||||
Step 6: Add the build directory to your PATH.
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
Third approach: Advanced users
|
||||
|
||||
The rest of this document is only for advanced users / developers;
|
||||
i.e., those who has spare time or an urgent necessity to compile their
|
||||
own Windows version of Open MPI.
|
||||
|
||||
Compiling Open MPI natively on Windows requires several tools. Of
|
||||
course, one need the Microsoft Visual Studio for their C/C++ compiler
|
||||
as well as for the ml (assembler compiler) and the link utilities.
|
||||
But the current version require some GNU tools as well. Here is the
|
||||
list of such tools:
|
||||
|
||||
1. Download any Unix for Windows environment. Tested environments include
|
||||
- cygwin http://www.cygwin.com/
|
||||
- minGW http://www.mingw.org/
|
||||
- Windows Services for Unix (SFU)
|
||||
http://technet.microsoft.com/en-us/interopmigration/bb380242.aspx
|
||||
|
||||
2. Make the default shell ash.exe (install it if it's not installed by
|
||||
default) as it will highly decrease the configuration and
|
||||
compilation time.
|
||||
|
||||
3. Download a very recent Gnu Libtool (e.g., Libtool 2.2.6).
|
||||
|
||||
Now you should be set. The most difficult part is done. Just use your
|
||||
favorite shell to get a window, go in the Open MPi directory and do
|
||||
like in any UNIX environments: configure, make, and make install.
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
If you have any problems, find any bugs please feel free to report
|
||||
them to Open MPI user's mailing list (see
|
||||
http://www.open-mpi.org/community/lists/ompi.php).
|
8
VERSION
8
VERSION
@ -21,12 +21,12 @@ release=0
|
||||
# only requirement is that it must be entirely printable ASCII
|
||||
# characters and have no white space.
|
||||
|
||||
greek=a1
|
||||
greek=
|
||||
|
||||
# If want_repo_rev=1, then the repo revision number will be included
|
||||
# in the overall Open MPI version number in some form.
|
||||
|
||||
want_repo_rev=1
|
||||
want_repo_rev=0
|
||||
|
||||
# If repo_rev=-1, then the repository version number will be obtained
|
||||
# dynamically at run time, either:
|
||||
@ -46,11 +46,11 @@ want_repo_rev=1
|
||||
# from an SVN checkout, if repo_rev=-1, then its value is replaced
|
||||
# with the output of "svnversion".
|
||||
|
||||
repo_rev=-1
|
||||
repo_rev=r28134M
|
||||
|
||||
# The date when this release was created
|
||||
|
||||
date="Unreleased developer copy"
|
||||
date="Feb 28, 2013"
|
||||
|
||||
# The shared library version of each of Open MPI's public libraries.
|
||||
# These versions are maintained in accordance with the "Library
|
||||
|
@ -761,9 +761,7 @@ AC_DEFUN([OPAL_CONFIG_ASM],[
|
||||
[AC_HELP_STRING([--enable-builtin-atomics],
|
||||
[Enable use of __sync builtin atomics (default: disabled)])])
|
||||
|
||||
if test "$ompi_cv_c_compiler_vendor" = "microsoft" ; then
|
||||
ompi_cv_asm_arch="WINDOWS"
|
||||
elif test "$enable_builtin_atomics" = "yes" ; then
|
||||
if test "$enable_builtin_atomics" = "yes" ; then
|
||||
OPAL_CHECK_SYNC_BUILTINS([ompi_cv_asm_arch="SYNC_BUILTIN"],
|
||||
[AC_MSG_ERROR([__sync builtin atomics requested but not found.])])
|
||||
AC_DEFINE([OPAL_C_GCC_INLINE_ASSEMBLY], [1],
|
||||
|
@ -119,11 +119,7 @@ struct mca_btl_tcp2_module_t {
|
||||
typedef struct mca_btl_tcp2_module_t mca_btl_tcp2_module_t;
|
||||
extern mca_btl_tcp2_module_t mca_btl_tcp2_module;
|
||||
|
||||
#if defined(__WINDOWS__)
|
||||
#define CLOSE_THE_SOCKET(socket) closesocket(socket)
|
||||
#else
|
||||
#define CLOSE_THE_SOCKET(socket) close(socket)
|
||||
#endif /* defined(__WINDOWS__) */
|
||||
|
||||
/**
|
||||
* Register TCP component parameters with the MCA framework
|
||||
|
@ -172,13 +172,6 @@ static void mca_btl_tcp2_component_accept_handler(int, short, void*);
|
||||
int mca_btl_tcp2_component_open(void)
|
||||
{
|
||||
char* message;
|
||||
#ifdef __WINDOWS__
|
||||
WSADATA win_sock_data;
|
||||
if( WSAStartup(MAKEWORD(2,2), &win_sock_data) != 0 ) {
|
||||
BTL_ERROR(("failed to initialise windows sockets:%d", WSAGetLastError()));
|
||||
return OMPI_ERROR;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* initialize state */
|
||||
mca_btl_tcp2_component.tcp_listen_sd = -1;
|
||||
@ -340,10 +333,6 @@ int mca_btl_tcp2_component_close(void)
|
||||
OBJ_DESTRUCT(&mca_btl_tcp2_component.tcp_frag_user);
|
||||
OBJ_DESTRUCT(&mca_btl_tcp2_component.tcp_lock);
|
||||
|
||||
#ifdef __WINDOWS__
|
||||
WSACleanup();
|
||||
#endif
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -1,181 +0,0 @@
|
||||
# Copyright (c) 2007-2011 High Performance Computing Center Stuttgart,
|
||||
# University of Stuttgart. All rights reserved.
|
||||
# Copyright (c) 2008 The University of Tennessee and The University
|
||||
# of Tennessee Research Foundation. All rights
|
||||
# reserved.
|
||||
# $COPYRIGHT$
|
||||
#
|
||||
# Additional copyrights may follow
|
||||
#
|
||||
# $HEADER$
|
||||
#
|
||||
|
||||
|
||||
|
||||
# The source code is compiled as C++ for dynamic build
|
||||
# and compiled as C for static build
|
||||
|
||||
PROJECT (OMPI)
|
||||
|
||||
# Recuresive search sub directories excluding mca, mpi and tools.
|
||||
# Add sources in different source groups.
|
||||
INCLUDE(list_subdirs)
|
||||
CHECK_SUBDIRS("${PROJECT_SOURCE_DIR}" OMPI_SUBDIRS)
|
||||
|
||||
SET(OMPI_EXCLUDE_SUBDIRS contrib debuggers mca mpi mpiext tools)
|
||||
|
||||
FOREACH(OMPI_SUBDIR ${OMPI_SUBDIRS})
|
||||
|
||||
LIST(FIND OMPI_EXCLUDE_SUBDIRS ${OMPI_SUBDIR} OMPI_EXCLUDE_SUBDIR)
|
||||
|
||||
IF(${OMPI_EXCLUDE_SUBDIR} EQUAL -1)
|
||||
|
||||
FILE(GLOB_RECURSE OMPI_${OMPI_SUBDIR}_FILES
|
||||
"${OMPI_SUBDIR}/*.h" "${OMPI_SUBDIR}/*.c" "${OMPI_SUBDIR}/*.cc" "${OMPI_SUBDIR}/*.cpp")
|
||||
|
||||
SET (OMPI_SOURCE_FILES
|
||||
${OMPI_SOURCE_FILES}
|
||||
${OMPI_${OMPI_SUBDIR}_FILES}
|
||||
)
|
||||
|
||||
SOURCE_GROUP("${OMPI_SUBDIR}" FILES ${OMPI_${OMPI_SUBDIR}_FILES})
|
||||
|
||||
ENDIF(${OMPI_EXCLUDE_SUBDIR} EQUAL -1)
|
||||
|
||||
ENDFOREACH(OMPI_SUBDIR ${OMPI_SUBDIRS})
|
||||
|
||||
|
||||
# Add MPI C files
|
||||
FILE(GLOB OMPI_MPI_C_FILES "mpi/c/*.h" "mpi/c/*.c")
|
||||
|
||||
# Remove all MPI_File related files if the option is not selected
|
||||
IF (NOT OMPI_PROVIDE_MPI_FILE_INTERFACE)
|
||||
MESSAGE( STATUS "Skipping the MPI I/O interface")
|
||||
SET( TMP_SRC "" )
|
||||
FOREACH ( FILENAME ${OMPI_MPI_C_FILES})
|
||||
GET_FILENAME_COMPONENT(relname ${FILENAME} NAME)
|
||||
IF (NOT ${relname} MATCHES "file.*[ch]$")
|
||||
IF (NOT ${relname} STREQUAL "register_datarep.c")
|
||||
LIST(APPEND TMP_SRC ${FILENAME})
|
||||
ENDIF (NOT ${relname} STREQUAL "register_datarep.c")
|
||||
ENDIF(NOT ${relname} MATCHES "file.*[ch]$")
|
||||
ENDFOREACH(FILENAME)
|
||||
SET( OMPI_MPI_C_FILES ${TMP_SRC})
|
||||
ENDIF(NOT OMPI_PROVIDE_MPI_FILE_INTERFACE)
|
||||
|
||||
SET (OMPI_SOURCE_FILES ${OMPI_SOURCE_FILES} ${OMPI_MPI_C_FILES})
|
||||
SOURCE_GROUP(mpi "")
|
||||
SOURCE_GROUP(mpi\\c FILES ${OMPI_MPI_C_FILES})
|
||||
|
||||
IF(OMPI_ENABLE_MPI_PROFILING)
|
||||
# As weak symbols are not supported by MS compiler,
|
||||
# we have to compile the C source files again for profiler,
|
||||
# i.e. add the pre-processor "OMPI_PROFILING_DEFINES" explicitly.
|
||||
|
||||
# first get the file names.
|
||||
# FILE(GLOB OMPI_PROFILE_NAMES "mpi/c/*.c" )
|
||||
# then copy them to the build directory with a prefix.
|
||||
FOREACH(FILE_NAME ${OMPI_MPI_C_FILES})
|
||||
GET_FILENAME_COMPONENT(relname ${FILE_NAME} NAME)
|
||||
IF(NOT ${relname} STREQUAL "attr_fn.c")
|
||||
CONFIGURE_FILE(${FILE_NAME}
|
||||
${PROJECT_BINARY_DIR}/mpi/c/profile/p${relname} [COPYONLY])
|
||||
SET(OMPI_C_PROFILE_FILES ${OMPI_C_PROFILE_FILES} ${PROJECT_BINARY_DIR}/mpi/c/profile/p${relname})
|
||||
ENDIF(NOT ${relname} STREQUAL "attr_fn.c")
|
||||
ENDFOREACH(FILE_NAME ${OMPI_MPI_C_FILES})
|
||||
|
||||
# FILE(GLOB_RECURSE OMPI_C_PROFILE_FILES "${PROJECT_BINARY_DIR}/mpi/c/profile/*.c" )
|
||||
|
||||
SET_SOURCE_FILES_PROPERTIES(${OMPI_C_PROFILE_FILES}
|
||||
PROPERTIES COMPILE_DEFINITIONS OMPI_PROFILING_DEFINES)
|
||||
SET(OMPI_SOURCE_FILES ${OMPI_SOURCE_FILES} ${OMPI_C_PROFILE_FILES})
|
||||
SOURCE_GROUP(mpi\\c\\profile FILES ${OMPI_C_PROFILE_FILES})
|
||||
ELSE(OMPI_ENABLE_MPI_PROFILING)
|
||||
MESSAGE( STATUS "Skipping the MPI profiling interface")
|
||||
ENDIF(OMPI_ENABLE_MPI_PROFILING)
|
||||
|
||||
|
||||
IF(OMPI_WANT_FORTRAN_BINDINGS)
|
||||
# A handful of files in mpi/fortran/base must be included in libmpi, in order to build the
|
||||
# Fortran 77 glue into libmpi
|
||||
FILE(GLOB OMPI_FORTRAN_BASE_FILES "mpi/fortran/base/*.c")
|
||||
SET_SOURCE_FILES_PROPERTIES(${OMPI_FORTRAN_BASE_FILES}
|
||||
PROPERTIES COMPILE_FLAGS "${OMPI_C_DEF_PRE}OMPI_COMPILING_FORTRAN_WRAPPERS=1 ${OMPI_C_DEF_PRE}OMPI_PROFILE_LAYER=0")
|
||||
SET(OMPI_SOURCE_FILES ${OMPI_SOURCE_FILES} ${OMPI_FORTRAN_BASE_FILES})
|
||||
SOURCE_GROUP(mpi\\fortran\\base FILES ${OMPI_FORTRAN_BASE_FILES})
|
||||
ENDIF(OMPI_WANT_FORTRAN_BINDINGS)
|
||||
|
||||
#configure ompi extension components
|
||||
INCLUDE (ompi_ext_config)
|
||||
SET (OMPI_SOURCE_FILES ${OMPI_SOURCE_FILES} ${OMPI_EXT_FILES})
|
||||
|
||||
INCLUDE (check_mca_subdirs)
|
||||
SET (OMPI_SOURCE_FILES ${OMPI_SOURCE_FILES} ${MCA_FILES})
|
||||
|
||||
ADD_LIBRARY (libmpi ${OMPI_SOURCE_FILES})
|
||||
ADD_DEPENDENCIES(libmpi libopen-rte libopen-pal)
|
||||
|
||||
SET_TARGET_PROPERTIES(libmpi PROPERTIES
|
||||
COMPILE_DEFINITIONS "OMPI_MPIHANDLES_DLL_PREFIX=libompi_dbg_mpihandles;OMPI_MSGQ_DLL_PREFIX=libompi_dbg_msgq;OMPI_BUILDING;OMPI_BUILDING_CXX_BINDINGS_LIBRARY")
|
||||
|
||||
# Set compile flags for this target
|
||||
IF (BUILD_SHARED_LIBS)
|
||||
SET_TARGET_PROPERTIES(libmpi PROPERTIES
|
||||
COMPILE_DEFINITIONS "_USRDLL;HAVE_CONFIG_H;OMPI_EXPORTS;OPAL_IMPORTS;ORTE_IMPORTS"
|
||||
COMPILE_FLAGS "${OMPI_CXX_LAN_FLAG}" PREFIX "" IMPORT_PREFIX "")
|
||||
|
||||
IF(WINDOWS_MINGW)
|
||||
TARGET_LINK_LIBRARIES (libmpi ${OpenMPI_BINARY_DIR}/event${CMAKE_DEBUG_POSTFIX}.lib
|
||||
${OpenMPI_BINARY_DIR}/hwloc${CMAKE_DEBUG_POSTFIX}.lib
|
||||
libopen-rte Ws2_32.lib shlwapi.lib ${EXTRA_LINK_LIBRARIES})
|
||||
ELSEIF(WINDOWS_VS)
|
||||
TARGET_LINK_LIBRARIES (libmpi ${OpenMPI_BINARY_DIR}/${CMAKE_CFG_INTDIR}/event${CMAKE_DEBUG_POSTFIX}.lib
|
||||
${OpenMPI_BINARY_DIR}/${CMAKE_CFG_INTDIR}/hwloc${CMAKE_DEBUG_POSTFIX}.lib
|
||||
libopen-rte Ws2_32.lib shlwapi.lib ${EXTRA_LINK_LIBRARIES})
|
||||
ENDIF(WINDOWS_MINGW)
|
||||
|
||||
ELSE (BUILD_SHARED_LIBS)
|
||||
SET_TARGET_PROPERTIES(libmpi PROPERTIES COMPILE_DEFINITIONS "${OMPI_C_DEF_PRE}_LIB")
|
||||
ENDIF(BUILD_SHARED_LIBS)
|
||||
|
||||
# generate ompi_config.h
|
||||
CONFIGURE_FILE(${OpenMPI_SOURCE_DIR}/ompi/include/ompi_config.h.in ${OpenMPI_BINARY_DIR}/ompi/include/ompi_config.h)
|
||||
|
||||
# generate version.h
|
||||
CONFIGURE_FILE(${OpenMPI_SOURCE_DIR}/ompi/include/ompi/version.h.in ${OpenMPI_BINARY_DIR}/ompi/include/ompi/version.h)
|
||||
|
||||
|
||||
ADD_SUBDIRECTORY(mpi)
|
||||
ADD_SUBDIRECTORY(tools)
|
||||
|
||||
|
||||
# Install libraries headers, and shared files
|
||||
INSTALL(TARGETS libmpi
|
||||
RUNTIME DESTINATION bin
|
||||
LIBRARY DESTINATION lib
|
||||
ARCHIVE DESTINATION lib)
|
||||
INSTALL(FILES ${PROJECT_BINARY_DIR}/include/user/mpi.h ${PROJECT_SOURCE_DIR}/include/mpi_portable_platform.h
|
||||
DESTINATION include)
|
||||
|
||||
INSTALL(FILES errhandler/help-mpi-errors.txt
|
||||
DESTINATION share/openmpi)
|
||||
|
||||
IF (OMPI_DEBUG_BUILD AND WINDOWS_VS)
|
||||
INSTALL(FILES ${OpenMPI_BINARY_DIR}/Debug/libmpi${CMAKE_DEBUG_POSTFIX}.pdb
|
||||
DESTINATION bin)
|
||||
ENDIF (OMPI_DEBUG_BUILD AND WINDOWS_VS)
|
||||
|
||||
IF(OMPI_WANT_FORTRAN_BINDINGS)
|
||||
INSTALL(FILES ${PROJECT_BINARY_DIR}/include/mpif.h
|
||||
${PROJECT_BINARY_DIR}/include/mpif-config.h
|
||||
${PROJECT_BINARY_DIR}/include/mpif-common.h
|
||||
${PROJECT_SOURCE_DIR}/include/mpif-all-common.h
|
||||
${PROJECT_SOURCE_DIR}/include/mpif-mpi-io.h
|
||||
DESTINATION include)
|
||||
ENDIF(OMPI_WANT_FORTRAN_BINDINGS)
|
||||
|
||||
INSTALL(FILES ${PROJECT_SOURCE_DIR}/runtime/help-mpi-runtime.txt ${PROJECT_SOURCE_DIR}/mpi/help-mpi-api.txt
|
||||
DESTINATION share/openmpi)
|
||||
INSTALL(DIRECTORY mpi/cxx/ DESTINATION include/openmpi/ompi/mpi/cxx
|
||||
FILES_MATCHING PATTERN "*.h" PATTERN ".svn" EXCLUDE)
|
||||
|
@ -19,8 +19,6 @@
|
||||
# $HEADER$
|
||||
#
|
||||
|
||||
EXTRA_DIST = CMakeLists.txt
|
||||
|
||||
# We always have C bindings, but do we have profiling?
|
||||
|
||||
if BUILD_MPI_BINDINGS_LAYER
|
||||
|
@ -79,35 +79,6 @@ typedef struct {
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(__WINDOWS__)
|
||||
|
||||
# if defined(_USRDLL) /* building shared libraries (.DLL) */
|
||||
# if defined(OMPI_EXPORTS)
|
||||
# define OMPI_DECLSPEC __declspec(dllexport)
|
||||
# define OMPI_MODULE_DECLSPEC
|
||||
# else
|
||||
# if defined(OMPI_IMPORTS)
|
||||
# define OMPI_DECLSPEC __declspec(dllimport)
|
||||
# else
|
||||
# define OMPI_DECLSPEC
|
||||
# endif /*defined(OMPI_IMPORTS)*/
|
||||
# if defined(OMPI_MODULE_EXPORTS)
|
||||
# define OMPI_MODULE_DECLSPEC __declspec(dllexport)
|
||||
# else
|
||||
# define OMPI_MODULE_DECLSPEC __declspec(dllimport)
|
||||
# endif /* defined(OMPI_MODULE_EXPORTS) */
|
||||
# endif /* defined(OMPI_EXPORTS) */
|
||||
# else /* building static library */
|
||||
# if defined(OMPI_IMPORTS)
|
||||
# define OMPI_DECLSPEC __declspec(dllimport)
|
||||
# else
|
||||
# define OMPI_DECLSPEC
|
||||
# endif /* defined(OMPI_IMPORTS) */
|
||||
# define OMPI_MODULE_DECLSPEC
|
||||
# endif /* defined(_USRDLL) */
|
||||
|
||||
#else
|
||||
|
||||
# if OPAL_C_HAVE_VISIBILITY
|
||||
# ifndef OMPI_DECLSPEC
|
||||
# define OMPI_DECLSPEC __opal_attribute_visibility__("default")
|
||||
@ -123,7 +94,6 @@ typedef struct {
|
||||
# define OMPI_MODULE_DECLSPEC
|
||||
# endif
|
||||
# endif
|
||||
#endif /* defined(__WINDOWS__) */
|
||||
|
||||
/* Convenience */
|
||||
#if OMPI_BUILD_FORTRAN_MPIFH_BINDINGS || OMPI_BUILD_FORTRAN_USEMPI_BINDINGS || OMPI_BUILD_FORTRAN_USEMPIF08_BINDINGS
|
||||
|
@ -52,10 +52,6 @@ typedef struct bcol_basesmuma_smcm_mmap_t {
|
||||
size_t map_size;
|
||||
/* Filename */
|
||||
char map_path[OPAL_PATH_MAX];
|
||||
#if defined(__WINDOWS__)
|
||||
/* Handle to the object */
|
||||
HANDLE hMappedObject;
|
||||
#endif /* defined(__WINDOWS__) */
|
||||
} bcol_basesmuma_smcm_mmap_t;
|
||||
|
||||
OBJ_CLASS_DECLARATION(bcol_basesmuma_smcm_mmap_t);
|
||||
|
@ -27,8 +27,6 @@ BEGIN_C_DECLS
|
||||
#ifdef HAVE_SCHED_YIELD
|
||||
# include <sched.h>
|
||||
# define SPIN sched_yield()
|
||||
#elif defined(__WINDOWS__)
|
||||
# define SPIN SwitchToThread()
|
||||
#else /* no switch available */
|
||||
# define SPIN
|
||||
#endif
|
||||
|
@ -12,7 +12,7 @@
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2007-2013 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2006-2009 Mellanox Technologies. All rights reserved.
|
||||
* Copyright (c) 2006-2012 Los Alamos National Security, LLC. All rights
|
||||
* Copyright (c) 2006-2013 Los Alamos National Security, LLC. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2006-2007 Voltaire All rights reserved.
|
||||
* Copyright (c) 2008-2012 Oracle and/or its affiliates. All rights reserved.
|
||||
@ -134,9 +134,7 @@ void mca_btl_openib_show_init_error(const char *file, int line,
|
||||
{
|
||||
if (ENOMEM == errno) {
|
||||
int ret;
|
||||
#ifndef __WINDOWS__
|
||||
struct rlimit limit;
|
||||
#endif
|
||||
char *str_limit = NULL;
|
||||
|
||||
#if HAVE_DECL_RLIMIT_MEMLOCK
|
||||
@ -144,7 +142,6 @@ void mca_btl_openib_show_init_error(const char *file, int line,
|
||||
#else
|
||||
ret = -1;
|
||||
#endif
|
||||
#ifndef __WINDOWS__
|
||||
if (0 != ret) {
|
||||
asprintf(&str_limit, "Unknown");
|
||||
} else if (limit.rlim_cur == RLIM_INFINITY) {
|
||||
@ -152,7 +149,6 @@ void mca_btl_openib_show_init_error(const char *file, int line,
|
||||
} else {
|
||||
asprintf(&str_limit, "%ld", (long)limit.rlim_cur);
|
||||
}
|
||||
#endif
|
||||
|
||||
opal_show_help("help-mpi-btl-openib.txt", "init-fail-no-mem",
|
||||
true, ompi_process_info.nodename,
|
||||
|
@ -12,7 +12,7 @@
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2006-2013 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2006-2009 Mellanox Technologies. All rights reserved.
|
||||
* Copyright (c) 2006-2012 Los Alamos National Security, LLC. All rights
|
||||
* Copyright (c) 2006-2013 Los Alamos National Security, LLC. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2006-2007 Voltaire All rights reserved.
|
||||
* Copyright (c) 2009-2012 Oracle and/or its affiliates. All rights reserved.
|
||||
@ -252,9 +252,7 @@ static int btl_openib_component_close(void)
|
||||
#endif
|
||||
|
||||
ompi_btl_openib_connect_base_finalize();
|
||||
#ifndef __WINDOWS__
|
||||
ompi_btl_openib_fd_finalize();
|
||||
#endif
|
||||
ompi_btl_openib_ini_finalize();
|
||||
if (NULL != mca_btl_openib_component.receive_queues) {
|
||||
free(mca_btl_openib_component.receive_queues);
|
||||
@ -2478,24 +2476,20 @@ btl_openib_component_init(int *num_btl_modules,
|
||||
goto no_btls;
|
||||
}
|
||||
|
||||
#ifndef __WINDOWS__
|
||||
seedv[0] = OMPI_PROC_MY_NAME->vpid;
|
||||
seedv[1] = opal_timer_base_get_cycles();
|
||||
seedv[2] = opal_timer_base_get_cycles();
|
||||
seed48(seedv);
|
||||
#endif
|
||||
|
||||
/* Read in INI files with device-specific parameters */
|
||||
if (OMPI_SUCCESS != (ret = ompi_btl_openib_ini_init())) {
|
||||
goto no_btls;
|
||||
}
|
||||
|
||||
#ifndef __WINDOWS__
|
||||
/* Initialize FD listening */
|
||||
if (OMPI_SUCCESS != ompi_btl_openib_fd_init()) {
|
||||
goto no_btls;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Init CPC components */
|
||||
if (OMPI_SUCCESS != (ret = ompi_btl_openib_connect_base_init())) {
|
||||
@ -2916,10 +2910,8 @@ btl_openib_component_init(int *num_btl_modules,
|
||||
/* If we fail early enough in the setup, we just modex around that
|
||||
there are no openib BTL's in this process and return NULL. */
|
||||
|
||||
#ifndef __WINDOWS__
|
||||
/* Be sure to shut down the fd listener */
|
||||
ompi_btl_openib_fd_finalize();
|
||||
#endif
|
||||
|
||||
mca_btl_openib_component.ib_num_btls = 0;
|
||||
btl_openib_modex_send();
|
||||
|
@ -11,7 +11,7 @@
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2006-2013 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2008 Mellanox Technologies. All rights reserved.
|
||||
* Copyright (c) 2012 Los Alamos National Security, LLC. All rights
|
||||
* Copyright (c) 2012-2013 Los Alamos National Security, LLC. All rights
|
||||
* reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
@ -107,14 +107,7 @@ int ompi_btl_openib_ini_init(void)
|
||||
{
|
||||
int ret = OMPI_ERR_NOT_FOUND;
|
||||
char *colon;
|
||||
|
||||
#ifndef __WINDOWS__
|
||||
char separator = ':';
|
||||
#else
|
||||
/* ':' is part of the path on Windows,
|
||||
so use ';' instead. */
|
||||
char separator = ';';
|
||||
#endif
|
||||
|
||||
OBJ_CONSTRUCT(&devices, opal_list_t);
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
* Copyright (c) 2008 Mellanox Technologies. All rights reserved.
|
||||
* Copyright (c) 2009 Sandia National Laboratories. All rights reserved.
|
||||
* Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2012 Los Alamos National Security, LLC. All rights
|
||||
* Copyright (c) 2012-2013 Los Alamos National Security, LLC. All rights
|
||||
* reserved.
|
||||
*
|
||||
* $COPYRIGHT$
|
||||
@ -1051,10 +1051,8 @@ static int rdmacm_endpoint_finalize(struct mca_btl_base_endpoint_t *endpoint)
|
||||
OPAL_OUTPUT((-1, "MAIN Main thread calling disconnect on ID %p",
|
||||
(void*) ((id_context_t*) item2)->id));
|
||||
++num_to_wait_for;
|
||||
#ifndef __WINDOWS__
|
||||
ompi_btl_openib_fd_run_in_service(call_disconnect_callback,
|
||||
item2);
|
||||
#endif
|
||||
}
|
||||
/* remove_item returns the item before the item removed,
|
||||
meaning that the for list is still safe */
|
||||
@ -1070,10 +1068,8 @@ static int rdmacm_endpoint_finalize(struct mca_btl_base_endpoint_t *endpoint)
|
||||
|
||||
/* Now wait for all the disconnect callbacks to occur */
|
||||
while (num_to_wait_for != disconnect_callbacks) {
|
||||
#ifndef __WINDOWS__
|
||||
ompi_btl_openib_fd_main_thread_drain();
|
||||
sched_yield();
|
||||
#endif
|
||||
}
|
||||
|
||||
OPAL_OUTPUT((-1, "MAIN Endpoint finished finalizing"));
|
||||
@ -1968,10 +1964,8 @@ static int rdmacm_component_finalize(void)
|
||||
}
|
||||
|
||||
if (NULL != event_channel) {
|
||||
#ifndef __WINDOWS__
|
||||
rc = ompi_btl_openib_fd_unmonitor(event_channel->fd,
|
||||
rdmacm_unmonitor, (void*) &barrier);
|
||||
#endif
|
||||
if (OMPI_SUCCESS != rc) {
|
||||
BTL_ERROR(("Error disabling fd monitor"));
|
||||
}
|
||||
@ -1979,9 +1973,7 @@ static int rdmacm_component_finalize(void)
|
||||
/* Wait for the service thread to stop monitoring the fd */
|
||||
OPAL_OUTPUT((-1, "MAIN rdmacm_component_finalize: waiting for thread to finish"));
|
||||
while (0 == barrier) {
|
||||
#ifndef __WINDOWS__
|
||||
sched_yield();
|
||||
#endif
|
||||
}
|
||||
OPAL_OUTPUT((-1, "MAIN rdmacm_component_finalize: thread finished"));
|
||||
}
|
||||
@ -2041,11 +2033,9 @@ static int rdmacm_component_init(void)
|
||||
return OMPI_ERR_UNREACH;
|
||||
}
|
||||
|
||||
#ifndef __WINDOWS__
|
||||
/* Start monitoring the fd associated with the cm_device */
|
||||
ompi_btl_openib_fd_monitor(event_channel->fd, OPAL_EV_READ,
|
||||
rdmacm_event_dispatch, NULL);
|
||||
#endif
|
||||
|
||||
rdmacm_component_initialized = true;
|
||||
return OMPI_SUCCESS;
|
||||
|
@ -3,7 +3,7 @@
|
||||
* Copyright (c) 2007-2012 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2008-2009 Mellanox Technologies. All rights reserved.
|
||||
* Copyright (c) 2009 IBM Corporation. All rights reserved.
|
||||
* Copyright (c) 2011 Los Alamos National Security, LLC. All
|
||||
* Copyright (c) 2011-2013 Los Alamos National Security, LLC. All
|
||||
* rights reserved.
|
||||
*
|
||||
* $COPYRIGHT$
|
||||
@ -706,9 +706,7 @@ static int udcm_module_finalize(mca_btl_openib_module_t *btl,
|
||||
ompi_btl_openib_fd_unmonitor(m->cm_channel->fd, udcm_unmonitor, (void *)&barrier);
|
||||
|
||||
while (0 == barrier) {
|
||||
#ifndef __WINDOWS__
|
||||
sched_yield();
|
||||
#endif
|
||||
}
|
||||
|
||||
/* destroy the listen queue pair. this will cause ibv_get_cq_event to
|
||||
|
@ -115,11 +115,7 @@ struct mca_btl_sctp_module_t {
|
||||
typedef struct mca_btl_sctp_module_t mca_btl_sctp_module_t;
|
||||
extern mca_btl_sctp_module_t mca_btl_sctp_module;
|
||||
|
||||
#if defined(__WINDOWS__)
|
||||
#define CLOSE_THE_SOCKET(socket) closesocket(socket)
|
||||
#else
|
||||
#define CLOSE_THE_SOCKET(socket) close(socket)
|
||||
#endif /* defined(__WINDOWS__) */
|
||||
|
||||
/**
|
||||
* SCTP component initialization.
|
||||
|
@ -17,10 +17,6 @@
|
||||
*
|
||||
* $HEADER$
|
||||
*
|
||||
* In windows, many of the socket functions return an EWOULDBLOCK
|
||||
* instead of \ things like EAGAIN, EINPROGRESS, etc. It has been
|
||||
* verified that this will \ not conflict with other error codes that
|
||||
* are returned by these functions \ under UNIX/Linux environments
|
||||
*/
|
||||
|
||||
#include "ompi_config.h"
|
||||
@ -232,14 +228,6 @@ static int mca_btl_sctp_component_register(void)
|
||||
|
||||
static int mca_btl_sctp_component_open(void)
|
||||
{
|
||||
#ifdef __WINDOWS__
|
||||
WSADATA win_sock_data;
|
||||
if (WSAStartup(MAKEWORD(2,2), &win_sock_data) != 0) {
|
||||
BTL_ERROR(("failed to initialise windows sockets:%d", WSAGetLastError()));
|
||||
return OMPI_ERROR;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* initialize state */
|
||||
mca_btl_sctp_component.sctp_listen_sd = -1;
|
||||
/* TODO different sd for ipv6 */
|
||||
@ -347,10 +335,6 @@ int mca_btl_sctp_component_close(void)
|
||||
OBJ_DESTRUCT(&mca_btl_sctp_component.sctp_frag_user);
|
||||
OBJ_DESTRUCT(&mca_btl_sctp_component.sctp_lock);
|
||||
|
||||
#ifdef __WINDOWS__
|
||||
WSACleanup();
|
||||
#endif
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -122,11 +122,7 @@ struct mca_btl_tcp_module_t {
|
||||
typedef struct mca_btl_tcp_module_t mca_btl_tcp_module_t;
|
||||
extern mca_btl_tcp_module_t mca_btl_tcp_module;
|
||||
|
||||
#if defined(__WINDOWS__)
|
||||
#define CLOSE_THE_SOCKET(socket) closesocket(socket)
|
||||
#else
|
||||
#define CLOSE_THE_SOCKET(socket) close(socket)
|
||||
#endif /* defined(__WINDOWS__) */
|
||||
|
||||
/**
|
||||
* TCP component initialization.
|
||||
|
@ -12,7 +12,7 @@
|
||||
* Copyright (c) 2007-2012 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2008 Sun Microsystems, Inc. All rights reserved.
|
||||
* Copyright (c) 2009 Oak Ridge National Laboratory
|
||||
* Copyright (c) 2012 Los Alamos National Security, LLC. All rights
|
||||
* Copyright (c) 2012-2013 Los Alamos National Security, LLC. All rights
|
||||
* reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
@ -189,11 +189,7 @@ static int mca_btl_tcp_component_register(void)
|
||||
mca_btl_tcp_param_register_string("if_include", "Comma-delimited list of devices and/or CIDR notation of networks to use for MPI communication (e.g., \"eth0,192.168.0.0/16\"). Mutually exclusive with btl_tcp_if_exclude.", "");
|
||||
mca_btl_tcp_component.tcp_if_exclude =
|
||||
mca_btl_tcp_param_register_string("if_exclude", "Comma-delimited list of devices and/or CIDR notation of networks to NOT use for MPI communication -- all devices not matching these specifications will be used (e.g., \"eth0,192.168.0.0/16\"). If set to a non-default value, it is mutually exclusive with btl_tcp_if_include.",
|
||||
#ifndef __WINDOWS__
|
||||
"127.0.0.1/8,sppp"
|
||||
#else
|
||||
""
|
||||
#endif
|
||||
);
|
||||
|
||||
mca_btl_tcp_component.tcp_free_list_num =
|
||||
@ -329,14 +325,6 @@ static int mca_btl_tcp_component_register(void)
|
||||
|
||||
static int mca_btl_tcp_component_open(void)
|
||||
{
|
||||
#ifdef __WINDOWS__
|
||||
WSADATA win_sock_data;
|
||||
if( WSAStartup(MAKEWORD(2,2), &win_sock_data) != 0 ) {
|
||||
BTL_ERROR(("failed to initialise windows sockets:%d", WSAGetLastError()));
|
||||
return OMPI_ERROR;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* initialize state */
|
||||
mca_btl_tcp_component.tcp_listen_sd = -1;
|
||||
#if OPAL_WANT_IPV6
|
||||
@ -430,10 +418,6 @@ static int mca_btl_tcp_component_close(void)
|
||||
OBJ_DESTRUCT(&mca_btl_tcp_component.tcp_frag_user);
|
||||
OBJ_DESTRUCT(&mca_btl_tcp_component.tcp_lock);
|
||||
|
||||
#ifdef __WINDOWS__
|
||||
WSACleanup();
|
||||
#endif
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -52,12 +52,10 @@ static int reduce_no_order(void *sbuf, void* rbuf, int count,
|
||||
/*
|
||||
* Useful utility routine
|
||||
*/
|
||||
#if !defined(__WINDOWS__)
|
||||
static inline int min(int a, int b)
|
||||
{
|
||||
return (a < b) ? a : b;
|
||||
}
|
||||
#endif /* !defined(__WINDOWS__) */
|
||||
|
||||
/**
|
||||
* Shared memory reduction.
|
||||
|
@ -34,11 +34,7 @@
|
||||
* statements and the definition of an array of pointers to each
|
||||
* component's public mca_base_component_t struct.
|
||||
*/
|
||||
#ifdef __WINDOWS__
|
||||
const mca_base_component_t *mca_fbtl_base_static_components[] = {NULL};
|
||||
#else
|
||||
#include "ompi/mca/fbtl/base/static-components.h"
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Global variables; most of which are loaded by back-ends of MCA
|
||||
|
@ -34,11 +34,7 @@
|
||||
* statements and the definition of an array of pointers to each
|
||||
* component's public mca_base_component_t struct.
|
||||
*/
|
||||
#ifdef __WINDOWS__
|
||||
const mca_base_component_t *mca_fcoll_base_static_components[] = {NULL};
|
||||
#else
|
||||
#include "ompi/mca/fcoll/base/static-components.h"
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Global variables; most of which are loaded by back-ends of MCA
|
||||
|
@ -48,15 +48,9 @@ void mca_fs_base_get_parent_dir ( char *filename, char **dirnamep)
|
||||
int err;
|
||||
char *dir = NULL, *slash;
|
||||
struct stat statbuf;
|
||||
|
||||
|
||||
|
||||
err = lstat(filename, &statbuf);
|
||||
|
||||
/* no symlink on Windows */
|
||||
#ifdef __WINDOWS__
|
||||
dir = strdup(filename);
|
||||
#else
|
||||
if (err || (!S_ISLNK(statbuf.st_mode))) {
|
||||
/* no such file, or file is not a link; these are the "normal"
|
||||
* cases where we can just return the parent directory.
|
||||
@ -88,7 +82,6 @@ void mca_fs_base_get_parent_dir ( char *filename, char **dirnamep)
|
||||
free(linkbuf);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
slash = strrchr(dir, '/');
|
||||
if (!slash) strncpy(dir, ".", 2);
|
||||
|
@ -35,11 +35,7 @@
|
||||
* statements and the definition of an array of pointers to each
|
||||
* component's public mca_base_component_t struct.
|
||||
*/
|
||||
#ifdef __WINDOWS__
|
||||
const mca_base_component_t *mca_fs_base_static_components[] = {NULL};
|
||||
#else
|
||||
#include "ompi/mca/fs/base/static-components.h"
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Global variables; most of which are loaded by back-ends of MCA
|
||||
|
@ -108,9 +108,7 @@ void ompi_rte_wait_for_debugger(void)
|
||||
if (orte_standalone_operation) {
|
||||
/* spin until debugger attaches and releases us */
|
||||
while (MPIR_debug_gate == 0) {
|
||||
#if defined(__WINDOWS__)
|
||||
Sleep(100); /* milliseconds */
|
||||
#elif defined(HAVE_USLEEP)
|
||||
#if defined(HAVE_USLEEP)
|
||||
usleep(100000); /* microseconds */
|
||||
#else
|
||||
sleep(1); /* seconds */
|
||||
|
@ -25,8 +25,6 @@ BEGIN_C_DECLS
|
||||
#ifdef HAVE_SCHED_YIELD
|
||||
# include <sched.h>
|
||||
# define SPIN sched_yield()
|
||||
#elif defined(__WINDOWS__)
|
||||
# define SPIN SwitchToThread()
|
||||
#else /* no switch available */
|
||||
# define SPIN
|
||||
#endif
|
||||
|
@ -26,8 +26,6 @@ BEGIN_C_DECLS
|
||||
#ifdef HAVE_SCHED_YIELD
|
||||
# include <sched.h>
|
||||
# define SPIN sched_yield()
|
||||
#elif defined(__WINDOWS__)
|
||||
# define SPIN SwitchToThread()
|
||||
#else /* no switch available */
|
||||
# define SPIN
|
||||
#endif
|
||||
|
@ -28,8 +28,6 @@ BEGIN_C_DECLS
|
||||
#ifdef HAVE_SCHED_YIELD
|
||||
# include <sched.h>
|
||||
# define SPIN sched_yield()
|
||||
#elif defined(__WINDOWS__)
|
||||
# define SPIN SwitchToThread()
|
||||
#else /* no switch available */
|
||||
# define SPIN
|
||||
#endif
|
||||
|
@ -26,8 +26,6 @@ BEGIN_C_DECLS
|
||||
#ifdef HAVE_SCHED_YIELD
|
||||
# include <sched.h>
|
||||
# define SPIN sched_yield()
|
||||
#elif defined(__WINDOWS__)
|
||||
# define SPIN SwitchToThread()
|
||||
#else /* no switch available */
|
||||
# define SPIN
|
||||
#endif
|
||||
|
@ -35,11 +35,7 @@
|
||||
* statements and the definition of an array of pointers to each
|
||||
* component's public mca_base_component_t struct.
|
||||
*/
|
||||
#ifdef __WINDOWS__
|
||||
const mca_base_component_t *mca_sharedfp_base_static_components[] = {NULL};
|
||||
#else
|
||||
#include "ompi/mca/sharedfp/base/static-components.h"
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Global variables; most of which are loaded by back-ends of MCA
|
||||
|
@ -26,17 +26,6 @@
|
||||
|
||||
static int sb_mmap_file_open(const char *path)
|
||||
{
|
||||
#if defined(__WINDOWS__)
|
||||
sb.sb_fd = CreateFile(path, GENERIC_READ | GENERIC_WRITE, 0, NULL,
|
||||
CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
|
||||
if(INVALID_HANDLE_VALUE == sb.sb_fd)
|
||||
{
|
||||
V_OUTPUT_ERR("pml_v: vprotocol_pessimist: sender_based_init: open (%s): %s",
|
||||
path, GetLastError());
|
||||
return OPAL_ERR_FILE_OPEN_FAILURE;
|
||||
}
|
||||
return OPAL_SUCCESS;
|
||||
#else
|
||||
sb.sb_fd = open(path, O_CREAT | O_TRUNC | O_RDWR, 0600);
|
||||
if(-1 == sb.sb_fd)
|
||||
{
|
||||
@ -45,44 +34,18 @@ static int sb_mmap_file_open(const char *path)
|
||||
return OPAL_ERR_FILE_OPEN_FAILURE;
|
||||
}
|
||||
return OPAL_SUCCESS;
|
||||
#endif
|
||||
}
|
||||
|
||||
static void sb_mmap_file_close(void)
|
||||
{
|
||||
#if defined(__WINDOWS__)
|
||||
CloseHandle(sb.sb_fd);
|
||||
#else
|
||||
int ret = close(sb.sb_fd);
|
||||
if(-1 == ret)
|
||||
V_OUTPUT_ERR("pml_v: protocol_pessimist: sender_based_finalize: close (%d): %s",
|
||||
sb.sb_fd, strerror(errno));
|
||||
#endif
|
||||
}
|
||||
|
||||
static void sb_mmap_alloc(void)
|
||||
{
|
||||
#if defined(__WINDOWS__)
|
||||
sb.sb_map = CreateFileMapping(sb.sb_fd, NULL, PAGE_READWRITE, 0,
|
||||
(DWORD)sb.sb_offset + sb.sb_length, NULL);
|
||||
if(NULL == sb.sb_map)
|
||||
{
|
||||
V_OUTPUT_ERR("pml_v: vprotocol_pessimist: sender_based_alloc: CreateFileMapping : %s",
|
||||
GetLastError());
|
||||
ompi_mpi_abort(MPI_COMM_NULL, MPI_ERR_NO_SPACE, false);
|
||||
}
|
||||
|
||||
sb.sb_addr = (uintptr_t) MapViewOfFile(sb.sb_map, FILE_MAP_ALL_ACCESS, 0,
|
||||
sb.sb_offset, sb.sb_length);
|
||||
if(NULL == (void*)sb.sb_addr)
|
||||
{
|
||||
V_OUTPUT_ERR("pml_v: vprotocol_pessimist: sender_based_alloc: mmap: %s",
|
||||
GetLastError());
|
||||
CloseHandle(sb.sb_map);
|
||||
CloseHandle(sb.sb_fd);
|
||||
ompi_mpi_abort(MPI_COMM_NULL, MPI_ERR_NO_SPACE, false);
|
||||
}
|
||||
#else
|
||||
#ifndef MAP_NOCACHE
|
||||
# define MAP_NOCACHE 0
|
||||
#endif
|
||||
@ -104,20 +67,14 @@ static void sb_mmap_alloc(void)
|
||||
close(sb.sb_fd);
|
||||
ompi_mpi_abort(MPI_COMM_NULL, MPI_ERR_NO_SPACE, false);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
static void sb_mmap_free(void)
|
||||
{
|
||||
#if defined(__WINDOWS__)
|
||||
UnmapViewOfFile( (LPCVOID)sb.sb_addr);
|
||||
CloseHandle(sb.sb_map);
|
||||
#else
|
||||
int ret = munmap((void *) sb.sb_addr, sb.sb_length);
|
||||
if(-1 == ret)
|
||||
V_OUTPUT_ERR("pml_v: protocol_pessimsit: sender_based_finalize: munmap (%p): %s",
|
||||
(void *) sb.sb_addr, strerror(errno));
|
||||
#endif
|
||||
}
|
||||
|
||||
int vprotocol_pessimist_sender_based_init(const char *mmapfile, size_t size)
|
||||
|
@ -29,14 +29,7 @@ typedef struct vprotocol_pessimist_sender_based_t
|
||||
#ifdef SB_USE_CONVERTOR_METHOD
|
||||
uintptr_t sb_conv_to_pessimist_offset; /* end of request from req_conv */
|
||||
#endif
|
||||
|
||||
#if defined __WINDOWS__
|
||||
HANDLE sb_fd; /* file handle of mapped file */
|
||||
HANDLE sb_map; /* view handle of mapped file */
|
||||
#else
|
||||
int sb_fd; /* file descriptor of mapped file */
|
||||
#endif
|
||||
|
||||
int sb_fd; /* file descriptor of mapped file */
|
||||
off_t sb_offset; /* offset in mmaped file */
|
||||
uintptr_t sb_addr; /* base address of mmaped segment */
|
||||
size_t sb_length; /* length of mmaped segment */
|
||||
|
@ -1,20 +0,0 @@
|
||||
# Copyright (c) 2007-2012 High Performance Computing Center Stuttgart,
|
||||
# University of Stuttgart. All rights reserved.
|
||||
# $COPYRIGHT$
|
||||
#
|
||||
# Additional copyrights may follow
|
||||
#
|
||||
# $HEADER$
|
||||
#
|
||||
|
||||
IF(OMPI_BUILD_CXX_BINDINGS)
|
||||
ADD_SUBDIRECTORY(cxx)
|
||||
ELSE(OMPI_BUILD_CXX_BINDINGS)
|
||||
MESSAGE(STATUS "Skipping MPI C++ interface")
|
||||
ENDIF(OMPI_BUILD_CXX_BINDINGS)
|
||||
|
||||
IF(OMPI_WANT_FORTRAN_BINDINGS)
|
||||
ADD_SUBDIRECTORY(fortran/mpif-h)
|
||||
ELSE(OMPI_WANT_FORTRAN_BINDINGS)
|
||||
MESSAGE(STATUS "Skipping MPI FORTRAN interface")
|
||||
ENDIF(OMPI_WANT_FORTRAN_BINDINGS)
|
@ -17,8 +17,7 @@
|
||||
# $HEADER$
|
||||
#
|
||||
|
||||
EXTRA_DIST += \
|
||||
mpi/CMakeLists.txt \
|
||||
EXTRA_DIST = \
|
||||
mpi/fortran/configure-fortran-output-bottom.h
|
||||
|
||||
dist_pkgdata_DATA += mpi/help-mpi-api.txt
|
||||
|
@ -43,14 +43,7 @@ double MPI_Wtick(void)
|
||||
OPAL_CR_NOOP_PROGRESS();
|
||||
|
||||
#if OPAL_TIMER_USEC_NATIVE
|
||||
/* We may or may not have native usec precision on Windows, so put
|
||||
this #if before the #ifdef checking for Windows. */
|
||||
return 0.000001;
|
||||
#elif defined(__WINDOWS__)
|