[cig-commits] r18108 - in short/3D/PyLith/branches/v1.5-stable: libsrc/utils pylith/perf unittests/libtests/meshio

brad at geodynamics.org brad at geodynamics.org
Mon Mar 14 19:38:55 PDT 2011


Author: brad
Date: 2011-03-14 19:38:55 -0700 (Mon, 14 Mar 2011)
New Revision: 18108

Modified:
   short/3D/PyLith/branches/v1.5-stable/libsrc/utils/array.hh
   short/3D/PyLith/branches/v1.5-stable/pylith/perf/Memory.py
   short/3D/PyLith/branches/v1.5-stable/unittests/libtests/meshio/TestOutputSolnSubset.cc
Log:
Small tweaks for avoiding build issues with PETSc and valarray.

Modified: short/3D/PyLith/branches/v1.5-stable/libsrc/utils/array.hh
===================================================================
--- short/3D/PyLith/branches/v1.5-stable/libsrc/utils/array.hh	2011-03-14 23:28:23 UTC (rev 18107)
+++ short/3D/PyLith/branches/v1.5-stable/libsrc/utils/array.hh	2011-03-15 02:38:55 UTC (rev 18108)
@@ -30,6 +30,8 @@
 
 #include "arrayfwd.hh"
 
+#include "sievetypes.hh" // ensure we include petscsys.h BEFORE valarray to prevent clash over isinf() and isnan().
+
 #include <vector>
 #include <valarray>
 

Modified: short/3D/PyLith/branches/v1.5-stable/pylith/perf/Memory.py
===================================================================
--- short/3D/PyLith/branches/v1.5-stable/pylith/perf/Memory.py	2011-03-14 23:28:23 UTC (rev 18107)
+++ short/3D/PyLith/branches/v1.5-stable/pylith/perf/Memory.py	2011-03-15 02:38:55 UTC (rev 18108)
@@ -27,6 +27,10 @@
   sizeDouble = 8
   import distutils.sysconfig
   pointerSize = distutils.sysconfig.get_config_var('SIZEOF_VOID_P')
+
+
+  import os
+
   if pointerSize is None:
     # Get pointer using sizeof(void*) in PyLith C++ library.
     pointerSize = petsc.sizeofVoidPtr()
@@ -34,12 +38,15 @@
   if pointerSize == 4:
     sizeSetEntry = 12
     sizeMapEntry = 16
-    sizeArrow    = 40 # 32 bit
+    sizeArrow    = 40 # 32 bit, 3 ints + set entry + map entry
 
   elif pointerSize == 8:
     sizeSetEntry = 24
     sizeMapEntry = 32
-    sizeArrow    = 56 # 64 bit
+    if os.uname()[0].lower() == "darwin":
+      sizeArrow = 68 # 64 bit, 3 ints + set entry + map entry
+    else:
+      sizeArrow = 56 # 64 bit, 3 ints + set entry + map entry
 
   elif pointerSize is None:
     sizeSetEntry = 0

Modified: short/3D/PyLith/branches/v1.5-stable/unittests/libtests/meshio/TestOutputSolnSubset.cc
===================================================================
--- short/3D/PyLith/branches/v1.5-stable/unittests/libtests/meshio/TestOutputSolnSubset.cc	2011-03-14 23:28:23 UTC (rev 18107)
+++ short/3D/PyLith/branches/v1.5-stable/unittests/libtests/meshio/TestOutputSolnSubset.cc	2011-03-15 02:38:55 UTC (rev 18108)
@@ -99,7 +99,7 @@
   const SieveMesh::label_sequence::iterator cellsEnd = cells->end();
   const ALE::Obj<SieveSubMesh::sieve_type>& sieve = sieveSubMesh->getSieve();
   assert(!sieve.isNull());
-  typedef ALE::SieveAlg<Mesh> SieveAlg;
+  typedef ALE::SieveAlg<SieveMesh> SieveAlg;
 
   CPPUNIT_ASSERT_EQUAL(ncells, int(cells->size()));
 



More information about the CIG-COMMITS mailing list