-
Notifications
You must be signed in to change notification settings - Fork 369
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
CMake: add HDF5 support #1048
CMake: add HDF5 support #1048
Conversation
@eschnett can please try this out? |
This fails, for reasons probably unrelated to your work, but due to other changes. I receive this error message:
It seems that AMReX provides an
I think this operator accepts essentially any templated class, and hence leads to ambiguities in many cases. |
I have seen operator overloading ambiguity (on a different type in a different code) with gcc-9.3.0 and |
Sorry, I didn't read the error message carefully. I think you are right. It is our fault. |
For the record, I'm using GCC 10 with C++ 17. |
The operator is fixed in #1050, I believe. |
…to mr/cmake-hdf5-support
@eschnett can you try and let us know if it works? |
Trying it... I see that AMReX requires at least HDF5 1.12. At the same time, our code is stuck at 1.10 for some compatibility reason. (Or maybe that's just Ubuntu 20.04?) I will check and/or update our code, but that might take some time. Is this version requirement new? It wasn't there yesterday. |
Let me double-check the minimum version required, it may be that we can relax this. |
It seems that we could drop this to at least 1.10.4. |
1.10.4 is what we currently use. |
I modified CMake to accept HDF5 >= 1.10.4. Please try again. |
Another build error:
Do you require an HDF5 library that is configured with MPI? I'm currently using a stock serial Ubuntu HDF5 library. |
We do currently require a parallel hdf5 library. @mic84 is there a way we can check and enforce that in the build system? |
The next build error I encounter is in the Silo library (again – that's what constraining me to HDF5 1.10.x), which doesn't handle a parallel HDF5 library. When using parallel HDF5, then Silo requires HDF5 <=1.8.12. I'm going to have to make some choices here. |
Unfortunately, I am afraid that it cannot be fixed on the AMReX side. If you have no objections, I will merge this PR since I think that now everything is fine as far as AMReX is concerned. |
Please do.
-erik
On Wed, Jun 24, 2020 at 18:13 mic84 ***@***.***> wrote:
Unfortunately, I am afraid that it cannot be fixed on the AMReX side. If
you have no objections, I will merge this PR.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1048 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABUECSTFHM4YXWV6I6G6VDRYJ3APANCNFSM4OGFCSTA>
.
--
Erik Schnetter <schnetter@gmail.com>
http://www.perimeterinstitute.ca/personal/eschnetter/
|
# | ||
if (ENABLE_HDF5) | ||
set(HDF5_PREFER_PARALLEL TRUE) | ||
find_package(HDF5 1.10.4 REQUIRED COMPONENTS CXX) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From a very quick check, I think AMReX also implements the C API - also since the C++ bindings of HDF5 do not support parallel I/O (yet).
(This is not the same CMake component naming convention as in FindMPI here.)
This is what I do in openPMD-api (with a different target name):
find_package(HDF5 1.10.4 REQUIRED COMPONENTS C)
# ...
target_link_libraries(amrex PUBLIC ${HDF5_LIBRARIES})
target_include_directories(amrex SYSTEM PUBLIC ${HDF5_INCLUDE_DIRS})
target_compile_definitions(amrex PUBLIC ${HDF5_DEFINITIONS})
Note that the C++ bindings are also not built by default with HDF5.
No description provided.