Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] - PetscViewerHDF5GetGroup() requires HDF5 #233

Open
guit-hub opened this issue Aug 26, 2024 · 6 comments
Open

[BUG] - PetscViewerHDF5GetGroup() requires HDF5 #233

guit-hub opened this issue Aug 26, 2024 · 6 comments

Comments

@guit-hub
Copy link

Describe the bug

  • What is the bug?
    .After struggling with the installation of it for two weeks,I finally pip it on my Ubuntu virtual system successfully.However,when I run './test.sh' as the github page showed,I encountered a unexpected error which I failed to fix it with huge effort.By trying some other simple example,I found that the problem occurs when using "uw.meshing.UnstructuredSimplexBox(minCoords=(0.0, 0.0), maxCoords=(1.0, 1.0), cellSize=1.0 / 3.0, qdegree=2)".The following is the error report:
    [0]PETSC ERROR: No support for this operation for this object type
    [0]PETSC ERROR: PetscViewerHDF5GetGroup() requires HDF5
    [0]PETSC ERROR: WARNING! There are unused option(s) set! Could be the program crashed before usage or a spelling mistake, etc!
    [0]PETSC ERROR: Option left: name:-dm_plex_hash_location (no value) source: code
    [0]PETSC ERROR: See https://petsc.org/release/faq/ for trouble shooting.
    [0]PETSC ERROR: Petsc Release Version 3.21.4, unknown
    [0]PETSC ERROR: test_0004_pointwise_fns.py on a named DESKTOP-GNG87D4 by root Wed Aug 21 11:25:42 2024
    [0]PETSC ERROR: Configure options --prefix=/usr/local/lib/python3.10/dist-packages/petsc PETSC_ARCH=arch-python --with-shared-libraries=1 --with-debugging=0 --with-c2html=0 --with-hdf5-dir=/usr/local/hdf5 --with-cc=/usr/local/bin/mpicc --with-cxx=/usr/local/bin/mpicxx --with-fc=0 --with-sowing=0
    [0]PETSC ERROR: GoddamitMfckr #1 PetscViewerHDF5GetGroup() at src/lib-petsc/compat/hdf5.h:14
    [0]PETSC ERROR: DMSwarm and the shadow space — is this implemented and is it what we need. #2 PetscViewerHDF5HasAttribute() at /opt/petsc/src/sys/classes/viewer/impls/hdf5/hdf5v.c:1527
    [0]PETSC ERROR: Get rotations happening for stokes dirichlet conditions #3 PetscViewerHDF5GetDMPlexStorageVersionWriting() at /opt/petsc/src/dm/impls/plex/plexhdf5.c:144
    [0]PETSC ERROR: Create & Populate a DMSwarm  #4 DMPlexCoordinatesView_HDF5_Internal() at /opt/petsc/src/dm/impls/plex/plexhdf5.c:1042
    [0]PETSC ERROR: Create dockerfile for development #5 DMPlexView_HDF5_Internal() at /opt/petsc/src/dm/impls/plex/plexhdf5.c:1300
    [0]PETSC ERROR: Upload JG DMSwarm advection snippet #6 DMView_Plex() at /opt/petsc/src/dm/impls/plex/plex.c:1941
    [0]PETSC ERROR: Mesh API object #7 DMView() at /opt/petsc/src/dm/interface/dm.c:1001
    [0]PETSC ERROR: Steady State Heat system object #8 PetscObjectView() at /opt/petsc/src/sys/objects/destroy.c:76
    Traceback (most recent call last):
    File "/opt/underworld/tests/test_0004_pointwise_fns.py", line 20, in
    mesh = uw.meshing.UnstructuredSimplexBox(
    File "/opt/underworld/src/underworld3/meshing.py", line 230, in UnstructuredSimplexBox
    new_mesh = Mesh(
    File "/opt/underworld/src/underworld3/discretisation.py", line 168, in init
    self.sf0, self.dm = _from_gmsh(
    File "/opt/underworld/src/underworld3/discretisation.py", line 75, in _from_gmsh
    viewer(plex_0)
    File "petsc4py/PETSc/Viewer.pyx", line 135, in petsc4py.PETSc.Viewer.call
    petsc4py.PETSc.Error: error code 56
    WARNING! There are options you set that were not used!
    WARNING! could be spelling mistake, etc!
    There is one unused database option. It is:
    Option left: name:-dm_plex_hash_location (no value) source: code
    BTW,I'm sure I have installed HDF5 with the latest version correctly.
  • What version code?
    underworld3 0.9b0
  • What system are you running the code on?
    Ubuntu 22.04.4 LTS (GNU/Linux 5.15.133.1-microsoft-standard-WSL2 x86_64)
  • Steps to reproduce?
    Here is my source code:
    mesh = uw.meshing.UnstructuredSimplexBox(
    minCoords=(0.0, 0.0), maxCoords=(1.0, 1.0), cellSize=1.0 / 3.0, qdegree=2
    )
    mesh.dm.view()
    Screenshots
    image
    image
@bknight1
Copy link
Member

Looks like hdf5 isn't installed? You can try to pip install, but this will be the serial version.

@guit-hub
Copy link
Author

Looks like hdf5 isn't installed? You can try to pip install, but this will be the serial version.

Sorry,when I type pip install hdf5,an error just occured:
image
btw,I have installed h5py,but it doesn't work to fix the bug.

@bknight1
Copy link
Member

Try:

pip install h5py

@julesghub
Copy link
Member

@bknight1 is right, petsc wasn't compiled against your hdf5.

@guit-hub
How are you installing petsc?

When configuring petsc, if you're compiling it, you need something like
--with-hdf5-dir=/your/path/to/hdf5 to refer to a previously install hdf5 installation or
--download-hdf5=1 to make petsc download and install a compatible hdf5 automatically.

@guit-hub
Copy link
Author

@bknight1 is right, petsc wasn't compiled against your hdf5.

@guit-hub How are you installing petsc?

When configuring petsc, if you're compiling it, you need something like --with-hdf5-dir=/your/path/to/hdf5 to refer to a previously install hdf5 installation or --download-hdf5=1 to make petsc download and install a compatible hdf5 automatically.

Thanks for both of your answers,but I think I've compiled PETSc against hdf5-1.14.4.3,
image

maybe this version doesn't work or maybe I should run the installation again

@knepley
Copy link
Collaborator

knepley commented Aug 28, 2024

Post your $PETSC_DIR/configure.log which will show exactly what was configured. You cannot get that error message if PETSc was successfully configured with HDF5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants