|
|
|||
File indexing completed on 2025-12-16 09:56:18
0001 // Copyright (C) 2006 Douglas Gregor <doug.gregor -at- gmail.com> 0002 0003 // Use, modification and distribution is subject to the Boost Software 0004 // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 0005 // http://www.boost.org/LICENSE_1_0.txt) 0006 0007 /** @file config.hpp 0008 * 0009 * This header provides MPI configuration details that expose the 0010 * capabilities of the underlying MPI implementation, and provides 0011 * auto-linking support on Windows. 0012 */ 0013 #ifndef BOOST_MPI_CONFIG_HPP 0014 #define BOOST_MPI_CONFIG_HPP 0015 0016 #if !defined(MPICH_IGNORE_CXX_SEEK) 0017 /* Force MPICH not to define SEEK_SET, SEEK_CUR, and SEEK_END, which 0018 conflict with the versions in <stdio.h> and <cstdio>. */ 0019 # define MPICH_IGNORE_CXX_SEEK 1 0020 #endif 0021 0022 #if !defined(OMPI_SKIP_MPICXX) 0023 /* We do not want to link in the OpenMPI CXX stuff */ 0024 # define OMPI_SKIP_MPICXX 0025 #endif 0026 0027 #include <mpi.h> 0028 #include <boost/config.hpp> 0029 0030 /** @brief Comment this macro is you are running in an heterogeneous environment. 0031 * 0032 * When this flag is enabled, we assume some simple, POD-like, type can be 0033 * transmitted without paying the cost of portable serialization. 0034 * 0035 * Comment this if your platform is not homogeneous and that portable 0036 * serialization/deserialization must be performed. 0037 * 0038 * It you do so, check that your MPI implementation supports thats kind of environment. 0039 */ 0040 #define BOOST_MPI_HOMOGENEOUS 0041 0042 #if defined MPI_VERSION 0043 /** @brief Major version of the underlying MPI implementation supproted standard. 0044 * 0045 * If, for some reason, MPI_VERSION is not supported, you should probably set that 0046 * according to your MPI documentation 0047 */ 0048 # define BOOST_MPI_VERSION MPI_VERSION 0049 #else 0050 // assume a safe default 0051 # define BOOST_MPI_VERSION 2 0052 #endif 0053 0054 #if defined MPI_SUBVERSION 0055 /** @brief Major version of the underlying MPI implementation supported standard. 0056 * 0057 * If, for some reason, MPI_SUBVERSION is not supported, you should probably set that 0058 * according to your MPI documentation 0059 */ 0060 # define BOOST_MPI_SUBVERSION MPI_SUBVERSION 0061 #else 0062 // assume a safe default 0063 # define BOOST_MPI_SUBVERSION 2 0064 #endif 0065 0066 // If this is an MPI-2 implementation, define configuration macros for 0067 // the features we are interested in. 0068 #if BOOST_MPI_VERSION >= 2 0069 /** @brief Determine if the MPI implementation has support for memory 0070 * allocation. 0071 * 0072 * This macro will be defined when the underlying MPI implementation 0073 * has support for the MPI-2 memory allocation routines @c 0074 * MPI_Alloc_mem and @c MPI_Free_mem. When defined, the @c allocator 0075 * class template will provide Standard Library-compliant access to 0076 * these memory-allocation routines. 0077 */ 0078 # define BOOST_MPI_HAS_MEMORY_ALLOCATION 0079 0080 /** @brief Determine if the MPI implementation has supports initialization 0081 * without command-line arguments. 0082 * 0083 * This macro will be defined when the underlying implementation 0084 * supports initialization of MPI without passing along command-line 0085 * arguments, e.g., @c MPI_Init(NULL, NULL). When defined, the @c 0086 * environment class will provide a default constructor. This macro is 0087 * always defined for MPI-2 implementations. */ 0088 # define BOOST_MPI_HAS_NOARG_INITIALIZATION 0089 #else 0090 // If this is an MPI-1.x implementation, no arg initialization for 0091 // mpi environment could still be available, but not mandatory. 0092 // Undef this if no arg init is available: 0093 //# define BOOST_MPI_HAS_NOARG_INITIALIZATION 0094 #endif 0095 0096 #if defined(MPIAPI) 0097 # define BOOST_MPI_CALLING_CONVENTION MPIAPI 0098 #else 0099 /** @brief Specifies the calling convention that will be used for callbacks 0100 * from the underlying C MPI. 0101 * 0102 * This is a Windows-specific macro, which will be used internally to state 0103 * the calling convention of any function that is to be used as a callback 0104 * from MPI. For example, the internally-defined functions that are used in 0105 * a call to @c MPI_Op_create. This macro is likely only to be useful to 0106 * users that wish to bypass Boost.MPI, registering their own callbacks in 0107 * certain cases, e.g., through @c MPI_Op_create. 0108 */ 0109 # define BOOST_MPI_CALLING_CONVENTION 0110 #endif 0111 0112 /** @brief Indicates that MPI_Bcast supports MPI_BOTTOM. 0113 * 0114 * Some implementations have a broken MPI_Bcast wrt to MPI_BOTTOM. 0115 * BullX MPI and LAM seems to be among them, at least for some versions. 0116 * The `broacast_test.cpp` test `test_skeleton_and_content` can be used to 0117 * detect that. 0118 */ 0119 #define BOOST_MPI_BCAST_BOTTOM_WORKS_FINE 0120 0121 #if defined(LAM_MPI) 0122 // Configuration for LAM/MPI 0123 # define BOOST_MPI_HAS_MEMORY_ALLOCATION 0124 # define BOOST_MPI_HAS_NOARG_INITIALIZATION 0125 # undef BOOST_MPI_BCAST_BOTTOM_WORKS_FINE 0126 #endif 0127 0128 #if defined(MPICH_NAME) 0129 // Configuration for MPICH 0130 #endif 0131 0132 #if defined(OPEN_MPI) 0133 // Configuration for Open MPI 0134 #endif 0135 0136 #if BOOST_MPI_VERSION >= 3 0137 // MPI_Probe an friends should work 0138 # if defined(I_MPI_NUMVERSION) 0139 // Excepted for some Intel versions. 0140 // Note that I_MPI_NUMVERSION is not always defined with Intel. 0141 # if I_MPI_NUMVERSION > 20190004000 0142 # define BOOST_MPI_USE_IMPROBE 1 0143 # endif 0144 # else 0145 # define BOOST_MPI_USE_IMPROBE 1 0146 # endif 0147 #endif 0148 0149 /***************************************************************************** 0150 * * 0151 * DLL import/export options * 0152 * * 0153 *****************************************************************************/ 0154 0155 #if (defined(BOOST_MPI_DYN_LINK) || defined(BOOST_ALL_DYN_LINK)) && !defined(BOOST_MPI_STATIC_LINK) 0156 # if defined(BOOST_MPI_SOURCE) 0157 # define BOOST_MPI_DECL BOOST_SYMBOL_EXPORT 0158 # define BOOST_MPI_BUILD_DLL 0159 # else 0160 # define BOOST_MPI_DECL BOOST_SYMBOL_IMPORT 0161 # endif 0162 #endif 0163 0164 #ifndef BOOST_MPI_DECL 0165 # define BOOST_MPI_DECL 0166 #endif 0167 0168 #if !defined(BOOST_MPI_NO_LIB) && !defined(BOOST_MPI_SOURCE) && !defined(BOOST_ALL_NO_LIB) && defined(__cplusplus) 0169 # define BOOST_LIB_NAME boost_mpi 0170 # if defined(BOOST_MPI_DYN_LINK) || defined(BOOST_ALL_DYN_LINK) 0171 # define BOOST_DYN_LINK 0172 # endif 0173 # ifdef BOOST_MPI_DIAG 0174 # define BOOST_LIB_DIAGNOSTIC 0175 # endif 0176 # include <boost/config/auto_link.hpp> 0177 #endif 0178 0179 #endif // BOOST_MPI_CONFIG_HPP
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|