From: David Wells Date: Sat, 8 Apr 2017 17:13:41 +0000 (-0400) Subject: Revert eb5db19276 to get consistent memory usage. X-Git-Tag: v9.0.0-rc1~1712^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9307fa64bbecdbd5a597c9793a96af6815958351;p=dealii.git Revert eb5db19276 to get consistent memory usage. Rather than rely on details of std::vector's reallocation scheme, just copy things. --- diff --git a/source/base/partitioner.cc b/source/base/partitioner.cc index 3f4d01522b..500d762864 100644 --- a/source/base/partitioner.cc +++ b/source/base/partitioner.cc @@ -269,7 +269,6 @@ namespace Utilities // allocate memory for import data std::vector > import_targets_temp; - import_targets_temp.reserve(n_procs); n_import_indices_data = 0; for (unsigned int i=0; i 0) @@ -278,8 +277,8 @@ namespace Utilities import_targets_temp.push_back(std::pair (i, receive_buffer[i])); } - - import_targets_data = std::move(import_targets_temp); + // copy, don't move, to get deterministic memory usage. + import_targets_data = import_targets_temp; } // send and receive indices for import data. non-blocking receives and