Subject: [Boost-bugs] [Boost C++ Libraries] #3565: MPL-related Compilation Error in MPI and Graph Parallel libraries
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2009-10-26 18:04:31
#3565: MPL-related Compilation Error in MPI and Graph Parallel libraries
-----------------------------------------------------------------+----------
Reporter: Denis Arnaud <denis.arnaud_boost@â¦> | Owner: dgregor
Type: Bugs | Status: new
Milestone: Boost 1.41.0 | Component: mpi
Version: Boost 1.40.0 | Severity: Showstopper
Keywords: MPL, MPI, Graph, Graph_Parallel, ASSERT_MPL, sizeof |
-----------------------------------------------------------------+----------
When compiling Boost, prepared with CMake of the
[http://sodium.resophonic.com/boost-cmake/1.40.0.cmake2/ 1.40.0-cmake2]
version, with a GCC 4.4.1 compiler on a 64bit Linux platform, there are
two MPL-related errors:
----
Building CXX object libs/mpi/src/CMakeFiles/boost_mpi-mt-
shared.dir/broadcast.cpp.o
In file included from
/home/build/dev/fedorasvn/reviews/boost_529563/boost-1.40.0.cmake2/boost/mpi/detail/mpi_datatype_cache.hpp:14,
from
/home/build/dev/fedorasvn/reviews/boost_529563/boost-1.40.0.cmake2/boost/mpi/datatype.hpp:28,
from
/home/build/dev/fedorasvn/reviews/boost_529563/boost-1.40.0.cmake2/boost/mpi/communicator.hpp:21,
from
/home/build/dev/fedorasvn/reviews/boost_529563/boost-1.40.0.cmake2/boost/mpi/collectives.hpp:22,
from
/home/build/dev/fedorasvn/reviews/boost_529563/boost-1.40.0.cmake2/boost/mpi/collectives_fwd.hpp:20,
from
/home/build/dev/fedorasvn/reviews/boost_529563/boost-1.40.0.cmake2/boost/mpi/collectives/broadcast.hpp:12,
from
/home/build/dev/fedorasvn/reviews/boost_529563/boost-1.40.0.cmake2/libs/mpi/src/broadcast.cpp:10:
/home/build/dev/fedorasvn/reviews/boost_529563/boost-1.40.0.cmake2/boost/mpi/detail/mpi_datatype_oarchive.hpp:
In member function âvoid
boost::mpi::detail::mpi_datatype_oarchive::save_enum(const T&,
mpl_::true_)â:
/home/build/dev/fedorasvn/reviews/boost_529563/boost-1.40.0.cmake2/boost/mpi/detail/mpi_datatype_oarchive.hpp:64:
error: expected primary-expression before âenumâ
/home/build/dev/fedorasvn/reviews/boost_529563/boost-1.40.0.cmake2/boost/mpi/detail/mpi_datatype_oarchive.hpp:64:
error: expected â;â before âenumâ
make[2]: *** [libs/mpi/src/CMakeFiles/boost_mpi-mt-
shared.dir/broadcast.cpp.o] Error 1
make[1]: *** [libs/mpi/src/CMakeFiles/boost_mpi-mt-shared.dir/all] Error 2
make: *** [all] Error 2
----
For that error, the line 64 of
$BOOST/boost/mpi/detail/mpi_datatype_oarchive.hpp must be changed, so
that:
BOOST_MPL_ASSERT((sizeof(T)==sizeof(int_type)));
be replaced by:
BOOST_MPL_ASSERT_RELATION( sizeof(T), ==, sizeof(int_type) );
And:
----
Building CXX object libs/graph_parallel/src/CMakeFiles
/boost_graph_parallel-mt-shared.dir/mpi_process_group.cpp.o
In file included from
/home/build/dev/fedorasvn/reviews/boost_529563/boost-1.40.0.cmake2/boost/graph/distributed/mpi_process_group.hpp:808,
from
/home/build/dev/fedorasvn/reviews/boost_529563/boost-1.40.0.cmake2/libs/graph_parallel/src/mpi_process_group.cpp:14:
/home/build/dev/fedorasvn/reviews/boost_529563/boost-1.40.0.cmake2/boost/graph/distributed/detail/mpi_process_group.ipp:
In function âint boost::graph::distributed::receive(const
boost::graph::distributed::mpi_process_group&, int, int, T&)â:
/home/build/dev/fedorasvn/reviews/boost_529563/boost-1.40.0.cmake2/boost/graph/distributed/detail/mpi_process_group.ipp:722:
error: âstderrâ was not declared in this scope
/home/build/dev/fedorasvn/reviews/boost_529563/boost-1.40.0.cmake2/boost/graph/distributed/detail/mpi_process_group.ipp:724:
error: there are no arguments to âfprintfâ that depend on a template
parameter, so a declaration of âfprintfâ must be available
/home/build/dev/fedorasvn/reviews/boost_529563/boost-1.40.0.cmake2/boost/graph/distributed/detail/mpi_process_group.ipp:724:
note: (if you use â-fpermissiveâ, G++ will accept your code, but allowing
the use of an undeclared name is deprecated)
/home/build/dev/fedorasvn/reviews/boost_529563/boost-1.40.0.cmake2/boost/graph/distributed/detail/mpi_process_group.ipp:
In function âtypename boost::enable_if<boost::mpi::is_mpi_datatype<T>,
std::pair<int, unsigned int> >::type
boost::graph::distributed::receive(const
boost::graph::distributed::mpi_process_group&, int, int, T*, size_t)â:
/home/build/dev/fedorasvn/reviews/boost_529563/boost-1.40.0.cmake2/boost/graph/distributed/detail/mpi_process_group.ipp:743:
error: âstderrâ was not declared in this scope
/home/build/dev/fedorasvn/reviews/boost_529563/boost-1.40.0.cmake2/boost/graph/distributed/detail/mpi_process_group.ipp:745:
error: there are no arguments to âfprintfâ that depend on a template
parameter, so a declaration of âfprintfâ must be available
/home/build/dev/fedorasvn/reviews/boost_529563/boost-1.40.0.cmake2/boost/graph/distributed/detail/mpi_process_group.ipp:
In function âint boost::graph::distributed::receive(const
boost::graph::distributed::mpi_process_group&, int, int, T&) [with T =
int]â:
/home/build/dev/fedorasvn/reviews/boost_529563/boost-1.40.0.cmake2/boost/graph/distributed/detail/mpi_process_group.ipp:609:
instantiated from âvoid
boost::graph::distributed::mpi_process_group::global_trigger_launcher<Type,
Handler>::receive(const boost::graph::distributed::mpi_process_group&,
int, int, boost::graph::parallel::trigger_receive_context, int) const
[with Type = int, Handler = void (*)(const
boost::graph::distributed::mpi_process_group&, int, int, int, bool)]â
/home/build/dev/fedorasvn/reviews/boost_529563/boost-1.40.0.cmake2/libs/graph_parallel/src/mpi_process_group.cpp:1111:
instantiated from here
/home/build/dev/fedorasvn/reviews/boost_529563/boost-1.40.0.cmake2/boost/graph/distributed/detail/mpi_process_group.ipp:722:
error: âfprintfâ was not declared in this scope
/home/build/dev/fedorasvn/reviews/boost_529563/boost-1.40.0.cmake2/boost/graph/distributed/detail/mpi_process_group.ipp:
In function âint boost::graph::distributed::receive(const
boost::graph::distributed::mpi_process_group&, int, int, T&) [with T =
boost::graph::distributed::mpi_process_group::outgoing_messages]â:
/home/build/dev/fedorasvn/reviews/boost_529563/boost-1.40.0.cmake2/boost/graph/distributed/detail/mpi_process_group.ipp:609:
instantiated from âvoid
boost::graph::distributed::mpi_process_group::global_trigger_launcher<Type,
Handler>::receive(const boost::graph::distributed::mpi_process_group&,
int, int, boost::graph::parallel::trigger_receive_context, int) const
[with Type =
boost::graph::distributed::mpi_process_group::outgoing_messages, Handler =
void (*)(const boost::graph::distributed::mpi_process_group&, int, int,
boost::graph::distributed::mpi_process_group::outgoing_messages&, bool)]â
/home/build/dev/fedorasvn/reviews/boost_529563/boost-1.40.0.cmake2/libs/graph_parallel/src/mpi_process_group.cpp:1111:
instantiated from here
/home/build/dev/fedorasvn/reviews/boost_529563/boost-1.40.0.cmake2/boost/graph/distributed/detail/mpi_process_group.ipp:722:
error: âfprintfâ was not declared in this scope
make[2]: *** [libs/graph_parallel/src/CMakeFiles/boost_graph_parallel-mt-
shared.dir/mpi_process_group.cpp.o] Error 1
make[1]: *** [libs/graph_parallel/src/CMakeFiles/boost_graph_parallel-mt-
shared.dir/all] Error 2
make: *** [all] Error 2
----
For that error, a header file inclusion is missing around the line 22 of
$BOOST/boost/graph/distributed/detail/mpi_process_group.ipp:
#include <cstdio>
I attach the corresponding patch. To apply it, just go to the $BOOST
directory, copy the patch (boost-mpl-compilation-fix.patch file) into
there, and type something like:
patch -p1 --dry-run < boost-mpl-compilation-fix.patch
and, if everything seems fine:
patch -p1 < boost-mpl-compilation-fix.patch
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/3565> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:01 UTC