$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [boost] Cycle between Graph and GraphParallel
From: Edward Diener (eldiener_at_[hidden])
Date: 2018-10-06 02:43:23
On 10/5/2018 8:18 PM, Peter Dimov via Boost wrote:
> Currently we have a dependency cycle between `graph` and 
> `graph_parallel`. It's not the only one, but it's notable with the fact 
> that both libraries are buildable and we therefore can't ignore it as we 
> can ignore cycles between header-only libraries that at release time 
> become a single directory.
> 
> In the particular, this impedes efforts to generate CMake config files. 
> Under one scheme I'm currently working on, for instance, Boost.Python 
> can't be installed because it tries to install Graph, which tries to 
> install GraphParallel, which tries to install Graph.
> 
> The cycle between these two is an interesting one. 
> boost/graph/breadth_first_search.hpp does:
> 
> #ifdef BOOST_GRAPH_USE_MPI
> #  include <boost/graph/distributed/breadth_first_search.hpp>
> #endif
> 
> at its end, and boost/graph/distributed/breadth_first_search.hpp does:
> 
> #ifndef BOOST_GRAPH_USE_MPI
> #error "Parallel BGL files should not be included unless 
> <boost/graph/use_mpi.hpp> has been included"
> #endif
> 
> #include <boost/graph/breadth_first_search.hpp>
> 
> at its very start. So these headers include each other.
> 
> One would naively think that only the parallel header should include the 
> normal one, but one is not well versed in graph library architectures, 
> so one might quite possibly be missing something, or a lot.
I believe you are correct here. Boost Graph should not depend on Boost 
Graph Parallel in any situation. Boost Graph Parallel is a library 
end-users should be able to use as they choose and Boost Graph itself 
should be usable without ever bringing in the Parallel code.
> 
> Comments?