Modify

Ticket #3565 (closed Bugs: fixed)

Opened 4 years ago

Last modified 4 years ago

MPL-related Compilation Error in MPI and Graph Parallel libraries

Reported by: Denis Arnaud <denis.arnaud_boost@…> Owned by: dgregor
Milestone: Boost 1.41.0 Component: mpi
Version: Boost 1.40.0 Severity: Showstopper
Keywords: MPL, MPI, Graph, Graph_Parallel, ASSERT_MPL, sizeof Cc:

Description

When compiling Boost, prepared with CMake of the  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

Attachments

boost-mpl-compilation-fix.patch Download (956 bytes) - added by Denis Arnaud <denis.arnaud_boost@…> 4 years ago.

Change History

Changed 4 years ago by Denis Arnaud <denis.arnaud_boost@…>

comment:1 Changed 4 years ago by jewillco

  • Status changed from new to closed
  • Resolution set to fixed

This appears to have already been fixed in r57782 (for the cstdio issue) and r56978 (for the BOOST_MPL_ASSERT issue).

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.