From: bangerth Date: Mon, 25 Mar 2013 03:04:45 +0000 (+0000) Subject: Use correct data type in MPI communication. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b2749497aed35eeadf8334fd7530d8507f39b86f;p=dealii-svn.git 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 --- 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