]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/mpi/include/boost/mpi/config.hpp
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / mpi / include / boost / mpi / config.hpp
CommitLineData
7c673cae
FG
1// Copyright (C) 2006 Douglas Gregor <doug.gregor -at- gmail.com>
2
3// Use, modification and distribution is subject to the Boost Software
4// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
5// http://www.boost.org/LICENSE_1_0.txt)
6
7/** @file config.hpp
8 *
9 * This header provides MPI configuration details that expose the
10 * capabilities of the underlying MPI implementation, and provides
11 * auto-linking support on Windows.
12 */
13#ifndef BOOST_MPI_CONFIG_HPP
14#define BOOST_MPI_CONFIG_HPP
15
16/* Force MPICH not to define SEEK_SET, SEEK_CUR, and SEEK_END, which
17 conflict with the versions in <stdio.h> and <cstdio>. */
18#define MPICH_IGNORE_CXX_SEEK 1
19
20#include <mpi.h>
21#include <boost/config.hpp>
22
23/** @brief Comment this macro is you are running in an heterogeneous environment.
24 *
25 * When this flag is enabled, we assume some simple, POD-like, type can be
26 * transmitted without paying the cost of portable serialization.
27 *
28 * Comment this if your platform is not homogeneous and that portable
29 * serialization/deserialization must be performed.
30 *
31 * It you do so, check that your MPI implementation supports thats kind of environment.
32 */
33#define BOOST_MPI_HOMOGENEOUS
34
35// If this is an MPI-2 implementation, define configuration macros for
36// the features we are interested in.
37#if defined(MPI_VERSION) && MPI_VERSION >= 2
38/** @brief Determine if the MPI implementation has support for memory
39 * allocation.
40 *
41 * This macro will be defined when the underlying MPI implementation
42 * has support for the MPI-2 memory allocation routines @c
43 * MPI_Alloc_mem and @c MPI_Free_mem. When defined, the @c allocator
44 * class template will provide Standard Library-compliant access to
45 * these memory-allocation routines.
46 */
47# define BOOST_MPI_HAS_MEMORY_ALLOCATION
48
49/** @brief Determine if the MPI implementation has supports initialization
50 * without command-line arguments.
51 *
52 * This macro will be defined when the underlying implementation
53 * supports initialization of MPI without passing along command-line
54 * arguments, e.g., @c MPI_Init(NULL, NULL). When defined, the @c
55 * environment class will provide a default constructor. This macro is
56 * always defined for MPI-2 implementations. */
57# define BOOST_MPI_HAS_NOARG_INITIALIZATION
58#else
59// If this is an MPI-1.x implementation, no arg initialization for
60// mpi environment could still be available, but not mandatory.
61// Undef this if no arg init is available:
62//# define BOOST_MPI_HAS_NOARG_INITIALIZATION
63#endif
64
65#if defined(MPIAPI)
66# define BOOST_MPI_CALLING_CONVENTION MPIAPI
67#else
68/** @brief Specifies the calling convention that will be used for callbacks
69 * from the underlying C MPI.
70 *
71 * This is a Windows-specific macro, which will be used internally to state
72 * the calling convention of any function that is to be used as a callback
73 * from MPI. For example, the internally-defined functions that are used in
74 * a call to @c MPI_Op_create. This macro is likely only to be useful to
75 * users that wish to bypass Boost.MPI, registering their own callbacks in
76 * certain cases, e.g., through @c MPI_Op_create.
77 */
78# define BOOST_MPI_CALLING_CONVENTION
79#endif
80
81/** @brief Indicates that MPI_Bcast supports MPI_BOTTOM.
82 *
83 * Some implementations have a broken MPI_Bcast wrt to MPI_BOTTOM.
84 * BullX MPI and LAM seems to be among them, at least for some versions.
85 * The `broacast_test.cpp` test `test_skeleton_and_content` can be used to
86 * detect that.
87 */
88#define BOOST_MPI_BCAST_BOTTOM_WORKS_FINE
89
90#if defined(LAM_MPI)
91// Configuration for LAM/MPI
92# define BOOST_MPI_HAS_MEMORY_ALLOCATION
93# define BOOST_MPI_HAS_NOARG_INITIALIZATION
94# undef BOOST_MPI_BCAST_BOTTOM_WORKS_FINE
95#elif defined(MPICH_NAME)
96// Configuration for MPICH
97#endif
98
99/*****************************************************************************
100 * *
101 * DLL import/export options *
102 * *
103 *****************************************************************************/
104
105#if (defined(BOOST_MPI_DYN_LINK) || defined(BOOST_ALL_DYN_LINK)) && !defined(BOOST_MPI_STATIC_LINK)
106# if defined(BOOST_MPI_SOURCE)
107# define BOOST_MPI_DECL BOOST_SYMBOL_EXPORT
108# define BOOST_MPI_BUILD_DLL
109# else
110# define BOOST_MPI_DECL BOOST_SYMBOL_IMPORT
111# endif
112#endif
113
114#ifndef BOOST_MPI_DECL
115# define BOOST_MPI_DECL
116#endif
117
118#if !defined(BOOST_MPI_NO_LIB) && !defined(BOOST_MPI_SOURCE) && !defined(BOOST_ALL_NO_LIB) && defined(__cplusplus)
119# define BOOST_LIB_NAME boost_mpi
120# if defined(BOOST_MPI_DYN_LINK) || defined(BOOST_ALL_DYN_LINK)
121# define BOOST_DYN_LINK
122# endif
123# ifdef BOOST_MPI_DIAG
124# define BOOST_LIB_DIAGNOSTIC
125# endif
126# include <boost/config/auto_link.hpp>
127#endif
128
129#endif // BOOST_MPI_CONFIG_HPP