Dear Community,
I had a problem when opening files saved with VTXWriter. The error occurred while working with elements of the 3rd order. When opening a .bp file and moving to the last frame paraview raises an error. After experimenting with the grid size, I noticed that the position of the “critical” frame depends on the grid size. The larger the grid, the earlier it is.
I tried using ParaView-5.13.2-MPI, ParaView-5.13.1-MPI and ParaView-5.13.20250304-MPI on Windows 11 and Windows server 2022 to open it. FEniCSx 0.9 running on WSL Ubuntu 24.04 was used for the calculations.
Below you can find a minimal working code sample and the paraview error text.
import numpy as np
from mpi4py import MPI
from basix.ufl import element, mixed_element
from dolfinx.fem import Function, functionspace
from dolfinx.io import VTXWriter
from dolfinx.mesh import CellType, create_rectangle
dtype = np.float64
meshsize = 100
order = 3
msh = create_rectangle(
MPI.COMM_WORLD,
[(0.0, 0.0), (1, 1)],
[meshsize, meshsize],
CellType.triangle,
dtype=np.real(dtype(0)).dtype
)
Pn = element("Lagrange", msh.basix_cell(), order,
dtype=np.real(dtype(0)).dtype)
ME = functionspace(msh, mixed_element([Pn, Pn]))
u = Function(ME) # current solution
t = 0.0
u.x.array[:] = t
f1 = u.sub(0)
vtx_phi = VTXWriter(msh.comm, f"out/iotest/ch_phi.bp", f1, engine="BP4")
for i in range(500):
vtx_phi.write(t)
t += 1.0
u.x.array[:] = t
f1 = u.sub(0)
print(t)
vtx_phi.close()
print("done")
error
ERROR: In vtkADIOS2VTXReader.cxx, line 99
vtkADIOS2VTXReader (0000016854381FA0): Error loading ADIOS2 schema: e[1;36m[Tue Mar 04 19:42:25 2025]e[1;34m [ADIOS2 EXCEPTION]e[0m <Toolkit> <transport::file::FilePOSIX> <Read> : couldn't move to start position 4585881379 in file D:\iefimov\ch-fem\out\iotest\ch_phi.bp\data.0 : errno = 0: No errore[0m
: iostream stream error
ERROR: In vtkExecutive.cxx, line 730
vtkPVCompositeDataPipeline (00000168506C7840): Algorithm vtkADIOS2VTXReader (0000016854381FA0) returned failure for request: vtkInformation (000001684CC0DD30)
Debug: Off
Modified Time: 8821638
Reference Count: 1
Registered Events: (none)
Request: REQUEST_DATA
FORWARD_DIRECTION: 0
ALGORITHM_AFTER_FORWARD: 1
FROM_OUTPUT_PORT: 0