[MOAB-dev] r5182 - in MOAB/trunk/src/parallel: . moab
hongjun at mcs.anl.gov
hongjun at mcs.anl.gov
Fri Sep 30 18:26:13 CDT 2011
Author: hongjun
Date: 2011-09-30 18:26:09 -0500 (Fri, 30 Sep 2011)
New Revision: 5182
Modified:
MOAB/trunk/src/parallel/ParallelComm.cpp
MOAB/trunk/src/parallel/moab/ParallelComm.hpp
Log:
o "created_iface" flag is added in "unpack_entities" function
o it is used in "exchange_owned_mesh" and it is for recognizing with ghost mesh element and non-ghost newly created mesh element
o it prevents to assign "PSTATUS_NOT_OWNED" and "PSTATUS_GHOST" for non-ghost newly created mesh elements
o passes make check
Modified: MOAB/trunk/src/parallel/ParallelComm.cpp
===================================================================
--- MOAB/trunk/src/parallel/ParallelComm.cpp 2011-09-29 21:08:52 UTC (rev 5181)
+++ MOAB/trunk/src/parallel/ParallelComm.cpp 2011-09-30 23:26:09 UTC (rev 5182)
@@ -960,12 +960,13 @@
std::vector<EntityHandle> &L2hloc,
std::vector<EntityHandle> &L2hrem,
std::vector<unsigned int> &L2p,
- std::vector<EntityHandle> &new_ents)
+ std::vector<EntityHandle> &new_ents,
+ const bool created_iface)
{
unsigned char *tmp_buff = buff_ptr;
ErrorCode result;
result = unpack_entities(buff_ptr, store_remote_handles,
- ind, false, L1hloc, L1hrem, L1p, L2hloc, L2hrem, L2p, new_ents);
+ ind, false, L1hloc, L1hrem, L1p, L2hloc, L2hrem, L2p, new_ents, created_iface);
RRA("Unpacking entities failed.");
if (myDebug->get_verbosity() == 3) {
myDebug->tprintf(4, "unpack_entities buffer space: %ld bytes.\n", (long int)(buff_ptr-tmp_buff));
@@ -1585,7 +1586,8 @@
std::vector<EntityHandle> &L2hloc,
std::vector<EntityHandle> &L2hrem,
std::vector<unsigned int> &L2p,
- std::vector<EntityHandle> &new_ents)
+ std::vector<EntityHandle> &new_ents,
+ const bool created_iface)
{
// general algorithm:
// - unpack # entities
@@ -1769,7 +1771,8 @@
// update sharing data and pstatus, adjusting order if iface
result = update_remote_data(new_h, &ps[0], &hs[0], num_ps,
(is_iface ? PSTATUS_INTERFACE :
- (created_here ? (PSTATUS_GHOST | PSTATUS_NOT_OWNED) : 0)));
+ (created_here ? (created_iface ? 0 : PSTATUS_GHOST
+ | PSTATUS_NOT_OWNED) : 0)));
RRA("");
// need to send this new handle to all sharing procs
@@ -5918,7 +5921,8 @@
remoteOwnedBuffs[ind/2]->reset_ptr(sizeof(int));
result = unpack_buffer(remoteOwnedBuffs[ind/2]->buff_ptr,
store_remote_handles, buffProcs[ind/2], ind/2,
- L1hloc, L1hrem, L1p, L2hloc, L2hrem, L2p, new_ents);
+ L1hloc, L1hrem, L1p, L2hloc, L2hrem, L2p,
+ new_ents, true);
if (MB_SUCCESS != result) {
std::cout << "Failed to unpack entities. Buffer contents:" << std::endl;
print_buffer(remoteOwnedBuffs[ind/2]->mem_ptr, MB_MESG_ENTS_SIZE, buffProcs[ind/2], false);
More information about the moab-dev
mailing list