[petsc-users] Read and write HDF5 files
Jed Brown
jed at jedbrown.org
Thu Sep 8 08:04:00 CDT 2022
It sounds like the PETSc inside your container was not built with --download-hdf5 (or --with-hdf5). That can be fixed by updating the Dockerfile and rebuilding the image.
Quentin Chevalier <quentin.chevalier at polytechnique.edu> writes:
> Hello PETSc users !
>
> I'm trying to use PETSc routine to read and write complex vectors to binary
> files in parallel.
>
> I'm using dolfinx and petsc4py inside a docker container. My end goal is to
> write a dolfinx Function object to file, then read it again.
>
> My current code goes something like :
> viewer = pet.Viewer().createHDF5("file.h5", 'w', comm)
> function.vector.view(viewer)
>
> And fails with traceback :
> petsc4py.PETSc.Error: error code 86
> [9] PetscViewerSetType() at
> /usr/local/petsc/src/sys/classes/viewer/interface/viewreg.c:435
> [9] Unknown type. Check for miss-spelling or missing package:
> https://petsc.org/release/install/install/#external-packages
> [9] Unknown PetscViewer type given: hdf5
>
> The relevant functions show on pydoc, what am I doing wrong ?
>
> Cheers,
>
> Quentin
More information about the petsc-users
mailing list