One year ago I wrote some Fenics code and visualized the results with paraview 5.9. Now - on a new computer - i’m using paraview 5.10 an get with the same data following error message:
ERROR: In C:\glr\builds\paraview\paraview-ci\build\superbuild\paraview\src\VTK\IO\XML\vtkXMLPDataReader.cxx, line 372
vtkXMLPUnstructuredGridReader (0000021E44FDFCA0): Piece cell data array connectivity not found
ERROR: In C:\glr\builds\paraview\paraview-ci\build\superbuild\paraview\src\VTK\IO\XML\vtkXMLPDataReader.cxx, line 372
vtkXMLPUnstructuredGridReader (0000021E44FDFCA0): Piece cell data array offsets not found
I cannot reproduce your issue running the following code:
from dolfin import *
from dolfin import __version__ as version
print(version)
mesh = UnitSquareMesh(10, 10)
V = FunctionSpace(mesh, "DG", 0)
u = interpolate(Expression("x[0]", degree=1), V)
File("u.pvd") << u
Well, it’s an entire program with external meshes. I don’t want to upload it in a public space because of confidentiality. Reducing it to the core might take some time …
Try with built in meshes (and make some fake boundary conditions for uniquness).
You should not even need to solve any problem, just create a vector in the appropriate space and save it to file.
from dolfin import *
import mshr
from dolfin import __version__ as version
comm = MPI.comm_world
rank = MPI.rank(comm)
if rank==0:
print(version)
bl = Point(0,0)
tr = Point(1,1)
geom = mshr.Rectangle(bl,tr)
mesh = mshr.generate_mesh(geom, 100)
V = FunctionSpace(mesh, "CG", 2)
u = interpolate(Expression("x[0]", degree=1), V)
File("test.pvd") << u.leaf_node()
XDMFFile('test.xdmf').write(u)
which runs in parallel with MPI:
mpirun -np 2 python3 testmpi.py
and returns:
2019.1.0
When I try to open the PVD file in ParaView 5.10.1, it gives a bunch of errors:
(3977.191s) [pvserver ] vtkXMLPDataReader.cxx:372 ERR| vtkXMLPUnstructuredGridReader (0x14e52b20): Piece cell data array connectivity not found
(3977.191s) [pvserver ] vtkXMLPDataReader.cxx:372 ERR| vtkXMLPUnstructuredGridReader (0x14e52b20): Piece cell data array offsets not found
(3977.191s) [pvserver ] vtkXMLPDataReader.cxx:372 ERR| vtkXMLPUnstructuredGridReader (0x14e52b20): Piece cell data array types not found
(3977.229s) [pvserver ] vtkXMLPDataReader.cxx:354 ERR| vtkXMLPUnstructuredGridReader (0x14e52b20): Piece point data array f_19 not found
But one can still open the XDMF file in ParaView without any problems.
Conclusion
There are several necessary ingredients to reproduce the error:
MPI + mshr + 2nd order continuous Galerkin + export to PVD