I run it on google colab. and i moved those .bp file to my google drive and downloaded to my laptop (i7 cpu + intel iris xe graphics) for viewing in paraview. I use paraview 5.11.1.
But it crashed immediately with select ADIO2VTXreader. The following message was displated with selecting ADIO2CoreImageReader to view the .bp folder.
ERROR: In vtkADIOS2CoreImageReader.cxx, line 401
vtkADIOS2CoreImageReader (0000015274688F20): failed to open and read meta data: [1;36m[Mon Jul 3 02:30:12 2023] [1;34m [ADIOS2 EXCEPTION] [0m : ERROR: this version didn’t compile with BP5 library, can’t use BP5 engine
[0m
ERROR: In vtkADIOS2CoreImageReader.cxx, line 435
vtkADIOS2CoreImageReader (0000015274688F20): unable to open file and data
ERROR: In vtkExecutive.cxx, line 741
vtkPVCompositeDataPipeline (00000152694AC390): Algorithm vtkADIOS2CoreImageReader (0000015274688F20) returned failure for request: vtkInformation (000001527484FAC0)
Debug: Off
Modified Time: 413612
Reference Count: 1
Registered Events: (none)
Request: REQUEST_INFORMATION
FORWARD_DIRECTION: 0
ALGORITHM_AFTER_FORWARD: 1
May i know whats wrong with the code or my laptop is not fast enough?
No, ADIOS2Writer is the base class for both VTXWriter and FidesWriter. The only thing that has changed is that the constructor of VTXWriter can now take in an engine as an option.
Looks to me that the PR mentioned above did not add the optional argument to the python layer, see dolfinx/python/dolfinx/io/utils.py. If that is indeed the case, @neolam_1987 you are welcome to create a PR on that. FEM on Colab releases updated packages every week, so the PR will be picked up shortly after it is merged.
I have uploaded utlis.py into colab and import it via
from utlis import VTXWriter
and run the code to generate the velocity and pressure files
However, when i open it on paraview, the following error message pops up.
ERROR: In C:\bbd\8fbebceb\build\superbuild\paraview\src\VTK\IO\ADIOS2\vtkADIOS2CoreImageReader.cxx, line 402
vtkADIOS2CoreImageReader (000001C9A48D2A50): failed to open and read meta data: FATAL CODING ERROR: ADIOS Index file C:\Users\XXX\Downloads\dfg2D-3-p.bp is assumed to always contain n*64 byte-length records. The file size now is 205146 bytes.
ERROR: In C:\bbd\8fbebceb\build\superbuild\paraview\src\VTK\IO\ADIOS2\vtkADIOS2CoreImageReader.cxx, line 439
vtkADIOS2CoreImageReader (000001C9A48D2A50): unable to open file and data
ERROR: In C:\bbd\8fbebceb\build\superbuild\paraview\src\VTK\Common\ExecutionModel\vtkExecutive.cxx, line 753
vtkPVCompositeDataPipeline (000001C9A4196D20): Algorithm vtkADIOS2CoreImageReader(000001C9A48D2A50) returned failure for request: vtkInformation (000001C9A45D4A00)
Debug: Off
Modified Time: 484743
Reference Count: 1
Registered Events: (none)
Request: REQUEST_INFORMATION
FORWARD_DIRECTION: 0
ALGORITHM_AFTER_FORWARD: 1
Is it something i did wrong on importing or my setting in paraview ? This time i was not prompted to choose between ADIO2VTXreader or ADIO2CoreImageReader when opening it on paraview.
Since you’re on Windows, did you download the newest MPI build of ParaView? This helped a colleague. Download ParaView
I’ve not used fem-on-colab but apparently it uses the dev version of ADIOS2 (>=2.9.0). This version uses BP5 as default engine which to date seems not to be supported by ParaView (Paraview opens ADIOS2-VTX BP5 files as BP4 (#22108) · Issues · ParaView / ParaView · GitLab). I’ve had this issue using the dolfinx:nightly Docker image which also recently bumped their ADIOS2 version to 2.9.
A simple fix that works for me with dolfinx@main is simply to pass engine="BP4" to VTXWriter.
If anyone has an idea how to update my conda environment to 0.7 (and thus probably solve this problem of reading .pb files) i would gladely appreciate.
FEniCS 0.7 has not been released for conda yet (probably happening in one of the next few days). If you want to use dolfinx v0.6.0 with bp4 file format you should pin adios to be smaller than 2.9
Same issue here. I tried to save with vtx_u = VTXWriter(mesh.comm, “dfg2D-3-u.bp”, [u_],“BP4”). Now Paraview doesn’t crash but I can’t see any variables to plot.
This isn’t very constructive. Please yield a minimal working example and what version of DOLFINx you are using, how you have installed it, and what version of Paraview you are using.
I use a docker image, dolfinx:stable, i.e., version 0.7.0 in complex mode (source /usr/local/bin/dolfinx-complex-mode). I’m using the last version of Paraview, 5.11.2 on a arm64 Mac OS. I am trying to save a vector function (DG, degree=2) as well as a scalar function (still DG). Tried again with dolfinx 0.6.0, and have no issues. Here an extract of the code where I try to save the solution E:
v_dg_el = ufl.VectorElement(“DG”, domain.ufl_cell(), 2)
W = fem.FunctionSpace(domain,v_dg_el)
F_dg = fem.Function(W)
F_dg.interpolate(fem.Expression(E, W.element.interpolation_points()))
with io.VTXWriter(domain.comm, ‘E.bp’, F_dg) as f:
f.write(0.0)