-
Notifications
You must be signed in to change notification settings - Fork 35
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
Add capability to autoinstall grackle #415
base: main
Are you sure you want to change the base?
Conversation
5925ec2
to
2c85225
Compare
Setting Next time |
As a brief followup, it appears that doing this is discouraged by the cmake developers. I think there are potentially some workarounds. For Grackle in particular, I'm not too worried (we provide plenty of instructions for installing it through other methods). |
…re building sphinx docs
…re-built versions of grackle to have used the CMake build-system
This is almost done! I just need to manually confirm that builds will work if you try to pre-install Grackle (with the CMake build-system). It should "just work" Following a previous discussion, we no longer support grackle installations that used Grackle's "classic buildsystem" (i.e. the one inherited from Enzo-Classic) |
Pull request summary
This adds the ability to auto-install Grackle
Detailed Description
This depends on #414 and on grackle-project/grackle#182. But I think it's probably worth discussing now.
The main goal is to make installation of Enzo-E more seamless for end-users (or new developers). I want feedback in 3 main areas: (i) how to enable/disable, (ii) whether to use git-submodules or cmake's
FetchContent
feature, and (iii) how to handle CI.1. How to enable this feature:
Right now, the proposed out-of-box behavior is to always automatically download and build Grackle during a build.
-DUSE_EXTERNAL_GRACKLE=ON
.-DUSE_GRACKLE=OFF
I think this would provide a nice experience for first-time users. But there are some potential caveats:
USE_GRACKLE
option (maybe"EXTERNAL"
to prefer a pre-existing installation and"EMBED"
for automatic downloading?). But if we eventually decide to make Grackle a mandatory requirement,1 we would probably just drop theUSE_GRACKLE
option altogether.An alternative idea for the default behavior is to first search for an existing Grackle installation and then fall back to downloading Grackle if we can't find it -- we would still provide the option to force one of the choices.
FindGrackle.cmake
module might not be robust enough for this (as a reminder, this is a special module that provides heuristic instructions in the general search for Grackle)GrackleConfig.cmake
alongside the grackle libraries. (That file directly provides CMake with information about the installation and is considered to be more robust that the aforementioned find-module).Do people have thoughts on this? I suspect that my "alternative idea for the default behavior" is probably worth trying.
2. Should we use git-submodules or
FetchContent
?I implemented this in terms cmake's
FetchContent
feature. With that said, it's unclear whether it would be better for us to use git-submodules. I've highlighted the pro's and cons down below:Advantages of
FetchContent
:FetchContent
andfind_package
(reminder: the latter is used to find existing installations). Until then, we need to manually provide arguments to switch between the 2 choices (just as we would do for git-submodules)-DFETCHCONTENT_SOURCE_DIR_GRACKLE=<path/to/grackle>
.Disadvantages of
FetchContent
:FETCHCONTENT_SOURCE_DIR_GRACKLE
variable, cmake won't try to download anything.I'm really not sure what to do here. From the perspective of a user, who treats the build-system as a black box, the
FetchContent
approach might be a little simpler. From a developer perspective, I also like functionality provided by setting theFETCHCONTENT_SOURCE_DIR_GRACKLE
variable. Furthermore, if we start doing automatic dependency management of a few additional dependencies (likefmt
),FetchContent
may be better (I thinkFetchContent
may even be able to handlelibtorch
). With that said, most of the other advantages aren't really relevant right now (so it may make more sense with git-submodules).I'm curious to hear people's thoughts.
3. How to handle CI
At the moment, Continuous Integration is using the new auto-download feature. This is mostly for testing purposes. With that said, it may makes sense to switch back to using the older-style approach (especially for gold-standard testing where we need to support rebuilds)...
What do you think?
This is a major change or addition (that needs 2 reviewers): unsure
PR Checklist
Footnotes
I think this is a worthwhile discussion, especially if auto-installation of grackle works well. But, I think we should hold off on that until after we're satisfied with the robustness of this system. ↩