ar.size(), as added below, returns 48 in both debug and release modes._______________________________________________thanks,NickOn Oct 26, 2010, at 4:33 PM, Matthias Troyer wrote:_______________________________________________On 26 Oct 2010, at 15:52, Nick Collier wrote:I winnowed my own code down to a simple scatter call. I get the error under release mode but not under debug. Here's the code:namespace mpi = boost::mpi;int main(int argc, char **argv) {mpi::environment env(argc, argv);mpi::communicator world;vector<int> out;vector<vector<int> > in;if (world.rank() == 0) {for (int i = 0; i < world.size(); ++i) {vector<int> vec(10, 12);in.push_back(vec);}}try {mpi::scatter(world, in, out, 0);} catch (std::exception& ex) {std::cerr << ex.what() << std::endl;throw ex;}cout << world.rank() << " : " << out.size() << endl;}And the error is:ar size: 4293462132MPI_Send: Invalid count, error stack:MPI_Send(176): MPI_Send(buf=0x0016F78C, count=-1505164, MPI_PACKED, dest=1, tag=2147483647, MPI_COMM_WORLD) failedMPI_Send(101): Negative count, value is -1505164This seems to happen in line 73 of boost/mpi/collectives/scatter.hpp . To see where exactly this optimization issue arises, could you please add a print statementstd::cerr << oa.size() << std::endl;before line 73 to print the size of the archive there.Matthias
Boost-users mailing list
Boost-users@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users
Boost-users mailing list
Boost-users@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users