From db10aa01d488af170661ef4973a1aa0c1ddd3c5d Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Mon, 25 Mar 2013 03:04:45 +0000 Subject: [PATCH] Use correct data type in MPI communication. git-svn-id: https://svn.dealii.org/branches/branch_bigger_global_dof_indices_4@29022 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/source/lac/sparsity_tools.cc | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/deal.II/source/lac/sparsity_tools.cc b/deal.II/source/lac/sparsity_tools.cc index a11b444c70..fda4a412e5 100644 --- a/deal.II/source/lac/sparsity_tools.cc +++ b/deal.II/source/lac/sparsity_tools.cc @@ -142,7 +142,7 @@ namespace SparsityTools * invalid_size_type indicates that a node has not been numbered yet), * pick a valid starting index among the as-yet unnumbered one. */ - size_type + size_type find_unnumbered_starting_index (const SparsityPattern &sparsity, const std::vector &new_indices) { @@ -452,16 +452,19 @@ namespace SparsityTools for (map_vec_t::iterator it=send_data.begin(); it!=send_data.end(); ++it, ++idx) MPI_Isend(&(it->second[0]), it->second.size(), - MPI_INT, + MPI_UNSIGNED_LONG_LONG, it->first, 124, mpi_comm, &requests[idx]); } +//TODO: In the following, we read individual bytes and then reinterpret them +// as size_type objects. this is error prone. use properly typed reads that +// match the write above { //receive - std::vector recv_buf; + std::vector recv_buf; for (unsigned int index=0; index::const_iterator ptr = recv_buf.begin(); - std::vector::const_iterator end = recv_buf.end(); + std::vector::const_iterator ptr = recv_buf.begin(); + std::vector::const_iterator end = recv_buf.end(); while (ptr+1