[MOAB-dev] commit/MOAB: iulian07: filter out not owned entities, for writing

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Wed Apr 30 14:18:01 CDT 2014


1 new commit in MOAB:

https://bitbucket.org/fathomteam/moab/commits/912e5d377ff3/
Changeset:   912e5d377ff3
Branch:      master
User:        iulian07
Date:        2014-04-30 21:17:09
Summary:     filter out not owned entities, for writing

modify the test also, as Jayesh
needs cleanup

Affected #:  2 files

diff --git a/src/io/NCWriteHelper.cpp b/src/io/NCWriteHelper.cpp
index 9072e38..995bf3f 100644
--- a/src/io/NCWriteHelper.cpp
+++ b/src/io/NCWriteHelper.cpp
@@ -12,6 +12,7 @@
 #include "NCWriteMPAS.hpp"
 
 #include "moab/WriteUtilIface.hpp"
+#include "MBTagConventions.hpp"
 
 #include <sstream>
 
@@ -540,8 +541,18 @@ ErrorCode ScdNCWriteHelper::write_values(std::vector<std::string>& var_names)
       switch (variableData.entLoc) {
         case WriteNC::ENTLOCFACE:
           // Faces
+        {
           rval = mbImpl->get_entities_by_dimension(_fileSet, 2, ents);
           ERRORR(rval, "Can't get entities for faces.");
+#ifdef USE_MPI
+          bool &isParallel = _writeNC->isParallel;
+          if (isParallel) {
+            ParallelComm*& myPcomm = _writeNC->myPcomm;
+            rval = myPcomm->filter_pstatus(ents, PSTATUS_NOT_OWNED, PSTATUS_NOT);
+            ERRORR(rval, "Can't get filter for owned entities");
+          }
+#endif
+        }
           break;
         default:
           ERRORR(MB_FAILURE, "Not implemented yet.");

diff --git a/test/io/write_nc.cpp b/test/io/write_nc.cpp
index 7f9df60..54d16d5 100644
--- a/test/io/write_nc.cpp
+++ b/test/io/write_nc.cpp
@@ -111,11 +111,13 @@ void test_eul_read_write_T()
   ErrorCode rval = mb.create_meshset(MESHSET_SET, set);
   CHECK_ERR(rval);
 
-  // Load non-set variable T, set variable gw, and the mesh
-  read_opts += ";DEBUG_IO=0;VARIABLE=T,gw";
+  read_opts = "PARALLEL=READ_PART;PARTITION;PARALLEL_RESOLVE_SHARED_ENTS;PARALLEL_GHOSTS=2.0.1;PARTITION_METHOD=SQIJ;VARIABLE=";
   rval = mb.load_file(example_eul, &set, read_opts.c_str());
   CHECK_ERR(rval);
 
+  read_opts = "PARALLEL=READ_PART;PARTITION;PARTITION_METHOD=SQIJ;VARIABLE=T,gw;NOMESH;";
+  rval = mb.load_file(example_eul, &set, read_opts.c_str());
+  CHECK_ERR(rval);
   // Write variables T and gw
   std::string write_opts;
   write_opts = std::string(";;VARIABLE=T,gw;DEBUG_IO=0");

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