Skip to content

Conversation

@RMeli
Copy link
Contributor

@RMeli RMeli commented Mar 14, 2025

Looks like #44 broke some things upstream, because [email protected] does not pin the version of multicharge being fetched.

The issue is that custom-lapack_FOUND was not properly set in Findcustom-lapack.cmake, and therefore find_dependency(custom-lapack) was not working properly when using multicharge and dftd4 in upstream projects.

This PR adds the use of find_package_handle_standard_args so that the correct *_FOUND variables are properly set. I also namespaced BLAS and LAPACK with multicharge:: so that things are clearer downstream.

I tested this PR by building CP2K with DFTD4 support, and I'll follow up with similar changes for NVPL in dftd4.

@codecov
Copy link

codecov bot commented Mar 14, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 51.65%. Comparing base (282626e) to head (1a34a09).
Report is 10 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #46      +/-   ##
==========================================
+ Coverage   51.57%   51.65%   +0.07%     
==========================================
  Files          18       18              
  Lines        1648     1663      +15     
  Branches      746      752       +6     
==========================================
+ Hits          850      859       +9     
  Misses        390      390              
- Partials      408      414       +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Member

@awvwgk awvwgk left a comment

Choose a reason for hiding this comment

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

Thanks for sharing.

DIRECTORY ${PROJECT_SOURCE_DIR}/config/cmake/
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}
FILES_MATCHING
PATTERN "Find*.cmake"
Copy link
Member

Choose a reason for hiding this comment

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

Why are we limiting the installed files to the Find modules only? The other cmake file is included as macro in most of the Find modules

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good question. I need to understand why this is working, even without the macro (I tested all this compiling CP2K with DFTD4 support).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The multicharge-utils.cmake is correctly installed, probably here:
https://github.com/RMeli/dftd4/blob/83f78b546ac5785ffc996d6f2f2aa6933f74ca61/config/CMakeLists.txt#L57-L61

I think what I added might not be needed, I'll test again and eventually remove it.

Copy link
Member

Choose a reason for hiding this comment

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

Any update @RMeli? We would like to make a new release of multicharge, since we moved the coordination number logic to mctc-lib. Should we wait for any fixes, or can we proceed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the ping. This work was bumped down my priority list by other items, but I can probably have a look at this in the afternoon if it is not too late. Sorry for the delay.

Otherwise please go ahead without this PR, if it is merged just after a release it should be easy to use it as a patch, if needed.

Copy link
Member

@marvinfriede marvinfriede Apr 4, 2025

Choose a reason for hiding this comment

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

No worries, just wanted to check on the current status. We will make the release some time next week then.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Unfortunately I don't have access to our ARM system this week. I'll try to find an alternative to finish this off tomorrow, but please don't wait on me for a release. Sorry about the delays!

Copy link
Member

Choose a reason for hiding this comment

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

Ok, then we will make the release now. There will be another release soon anyway, containing a new charge model.

Copy link
Member

Choose a reason for hiding this comment

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

@RMeli We implemented the new charge model and would make another release. Any chance, you are able to fix this issue in the near future?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@marvinfriede sorry, I dropped the ball on this. I'll try to resuscitate the work I did so far.

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

Successfully merging this pull request may close these issues.

3 participants