while the installation runs succesfull, i get an import error when i try to use adios4dolfinx inside the env
>>> import adios4dolfinx
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/zhome/academic/HLRS/isd/isdsg/spack/var/spack/environments/examples/.spack-env/view/lib/python3.12/site-packages/adios4dolfinx/__init__.py", line 11, in <module>
from .checkpointing import (
File "/zhome/academic/HLRS/isd/isdsg/spack/var/spack/environments/examples/.spack-env/view/lib/python3.12/site-packages/adios4dolfinx/checkpointing.py", line 22, in <module>
from .adios2_helpers import (
File "/zhome/academic/HLRS/isd/isdsg/spack/var/spack/environments/examples/.spack-env/view/lib/python3.12/site-packages/adios4dolfinx/adios2_helpers.py", line 25, in <module>
adios2 = resolve_adios_scope(adios2)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/zhome/academic/HLRS/isd/isdsg/spack/var/spack/environments/examples/.spack-env/view/lib/python3.12/site-packages/adios4dolfinx/adios2_helpers.py", line 20, in resolve_adios_scope
if not scope.is_built_with_mpi:
^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'adios2' has no attribute 'is_built_with_mpi'
I dont have import errors with other packages like dolfinx. Also setting the PATH as recommended in one github issue didnt solve the problem.
Could you check what version of adios2 that is installed?
The Python binding should have this attribute: Code search results · GitHub
For instance by calling python3 -c "import adios2; print(adios2.__version__)"
Yes, using a newer version of adios2 is the solution.
I am not sure why my spack behaved that way, I think it was because i had this adios2 version from an openfoam installation via spack.
What was not trivial, when i tried to use a newer adios2 version via this command, i ended up with an old version of hdf5, which was too old for the compiler: