diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 634c61f..76d5850 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -1,4 +1,4 @@ -# Support for the Message Passing Interface (MPI) +># Support for the Message Passing Interface (MPI) # # (C) Copyright 2005, 2006 Trustees of Indiana University # (C) Copyright 2005 Douglas Gregor @@ -52,5 +52,6 @@ test-suite mpi [ mpi-test sendrecv_vector : : : 2 ] # Intel MPI 2018 and older are axtected to fail: [ mpi-test non_blocking_any_source : : : 2 17 ] + [ mpi-test buf_size : : : 1 ] ; } diff --git a/test/buf_size.cpp b/test/buf_size.cpp new file mode 100644 index 0000000..05e4a39 --- /dev/null +++ b/test/buf_size.cpp @@ -0,0 +1,35 @@ +#include +#include +#include +#include + +struct huge { + std::vector data; + huge() : data(2ull << 30ull, 0) { } + + template + void serialize(Archive& ar, const unsigned int version) + { + ar & data; + } +}; + +int main() +{ + boost::mpi::environment env; + boost::mpi::communicator world; + + huge a{}; + + std::cout << world.rank() << " huge created " << std::endl; + world.barrier(); + + if (world.rank() == 0) { + std::vector all; + boost::mpi::gather(world, a, all, 0); + } else { + boost::mpi::gather(world, a, 0); + } + + return 0; +}