Boost logo

Boost-MPI :

Subject: [Boost-mpi] Suboptimal sending of std::vectors
From: Simon Etter (ettersi_at_[hidden])
Date: 2014-01-20 09:24:48


When benchmarking the performance of sending a std::vector<double> with Boost.MPI, I noticed that you can gain several factors of speedup if you

std::vector<double> data(n);

by e.g.

std::vector<double> data(n);
comm.send(0,0, boost::mpi::skeleton(data));
comm.send(0,0, boost::mpi::get_content(data));

The code to benchmark, the measured data as well as a plot thereof are attached. Further parameters were:

MPI implementation: Open MPI 1.6.5
C++ compiler: gcc 4.8.2
Compiler flags: -O3 -std=c++11
mpirun parameter: --bind-to-core
CPU model: AMD Opteron(tm) Processor 6174

Why is it/what am I doing wrong that the default sending of std::vector<double> performs so badly?

Best regards,
Simon Etter

Boost-Commit list run by troyer at