mirror of
https://github.com/boostorg/mpi.git
synced 2026-01-19 04:22:10 +00:00
@@ -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 ]
|
||||
;
|
||||
}
|
||||
|
||||
35
test/buf_size.cpp
Normal file
35
test/buf_size.cpp
Normal file
@@ -0,0 +1,35 @@
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
#include <boost/serialization/vector.hpp>
|
||||
#include <boost/mpi/collectives.hpp>
|
||||
|
||||
struct huge {
|
||||
std::vector<unsigned char> data;
|
||||
huge() : data(2ull << 30ull, 0) { }
|
||||
|
||||
template <class Archive>
|
||||
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<huge> all;
|
||||
boost::mpi::gather(world, a, all, 0);
|
||||
} else {
|
||||
boost::mpi::gather(world, a, 0);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user