@@ -821,14 +821,16 @@ void triangulation::load_mesh_from_h5(const std::string& mesh_filename)
821
821
H5::DataSpace dataspace (1 , &partition_dims);
822
822
H5::Attribute attribute = file.openAttribute (" /mesh/is_partition" );
823
823
attribute.read (PredType::NATIVE_HBOOL, &_mesh_is_from_partition);
824
- LOG_DEBUG << " Loaded mesh is partitioned " ;
824
+
825
825
826
826
}
827
827
catch (AttributeIException& e)
828
828
{
829
829
// non partition meshes won't have this
830
830
_mesh_is_from_partition = false ;
831
831
}
832
+
833
+ LOG_DEBUG << " Loaded mesh is partitioned = " <<_mesh_is_from_partition;
832
834
}
833
835
834
836
if (!_mesh_is_from_partition && !_version.mesh_ver_meets_min_h5 ())
@@ -883,12 +885,21 @@ void triangulation::load_mesh_from_h5(const std::string& mesh_filename)
883
885
884
886
std::vector<int > owner; // what MPIrank owns each triangle,
885
887
{
886
- H5::DataSet dataset = file.openDataSet (" /mesh/owner" );
887
- H5::DataSpace dataspace = dataset.getSpace ();
888
- hsize_t nelem;
889
- int ndims = dataspace.getSimpleExtentDims (&nelem, NULL );
890
- owner.resize (nelem);
891
- dataset.read (owner.data (), PredType::NATIVE_INT);
888
+ // if we have a h5 that isn't partitioned (ie mesh v 1.0.0) then we are entirely owned by rank 0
889
+ if (_version.to_string () == " 1.0.0" )
890
+ {
891
+ owner.resize (_global_IDs.size (), 0 );
892
+ }
893
+ else
894
+ {
895
+ H5::DataSet dataset = file.openDataSet (" /mesh/owner" );
896
+ H5::DataSpace dataspace = dataset.getSpace ();
897
+ hsize_t nelem;
898
+ int ndims = dataspace.getSimpleExtentDims (&nelem, NULL );
899
+ owner.resize (nelem);
900
+ dataset.read (owner.data (), PredType::NATIVE_INT);
901
+ }
902
+
892
903
}
893
904
894
905
{
0 commit comments