[MOAB-dev] commit/MOAB: danwu: At the beginning of ParallelComm::set_sharing_data(), unset PSTATUS_MULTISHARED flag if new nump is less than 3 (old code before commit 4c1554a performs this check). When reading MPAS files on 3 or more processors, this fix will make the recently added (by commit 4c1554a) consistency assertion below pass.

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Wed Oct 2 10:40:07 CDT 2013


1 new commit in MOAB:

https://bitbucket.org/fathomteam/moab/commits/2190c7a6f1f0/
Changeset:   2190c7a6f1f0
Branch:      master
User:        danwu
Date:        2013-10-02 17:39:21
Summary:     At the beginning of ParallelComm::set_sharing_data(), unset PSTATUS_MULTISHARED flag if new nump is less than 3 (old code before commit 4c1554a performs this check). When reading MPAS files on 3 or more processors, this fix will make the recently added (by commit 4c1554a) consistency assertion below pass.

Affected #:  1 file

diff --git a/src/parallel/ParallelComm.cpp b/src/parallel/ParallelComm.cpp
index f41f4e4..e83653b 100644
--- a/src/parallel/ParallelComm.cpp
+++ b/src/parallel/ParallelComm.cpp
@@ -5929,9 +5929,12 @@ ErrorCode ParallelComm::resolve_shared_ents(EntityHandle this_set,
                                            int old_nump, int new_nump,
                                            int *ps, EntityHandle *hs) 
   {
-    // set sharing data to what's passed in; may have to clean up existing sharing tags
-    // if things changed too much
-    
+    // If new nump is less than 3, the entity is no longer mutishared
+     if (old_nump > 2 && (pstatus & PSTATUS_MULTISHARED) && new_nump < 3) {
+       // Unset multishared flag
+       pstatus ^= PSTATUS_MULTISHARED;
+     }
+
     // check for consistency in input data
     assert(new_nump > 1 &&
            ((new_nump == 2 && pstatus&PSTATUS_SHARED && !(pstatus&PSTATUS_MULTISHARED)) || // if <= 2 must not be multishared

Repository URL: https://bitbucket.org/fathomteam/moab/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.


More information about the moab-dev mailing list