[cig-commits] [commit] knepley/fix-parallel-mult-faults, master, next: MeshIO: Broadcast the space dimension so that block size gets set correctly (9e687af)

cig_noreply at geodynamics.org cig_noreply at geodynamics.org
Wed Apr 9 03:04:30 PDT 2014


Repository : ssh://geoshell/pylith

On branches: knepley/fix-parallel-mult-faults,master,next
Link       : https://github.com/geodynamics/pylith/compare/a213c3005450d915f40c7137ff7d8dbbb439d334...1b3d6d3bc246edc4235d0051142d675d91e9be41

>---------------------------------------------------------------

commit 9e687af4510d5e63fe67578ac8a3731eca95a9ff
Author: Matthew G. Knepley <knepley at gmail.com>
Date:   Mon Mar 31 10:40:02 2014 -0500

    MeshIO: Broadcast the space dimension so that block size gets set correctly


>---------------------------------------------------------------

9e687af4510d5e63fe67578ac8a3731eca95a9ff
 libsrc/pylith/meshio/MeshIOCubit.cc | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/libsrc/pylith/meshio/MeshIOCubit.cc b/libsrc/pylith/meshio/MeshIOCubit.cc
index 72b4846..91fb95c 100644
--- a/libsrc/pylith/meshio/MeshIOCubit.cc
+++ b/libsrc/pylith/meshio/MeshIOCubit.cc
@@ -77,6 +77,7 @@ pylith::meshio::MeshIOCubit::_read(void)
   scalar_array coordinates;
   int_array cells;
   int_array materialIds;
+  PetscErrorCode err = 0;
 
   if (0 == commRank) {
     try {
@@ -85,6 +86,7 @@ pylith::meshio::MeshIOCubit::_read(void)
       const int meshDim = exofile.getDim("num_dim");
 
       _readVertices(exofile, &coordinates, &numVertices, &spaceDim);
+      err = MPI_Bcast(&spaceDim, 1, MPI_INT, 0, _mesh->comm());PYLITH_CHECK_ERROR(err);
       _readCells(exofile, &cells, &materialIds, &numCells, &numCorners);
       _orientCells(&cells, numCells, numCorners, meshDim);
       MeshBuilder::buildMesh(_mesh, &coordinates, numVertices, spaceDim,
@@ -105,6 +107,7 @@ pylith::meshio::MeshIOCubit::_read(void)
       throw std::runtime_error(msg.str());
     } // try/catch
   } else {
+    err = MPI_Bcast(&spaceDim, 1, MPI_INT, 0, _mesh->comm());PYLITH_CHECK_ERROR(err);
     MeshBuilder::buildMesh(_mesh, &coordinates, numVertices, spaceDim,
 			   cells, numCells, numCorners, meshDim,
 			   _interpolate);



More information about the CIG-COMMITS mailing list