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

[Trivial] Add ability to use system packages #1171

Merged
merged 4 commits into from
Sep 11, 2024

Conversation

Yurlungur
Copy link
Collaborator

@Yurlungur Yurlungur commented Sep 10, 2024

PR Summary

In issues #1168 and #1169 @yurivict pointed out that the default parthenon configuration is designed for supercomputers where system packages are not used easily. This of course makes sense in our context. However it apparently raises issues for packaging on, e.g., a unix distro.

This MR resolves #1169 by adding the cmake option PARTHENON_USE_SYSTEM_PACKAGES which is set to OFF by default. Enabling this automatically sets PARTHENON_IMPORT_KOKKOS to ON and also removes all instances (of which there is currently one) of NO_DEFAULT_PATH in find_package calls.

PR Checklist

  • Code passes cpplint
  • New features are documented.
  • Adds a test for any bugs fixed. Adds tests for new features.
  • Code is formatted
  • Changes are summarized in CHANGELOG.md
  • Change is breaking (API, behavior, ...)
    • Change is additionally added to CHANGELOG.md in the breaking section
    • PR is marked as breaking
    • Short summary API changes at the top of the PR (plus optionally with an automated update/fix script)
  • CI has been triggered on Darwin for performance regression tests.
  • Docs build
  • (@lanl.gov employees) Update copyright on changed files

Comment on lines +64 to +72
if (PARTHENON_USE_SYSTEM_PACKAGES)
option(PARTHENON_IMPORT_KOKKOS
"If ON, attempt to link to an external Kokkos library. If OFF, build Kokkos from source and package with Parthenon"
ON)
else()
option(PARTHENON_IMPORT_KOKKOS
"If ON, attempt to link to an external Kokkos library. If OFF, build Kokkos from source and package with Parthenon"
OFF)
endif()
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I considered using CMakeDependentOption here, but I want IMPORT_KOKKOS available and user-visible no matter which setting of PARTHENON_USE_SYSTEM_PACKAGES was chosen.

Copy link
Collaborator

@lroberts36 lroberts36 left a comment

Choose a reason for hiding this comment

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

LGTM. Maybe add a comment in building.rst in the PARTHENON_IMPORT_KOKKOS flag entry that it defaults to On when PARTHENON_USE_SYSTEM_PACKAGES is on.

@Yurlungur Yurlungur merged commit a0c665d into develop Sep 11, 2024
58 of 59 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Please remove NO_DEFAULT_PATH from 'find_package(Ascent REQUIRED NO_DEFAULT_PATH)'
4 participants