|
Boost Users : |
Subject: [Boost-users] [MPI] compilation with c++0x and gcc-4.6
From: tcb (thecolourblue+m_at_[hidden])
Date: 2011-12-16 20:24:56
hi,
I have a problem compiling simple boost mpi programs with gcc4.6 on osx.
The broadcast_test.cpp from libs/mpi/test compiles just fine with the
-std=gnu++98, but when I use -std=gnu++0x I get a compilation error which
seems to implicate boost::serialization. The code compiles just fine with
gcc-4.4 and gcc-4.7 with the -std=gnu++0x flags. There is no c++0x specific
code in the test file itself.
Any ideas what the problem is with gcc-4.6 and -std=gnu++0x?
$ OMPI_CXX=g++-mp-4.6 openmpic++ -std=c++0x -m64 -o broadcast_test
broadcast_test.cpp -lboost_mpi-mt -lboost_serialization-mt
In file included from /opt/local/include/boost/mpi/collectives.hpp:21:0,
from /opt/local/include/boost/mpi/collectives_fwd.hpp:19,
from
/opt/local/include/boost/mpi/collectives/broadcast.hpp:11,
from broadcast_test.cpp:8:
/opt/local/include/boost/mpi/communicator.hpp:1633:58: error:
specialization of 'boost::mpi::status boost::mpi::communicator::recv(int,
int, T&) const [with T = boost::mpi::packed_iarchive]' after instantiation
/opt/local/include/boost/mpi/communicator.hpp:1668:65: error:
specialization of 'boost::mpi::request boost::mpi::communicator::isend(int,
int, const T&) const [with T = boost::mpi::packed_oarchive]' after
instantiation
In file included from /opt/local/include/gcc46/c++/vector:64:0,
from /opt/local/include/gcc46/c++/bits/random.h:34,
from /opt/local/include/gcc46/c++/random:50,
from /opt/local/include/gcc46/c++/bits/stl_algo.h:67,
from /opt/local/include/gcc46/c++/algorithm:63,
from /opt/local/include/boost/optional/optional.hpp:19,
from /opt/local/include/boost/optional.hpp:15,
from /opt/local/include/boost/mpi/communicator.hpp:18,
from /opt/local/include/boost/mpi/collectives.hpp:21,
from /opt/local/include/boost/mpi/collectives_fwd.hpp:19,
from
/opt/local/include/boost/mpi/collectives/broadcast.hpp:11,
from broadcast_test.cpp:8:
/opt/local/include/gcc46/c++/bits/stl_uninitialized.h: In function 'void
std::__uninitialized_default_n_a(_ForwardIterator, _Size, _Allocator&)
[with _ForwardIterator = char*, _Size = long unsigned int, _Allocator =
boost::mpi::allocator<char>]':
/opt/local/include/gcc46/c++/bits/vector.tcc:474:8: instantiated from
'void std::vector<_Tp, _Alloc>::_M_default_append(std::vector<_Tp,
_Alloc>::size_type) [with _Tp = char, _Alloc = boost::mpi::allocator<char>,
std::vector<_Tp, _Alloc>::size_type = long unsigned int]'
/opt/local/include/gcc46/c++/bits/stl_vector.h:592:4: instantiated from
'void std::vector<_Tp, _Alloc>::resize(std::vector<_Tp, _Alloc>::size_type)
[with _Tp = char, _Alloc = boost::mpi::allocator<char>, std::vector<_Tp,
_Alloc>::size_type = long unsigned int]'
/opt/local/include/boost/mpi/detail/packed_oprimitive.hpp:96:46:
instantiated from here
/opt/local/include/gcc46/c++/bits/stl_uninitialized.h:576:6: error: no
matching function for call to
'boost::mpi::allocator<char>::construct(char*)'
/opt/local/include/gcc46/c++/bits/stl_uninitialized.h:576:6: note:
candidate is:
/opt/local/include/boost/mpi/allocator.hpp:168:8: note: void
boost::mpi::allocator<T>::construct(boost::mpi::allocator<T>::pointer,
const T&) [with T = char, boost::mpi::allocator<T>::pointer = char*]
/opt/local/include/boost/mpi/allocator.hpp:168:8: note: candidate expects
2 arguments, 1 provided
In file included from
/opt/local/include/boost/serialization/extended_type_info_typeid.hpp:37:0,
from
/opt/local/include/boost/archive/detail/oserializer.hpp:38,
from
/opt/local/include/boost/mpi/detail/mpi_datatype_oarchive.hpp:14,
from
/opt/local/include/boost/mpi/detail/mpi_datatype_cache.hpp:13,
from /opt/local/include/boost/mpi/datatype.hpp:27,
from /opt/local/include/boost/mpi/communicator.hpp:20,
from /opt/local/include/boost/mpi/collectives.hpp:21,
from /opt/local/include/boost/mpi/collectives_fwd.hpp:19,
from
/opt/local/include/boost/mpi/collectives/broadcast.hpp:11,
from broadcast_test.cpp:8:
/opt/local/include/boost/serialization/access.hpp: In static member
function 'static void boost::serialization::access::serialize(Archive&, T&,
unsigned int) [with Archive = boost::mpi::packed_oarchive, T =
boost::mpi::packed_oarchive]':
/opt/local/include/boost/serialization/serialization.hpp:69:5:
instantiated from 'void boost::serialization::serialize(Archive&, T&,
unsigned int) [with Archive = boost::mpi::packed_oarchive, T =
boost::mpi::packed_oarchive]'
/opt/local/include/boost/serialization/serialization.hpp:128:9:
instantiated from 'void boost::serialization::serialize_adl(Archive&, T&,
unsigned int) [with Archive = boost::mpi::packed_oarchive, T =
boost::mpi::packed_oarchive]'
/opt/local/include/boost/archive/detail/oserializer.hpp:148:5:
instantiated from 'void boost::archive::detail::oserializer<Archive,
T>::save_object_data(boost::archive::detail::basic_oarchive&, const void*)
const [with Archive = boost::mpi::packed_oarchive, T =
boost::mpi::packed_oarchive]'
broadcast_test.cpp:153:1: instantiated from here
/opt/local/include/boost/serialization/access.hpp:118:9: error: 'class
boost::mpi::packed_oarchive' has no member named 'serialize'
/opt/local/include/boost/serialization/access.hpp: In static member
function 'static void boost::serialization::access::serialize(Archive&, T&,
unsigned int) [with Archive = boost::mpi::packed_iarchive, T =
boost::mpi::packed_iarchive]':
/opt/local/include/boost/serialization/serialization.hpp:69:5:
instantiated from 'void boost::serialization::serialize(Archive&, T&,
unsigned int) [with Archive = boost::mpi::packed_iarchive, T =
boost::mpi::packed_iarchive]'
/opt/local/include/boost/serialization/serialization.hpp:128:9:
instantiated from 'void boost::serialization::serialize_adl(Archive&, T&,
unsigned int) [with Archive = boost::mpi::packed_iarchive, T =
boost::mpi::packed_iarchive]'
/opt/local/include/boost/archive/detail/iserializer.hpp:188:5:
instantiated from 'void boost::archive::detail::iserializer<Archive,
T>::load_object_data(boost::archive::detail::basic_iarchive&, void*,
unsigned int) const [with Archive = boost::mpi::packed_iarchive, T =
boost::mpi::packed_iarchive]'
broadcast_test.cpp:153:1: instantiated from here
/opt/local/include/boost/serialization/access.hpp:118:9: error: 'class
boost::mpi::packed_iarchive' has no member named 'serialize'
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net