Closed RemDelaporteMathurin closed 6 months ago
It is because adios has updated its Python API. You could try to add:
import adios2
def resolve_adios_scope(adios2):
return adios2.bindings if hasattr(adios2, "bindings") else adios2
adios2 = resolve_adios_scope(adios2)
which is what I use in adios4dolfinx (thanks to @nate-sime for this fix).
I will add this once I get to working with the cell data implementation as well.
Currently trying to patch together some more checkpointing things which takes priority.
Thanks for the tip.
I added those lines to writer.py but now have this error:
Traceback (most recent call last):
File "/home/remidm/Fusion-TES-Modeling/convert_mesh.py", line 6, in <module>
write_mesh(mesh, "out_mesh.xdmf")
File "/home/remidm/miniconda3/envs/tes-model-env/lib/python3.12/site-packages/mesh_converter/writer.py", line 128, in write_mesh
adios = adios2.ADIOS(MPI.COMM_WORLD)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: __init__(): incompatible constructor arguments. The following argument types are supported:
1. adios2.bindings.adios2_bindings.ADIOS()
2. adios2.bindings.adios2_bindings.ADIOS(configFile: str)
Invoked with: <mpi4py.MPI.Intracomm object at 0x7f13f2263ba0>
Currently trying to patch together some more checkpointing things which takes priority.
YES! checkpointing takes precedence 🎉
@RemDelaporteMathurin I've now pushed a new commit that should fix this
@RemDelaporteMathurin I've now pushed a new commit that should fix this
Thanks! I will have a look asap
@RemDelaporteMathurin Currently working on the cell tag code. Give me an hour or so for that.
@RemDelaporteMathurin Code for second mesh example pushed
@jorgensd I still have this error message:
Traceback (most recent call last):
File "/home/remidm/Fusion-TES-Modeling/convert_mesh.py", line 4, in <module>
write_mesh(in_mesh, "out.xdmf")
File "/home/remidm/miniconda3/envs/exodus-converter-env/lib/python3.12/site-packages/mesh_converter/writer.py", line 148, in write_mesh
adios = adios2.ADIOS(MPI.COMM_WORLD)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: __init__(): incompatible constructor arguments. The following argument types are supported:
1. adios2.bindings.adios2_bindings.ADIOS()
2. adios2.bindings.adios2_bindings.ADIOS(configFile: str)
Invoked with: <mpi4py.MPI.Intracomm object at 0x7f7e61df47d0>
I installed everything with:
conda create -n converter-env -c conda-forge adios2 mpi4py pip
conda activate converter-env
python -m pip install git+https://github.com/jorgensd/mesh_converter.git
Am I missing something?
Adios2 has to be configured with mpi. See the readme in the root of the repo for detailed instructions.
Hi @jorgensd
I'm finally trying this out.
I installed the package inside a conda environment.
I ran into this error:
When running:
Should I be installing a specific version of Adios2?