[MOAB-dev] r3628 - MOAB/trunk/src/parallel/moab
kraftche at cae.wisc.edu
kraftche at cae.wisc.edu
Mon Mar 15 17:11:59 CDT 2010
Author: kraftche
Date: 2010-03-15 17:11:59 -0500 (Mon, 15 Mar 2010)
New Revision: 3628
Modified:
MOAB/trunk/src/parallel/moab/ParallelComm.hpp
Log:
Make all fields of struct the same size so that there is no padding, avoiding
valgrind errors about MPI_Isend buffers containing uninitialized data
(the struct padding).
Modified: MOAB/trunk/src/parallel/moab/ParallelComm.hpp
===================================================================
--- MOAB/trunk/src/parallel/moab/ParallelComm.hpp 2010-03-15 21:55:12 UTC (rev 3627)
+++ MOAB/trunk/src/parallel/moab/ParallelComm.hpp 2010-03-15 22:11:59 UTC (rev 3628)
@@ -284,8 +284,8 @@
/** \brief Return the rank of the entity owner
*/
- ErrorCode get_owner(EntityHandle entity,
- int &owner);
+ ErrorCode get_owner(EntityHandle entity, int &owner);
+ ErrorCode get_owner(EntityHandle entity, EntityID &owner);
/** \brief Return the owner processor and handle of a given entity
*/
@@ -559,7 +559,7 @@
struct SharedEntityData {
EntityHandle local;
EntityHandle remote;
- int owner;
+ EntityID owner;
};
ErrorCode pack_shared_handles(
@@ -1208,6 +1208,16 @@
return get_owner_handle(entity, owner, tmp_handle);
}
+inline ErrorCode ParallelComm::get_owner(EntityHandle entity,
+ EntityID &owner)
+{
+ EntityHandle tmp_handle;
+ int tmp_owner;
+ ErrorCode result = get_owner_handle(entity, tmp_owner, tmp_handle);
+ owner = tmp_owner;
+ return result;
+}
+
/* \brief Unpack message with remote handles (const pointer to buffer)
*/
inline ErrorCode ParallelComm::unpack_remote_handles(unsigned int from_proc,
More information about the moab-dev
mailing list