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?

- 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

Reply via email to