On Mon, Feb 12, 2018 at 10:57 PM, Adrian Croucher <a.crouc...@auckland.ac.nz > wrote:
> hi, > > I have a DMPlex which I pass in to DMCreateGlobalVector() to create a > vector, and then use VecView() to view the vector. > > If the DM happens to contain no points on one process, this still works > fine if I view the vector using PETSC_VIEWER_STDOUT_WORLD. > > However if I create an HDF5 viewer using PetscViewerHDF5Open() and try to > view the vector using that, it crashes with the error message "Could not > classify input Vec for VTK". > > It goes into VecView_Plex_Local_HDF5_Internal(), which calls > DMPlexGetFieldType_Internal() (plex.c:93). This has some conditionals > testing if vStart < pEnd or cStart < pEnd, which are never satisfied > because pEnd = 0. This is what leads to it raising the error. > > This function returns the point range sStart, sEnd and field type ft. To > handle the case where there are no points on the process, should it perhaps > just return sStart, sEnd = 0,0 and a default (or maybe null) value for ft? Crap, this is a problem. I will have to put some parallel code in there because everyone must agree on the ft. Matt > > - Adrian > > -- > Dr Adrian Croucher > Senior Research Fellow > Department of Engineering Science > University of Auckland, New Zealand > email: a.crouc...@auckland.ac.nz > tel: +64 (0)9 923 4611 > > -- What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener https://www.cse.buffalo.edu/~knepley/ <http://www.caam.rice.edu/~mk51/>