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

Install HDF library on windows to compile HDF5Application #12941

Open
EleonoraSpricigo opened this issue Dec 16, 2024 · 2 comments
Open

Install HDF library on windows to compile HDF5Application #12941

EleonoraSpricigo opened this issue Dec 16, 2024 · 2 comments

Comments

@EleonoraSpricigo
Copy link

Description
Hello,
I'm having hard times to include the HDF5Application within Windows operating system.
I've read the documentation, but it is mostly for Ubuntu.
I was wondering if the authors have further and more specific details about installing HDF library on windows.
Thanks

Scope

  • Compilation
  • KratosCore
  • HDF5Application
  • WIndows documentation

@roigcarlo

@antonialarese
Copy link
Member

@EleonoraSpricigo , I guess @sunethwarna is the reponsible for the HDF5 application and might be the person able to help you using it. Thanks!

@roigcarlo
Copy link
Member

Hi @EleonoraSpricigo,

While we don't provide any "official" guide, I can tell you what I do in my computer. Personally I have been never able to find an executable that works, so I compile it myself:

wget https://hdf-wordpress-1.s3.amazonaws.com/wp-content/uploads/manual/HDF5/HDF5_1_12_2/source/hdf5-1.12.2.zip -OutFile c:\TEMP\hdf5.zip; \
mkdir c:\hdf5; \
mkdir c:\hdf5\build; \
mkdir c:\hdf5\bin; \
mkdir c:\hdf5\source; \
7z x c:\TEMP\hdf5.zip -o"c:\hdf5\source"

cd 'c:/Program Files/CMake/bin/'; \
./cmake.exe -H"c:\med\source\med-5.0.0" -B"c:\med\build" -DCMAKE_INSTALL_PREFIX="c:\med\bin" -DMEDFILE_BUILD_TESTS=OFF -DMEDFILE_BUILD_SHARED_LIBS=ON -DHDF5_ROOT="c:\hdf5\bin"; \
./cmake.exe --build "c:\med\build" --target install -- /property:configuration=Release

Basically the lines correspond to:

  • Download the zip file with the libratry,
  • Create the build bin and source diretories
  • Decompress
  • CD inside the the directory with the source
  • Compile
  • Install

If you find it more useful, is exactly what we do for the CI machines as well https://github.com/KratosMultiphysics/Kratos/blob/master/scripts/docker_files/docker_file_wheelbuilder_windows/Dockerfile.

Later you can just reference the library using -DHDF5_ROOT pointing to the bin directory.

Let me know if that helps

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: To do
Development

No branches or pull requests

3 participants