From 95f86a3fc6d97647d4aac8e4e24847175454e2f8 Mon Sep 17 00:00:00 2001
From: Hal Finkel <hfinkel@anl.gov>
Date: Fri, 26 Aug 2016 20:03:18 -0500
Subject: [PATCH] drop gio topology column tags when not preserving topology

---
 GenericIORewrite.cxx | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/GenericIORewrite.cxx b/GenericIORewrite.cxx
index 0290ed5..3dc5b6e 100644
--- a/GenericIORewrite.cxx
+++ b/GenericIORewrite.cxx
@@ -79,8 +79,15 @@ int main(int argc, char *argv[]) {
       NewGIO.setPhysScale(PhysScale[d], d);
     }
 
-    for (size_t i = 0; i < VI.size(); ++i)
+    for (size_t i = 0; i < VI.size(); ++i) {
+      if (NR != NRanks) {
+        // When dropping topology information, also drop the related column tags.
+        VI[i].IsPhysCoordX = VI[i].IsPhysCoordY = VI[i].IsPhysCoordZ =
+          VI[i].MaybePhysGhost = false;
+      }
+
       NewGIO.addVariable(VI[i], &Vars[i][0], GenericIO::VarHasExtraSpace);
+    }
 
     NewGIO.write();
   }
-- 
GitLab