[petsc-users] PetscViewer with 64bit

Mike Michell mi.mike1021 at gmail.com
Sun Feb 12 17:15:21 CST 2023


Dear PETSc team,

I am a user of PETSc with Fortran. My code uses DMPlex to handle dm object.
To print out output variable and mesh connectivity, I use VecView() by
defining PetscSection on that dm and borrow a vector. The type of the
viewer is set to PETSCVIEWERVTK.

With 32bit indices, the above work flow has no issue. However, if PETSc is
configured with 64bit indices, my output .vtu file has an error if I open
the file with visualization tools, such as Paraview or Tecplot, saying
that:
"Cannot read cell connectivity from Cells in piece 0 because the "offsets"
array is not monotonically increasing or starts with a value other than 0."

If I open the .vtu file from terminal, I can see such a line:
...
<DataArray type="Int32" Name="connectivity" NumberOfComponents="1"
format="appended" offset="580860" />
...

I expected "DataArray type="Int64", since the PETSc has 64bit indices.
Could I get recommendations that I need to check to resolve the issue?

Thanks,
Mike
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20230212/d66e6f5e/attachment.html>


More information about the petsc-users mailing list