-
Notifications
You must be signed in to change notification settings - Fork 96
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 harness, 2023 edition #259
base: master
Are you sure you want to change the base?
Conversation
I think I'm done again with this for the year. Below are the more important changes (that I remember) beyond #233. There's simply so many ways of building this project that I surely haven't tried them all, but tests and psi4 usage are in good shape.
|
@evaleev Are there blockers for a review here? I think this PR is quite important for the future of libint. It would be a shame if this work goes to waste. |
fwiw, @timostrunk and @hadim, my current hope is to get the #269, #270, #271 PRs (cummulative) that address the run-time parts of this one merged and released. Doing that can release the psi4 and downstream blocks. If that goes through, I can rebase/refactor this PR to deal with the remaining build-/detection-time changes. |
@loriab let me know what the status of this is, would be great to get this saga finished before 2024 |
Ah, from what I recall, the basic status is:
I'd dearly like to get this finished before 2024, too. But I think it'll take enough revising that I can't work on it until mid-Dec. This PR isn't a big change for L2 users, but I suspect it'd be convenient for the devs in the new flurry of work. I'd propose a release w/o this PR soon for user continuity, then I'll try to patch this up this year, and perhaps your group can field test it a bit before a 2024 release. |
No problem at all.
Yes, @JonathonMisiewicz could use this now. Not a show-stopper, but would be good to finally get this checked off. |
Hi @loriab, I have some comments about the design, but I think they will be better addressed after this one is merged. Basically some of the ideas are in LecrisUT/CMake-Template#1, but we should discuss them there since it is a smaller more flexible template project. For this PR, I only have one non-blocking comment, can you explain a bit about |
FYI, @LecrisUT, this won't be merged as-is. The user-facing code parts have already been merged as PRs 269, 270, 271. What's left is the builder-facing CMake parts that I'm reexamining and hopefully PRing in pieces rather than en masse, starting with 299. Yeah, |
I think the decision would depend on how much the subproject is designed to be a subproject vs a standalone project. If it's the latter, I would agree that the latter option is a good intermediate. But whenever possible I would suggest going for
That is odd. The only thing that comes to mind is if the sub-project is not designed to be a subproject. At the same time, this is quite an odd design with the packing and unpacking and would need to look more deeply. But if you need another pair of eyes on such issues, let me know. |
I can't imagine how to make Libint properly subprojectable without a lot of logic duplication. The key benefit of We could give user the option of building/running the compiler at configure time, but that seems fragile as well. |
That seems similar to things that I've done on |
The libint project contains a compiler, which generates a libint library. The library code is packaged into a cmake project, and consumed by others as a tarball (I use FetchContent for that). There is an infinite number of configurations, so we can only ship a few we (I) care about. The main complexity stems from a large number of use cases. Libint devs want to be able to build the whole thing starting from the compiler and don't care about subprojectability. Most libint users want to consume the library, not the compiler. Since library generation is expensive, we don't generate at configure time. Thus the need for a separate library generation step. In superbuild scenario this is fine, but in the common (FetchContent) scenario we must have the library already generated. This is why I never cared about making the compiler build harness to be cmake ... but still there are good reasons to (thanks, @loriab!) |
Ok, then this sounds like
Then this is the same design as for
Note that with
That should not be the case. As long as the appropriate CMake targets are made available, CMake would be able to compile the generated libint library before it is consumed by a linker. |
EFV can correct me if I'm wrong, but probably we're not looking to restructure the build from this PR. The number of people running the actual compiler/generator step of libint are about 2 * number_of_qc_pkgs_using_libint + number_of_misc_packagers + everyone_in_the_Valeev_group = ~few_dozen . So as long as a scheme improves the lives of developers (with end-to-end cmake generate/build/test) and improves the lives of consumers (ease of embedding configuration info into library with components, as you say), I think it's doing its duty. The PR scheme has been steady in Psi4 for the past 2y, so apart from exploring configuration space I haven't touched but mpqc/nwchemex might, I'm confident in its utility. |
I agree, but the impact of doing this on maintainability (due to the need to also support building the targets in standalone library harness ... so much logic is duplicated) coupled with roughly 0.01 developer/year allocated to libint makes this a nonstarter. We confine all the library target logic to the library harness which cannot be configured until the compiler had a chance to run.
Agreed. |
This is a squash of #233 (2022) based on #205 (2021) that includes #148 (2019) followed by rebase to master (2023).
Ignore for a bit. It's passed some local sanity checks, and this'll start the GHA check, but I haven't checked moved files very carefully or even looked into the new python build or arbitrary order derivative changes that were in master.