Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error reading cell data for vtk files in serial #69

Open
davidscn opened this issue Jan 3, 2022 · 4 comments
Open

Error reading cell data for vtk files in serial #69

davidscn opened this issue Jan 3, 2022 · 4 comments

Comments

@davidscn
Copy link
Member

davidscn commented Jan 3, 2022

In #67, vtu files were added in order to allow a serial usage of vtu files for preciceMap. However, using the legacy vtk file format in serial leads to the following error message

Warning: In /build/vtk7-yd0MKW/vtk7-7.1.1+dfsg2/IO/Legacy/vtkDataReader.cxx, line 487
vtkUnstructuredGridReader (0x55b6b5de6530): Reading file version: 5.1 with older reader version 4.1

ERROR: In /build/vtk7-yd0MKW/vtk7-7.1.1+dfsg2/IO/Legacy/vtkDataReader.cxx, line 3100
vtkUnstructuredGridReader (0x55b6b5de6530): Error reading ascii cell data! for file: ../../../../meshes/0.03/1/0.03.vtk

Steps to reproduce the error:

  1. run a vtk_calculator on a given vtk mesh and evaluate a function
  2. run preciceMap and try to map the evaluated function

Note: there is no partition_mesh.py involved.

@kursatyurt
Copy link
Collaborator

I cannot reproduce the error on my Ubuntu VM. I just only get Warning and the only possible way of getting rid of warnings is installing a newer version of VTK on the system.

The error message seems to be related to some other broken part but probably related to the VTK version. After #66 there should not be ASCII cell data it should be binary?

@davidscn
Copy link
Member Author

davidscn commented Jan 5, 2022

Indeed, using the binary version reveals a somewhat different error

Warning: In /build/vtk7-yd0MKW/vtk7-7.1.1+dfsg2/IO/Legacy/vtkDataReader.cxx, line 487
vtkUnstructuredGridReader (0x55fd517426b0): Reading file version: 5.1 with older reader version 4.1

ERROR: In /build/vtk7-yd0MKW/vtk7-7.1.1+dfsg2/IO/Legacy/vtkUnstructuredGridReader.cxx, line 348
vtkUnstructuredGridReader (0x55d9b26ae530): Unrecognized keyword: 

It seems like the problem is related to different versions in the reader and the writer. Can you reproduce something related? Can we define the versions somewhere?

@kursatyurt
Copy link
Collaborator

It seems like the problem is related to different versions in the reader and the writer. Can you reproduce something related? Can we define the versions somewhere?

In vtk_calculator.py after creating the vtkUnstructuredGridWriter (line 156) you can try to add this line

writer.SetFileVersion(1)

This only works for VTK9, not for VTK7 it seems Python and C++ use a different version of the VTK library on your system. Unfortunately I cannot test it since no VTK9 package is available on my system

@davidscn
Copy link
Member Author

What works as a general workaround is the following: use the 'fresh' mesh in any file format, which can (usually) also be used with preciceMap without any problems. The problem here is somehow caused by the vtk writer of the python tools. Afterwards, use the vtk_calculator and select an --output mesh with vtu extension, e.g., --output mesh.vtu. preciceMap should work now without any issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants