[bugfix] Fix partial sum

the total number of entries gathered was computed wrong, and we wrote
out ouf memory.
This commit is contained in:
Markus Blatt 2020-12-16 17:29:04 +01:00
parent 5b943761d7
commit ef6c953e0f

View File

@ -126,7 +126,7 @@ public:
// allgather the index of the perforation in ECL schedule and the value.
using Value = typename std::iterator_traits<RAIterator>::value_type;
std::vector<int> sizes(comm_.size());
std::vector<int> displ(comm_.size(), 0);
std::vector<int> displ(comm_.size() + 1, 0);
using GlobalIndex = typename IndexSet::IndexPair::GlobalIndex;
using Pair = std::pair<GlobalIndex,Value>;
std::vector<Pair> my_pairs;