Skip to content
Snippets Groups Projects
Commit b601b80e authored by Miller, Ross's avatar Miller, Ross
Browse files

Sort out issues with different versions of boost::mpi::reduce

Prior to v1.55 of Boost, boost::mpi::reduce() would treat a
std::vector<T> as a single object.  In v1.55, some overloads of reduce()
were added that recognize std::vector<T> a collection of T elements.

The practical upshot is that for Boost < 1.55, the operator function you
pass in to reduce() should accept std::vector<T>, while in 1.55 and later
it must simply accept T.  This is explained in more detail here:
http://stackoverflow.com/questions/28845847/custom-reduce-operation-in-boost-mpi

This change adds a #define to check the Boost version and define function
objects that accept the correct parameters.

Refs #16539
parent 0b39b104
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment