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

Static libsz and libaec, switch to HDF5::HDF5 in cmake, rename ENABLE_SPECTRE_DEBUG to SPECTRE_DEBUG in cmake, fix incorrect CCE assert #5972

Merged
merged 4 commits into from
May 9, 2024

Conversation

nilsdeppe
Copy link
Member

Proposed changes

Upgrade instructions

Code review checklist

  • The code is documented and the documentation renders correctly. Run
    make doc to generate the documentation locally into BUILD_DIR/docs/html.
    Then open index.html.
  • The code follows the stylistic and code quality guidelines listed in the
    code review guide.
  • The PR lists upgrade instructions and is labeled bugfix or
    new feature if appropriate.

Further comments

@nilsdeppe nilsdeppe requested a review from kidder May 7, 2024 16:57
string(FIND
"${_HDF5_INTERFACE_LINK_LIBS}" "libsz.so" _LOCATION_OF_LIBSZ)
if (NOT ${_LOCATION_OF_LIBSZ} EQUAL -1)
find_library(_libsz NAMES libsz.a)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

libsz is an optional dependency of hdf5 that you specify when building hdf5. Also when building hdf5 you can specify if you want to build static libs, shared libs, or both. So if a static build of everything is important, can we just make sure to build hdf5 in an all-static way instead of trying to patch transitive dependencies in the spectre build system? For an all-static build we have to control the environment very carefully anyway, probably in a container, so we can make sure to build hdf5 correctly as well.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure what you're looking for in terms of changes or are suggesting. This works in the container for producing a portable statically linked executable. I linked against static HDF5 and then found out that libsz was linked dynamically for that. Are you suggesting we compile HDF5 ourselves statically in the container?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes that's what I thought, in fact I thought we had to build a modified container where everything is statically linked anyway?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not that I know of, but I haven't thought about the containers in a while. I don't really have time to reconfigure the way we build everything in the container, so from my side it's either this or I can't distribute CCE for the ETK workshop...

@knelli2
Copy link
Contributor

knelli2 commented May 7, 2024

That's one mouthful of a PR title

@nilsdeppe
Copy link
Member Author

Yea... But I didn't want to "sneak" anything in 📦

@knelli2
Copy link
Contributor

knelli2 commented May 7, 2024

But that's what the description is for!

@nilsdeppe
Copy link
Member Author

Oh, I view that as "details" :P And I couldn't think of how to summarize 4 tangential things into one catch short word :P

@@ -39,9 +39,11 @@ std::pair<size_t, size_t> create_span_for_time_value(
lower_bound < upper_bound,
"The supplied `lower_bound` is greater than `upper_bound`, which is not "
"permitted");
ASSERT(2 * interpolator_length + pad < upper_bound,
ASSERT(2 * interpolator_length + pad <= upper_bound,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't figure out what this function does, but this new check is what is required to avoid underflow in the math, so it's probably correct.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea, I traced this back a decent bit through the code, never fully understood it but understood it well enough to expect several other ASSERTs to trigger if it was wrong :)

@nilsdeppe nilsdeppe merged commit 1a3e2c7 into sxs-collaboration:develop May 9, 2024
22 checks passed
@nilsdeppe nilsdeppe deleted the static_libs branch May 9, 2024 20:36
@nilsvu nilsvu added the build system CMake build system label May 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build system CMake build system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants