diff --git a/build/Jamfile.v2 b/build/Jamfile.v2 index 6d9d77e6..435de742 100644 --- a/build/Jamfile.v2 +++ b/build/Jamfile.v2 @@ -21,7 +21,8 @@ if [ mpi.configured ] : ../../mpi/build//boost_mpi /mpi//mpi [ mpi.extra-requirements ] BOOST_GRAPH_NO_LIB=1 - shared:BOOST_GRAPH_DYN_LINK=1 + shared:BOOST_GRAPH_PARALLEL_DYN_LINK=1 + shared:BOOST_GRAPH_PARALLEL_SOURCE # # Intel compiler ICEs if we turn optimization on intel-vc71-win-9.1:off # Without these flags, MSVC 7.1 crash diff --git a/include/boost/graph/distributed/detail/tag_allocator.hpp b/include/boost/graph/distributed/detail/tag_allocator.hpp index 27340392..e883ac65 100644 --- a/include/boost/graph/distributed/detail/tag_allocator.hpp +++ b/include/boost/graph/distributed/detail/tag_allocator.hpp @@ -12,6 +12,8 @@ #error "Parallel BGL files should not be included unless has been included" #endif +#include + #include namespace boost { namespace graph { namespace distributed { namespace detail { @@ -26,7 +28,7 @@ namespace boost { namespace graph { namespace distributed { namespace detail { * tag is returned and may be reallocated. These tags should be used, * for example, for one-time communication of values. */ -class tag_allocator { +class BOOST_GRAPH_PARALLEL_DECL tag_allocator { public: class token; friend class token; @@ -51,7 +53,7 @@ class tag_allocator { /** * A token used to represent an allocated tag. */ -class tag_allocator::token { +class BOOST_GRAPH_PARALLEL_DECL tag_allocator::token { public: /// Transfer ownership of the tag from @p other. token(const token& other); diff --git a/include/boost/graph/distributed/mpi_process_group.hpp b/include/boost/graph/distributed/mpi_process_group.hpp index 0e0627d1..8022c24d 100644 --- a/include/boost/graph/distributed/mpi_process_group.hpp +++ b/include/boost/graph/distributed/mpi_process_group.hpp @@ -16,6 +16,8 @@ #error "Parallel BGL files should not be included unless has been included" #endif +#include + //#define NO_SPLIT_BATCHES #define SEND_OOB_BSEND @@ -37,7 +39,7 @@ namespace boost { namespace graph { namespace distributed { // Process group tags struct mpi_process_group_tag : virtual boost::parallel::linear_process_group_tag { }; -class mpi_process_group +class BOOST_GRAPH_PARALLEL_DECL mpi_process_group { struct impl; @@ -624,7 +626,7 @@ inline mpi_process_group::process_size_type num_processes(const mpi_process_group& pg) { return pg.size; } -mpi_process_group::communicator_type communicator(const mpi_process_group& pg); +BOOST_GRAPH_PARALLEL_DECL mpi_process_group::communicator_type communicator(const mpi_process_group& pg); template void @@ -657,10 +659,10 @@ mpi_process_group::process_id_type receive(const mpi_process_group& pg, mpi_process_group::process_id_type source, int tag, T& value); -optional > +BOOST_GRAPH_PARALLEL_DECL optional > probe(const mpi_process_group& pg); -void synchronize(const mpi_process_group& pg); +BOOST_GRAPH_PARALLEL_DECL void synchronize(const mpi_process_group& pg); template T* diff --git a/include/boost/graph/parallel/dll_import_export.hpp b/include/boost/graph/parallel/dll_import_export.hpp new file mode 100644 index 00000000..d6b0303f --- /dev/null +++ b/include/boost/graph/parallel/dll_import_export.hpp @@ -0,0 +1,26 @@ +//======================================================================= +// Copyright 2018 Jürgen Hunold +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +//======================================================================= + +#ifndef BOOST_GRAPH_PARALLEL_DLL_IMPORT_EXPORT_HPP +#define BOOST_GRAPH_PARALLEL_DLL_IMPORT_EXPORT_HPP + +#include + +#if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_GRAPH_PARALLEL_DYN_LINK) +# ifdef BOOST_GRAPH_PARALLEL_SOURCE +# define BOOST_GRAPH_PARALLEL_DECL BOOST_SYMBOL_EXPORT +# else +# define BOOST_GRAPH_PARALLEL_DECL BOOST_SYMBOL_IMPORT +# endif // BOOST_GRAPH_PARALLEL_SOURCE +#endif // DYN_LINK + +#ifndef BOOST_GRAPH_PARALLEL_DECL +# define BOOST_GRAPH_PARALLEL_DECL +#endif + +#endif // BOOST_GRAPH_PARALLEL_DLL_IMPORT_EXPORT_HPP