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

Please remove NO_DEFAULT_PATH from 'find_package(Ascent REQUIRED NO_DEFAULT_PATH)' #1169

Closed
yurivict opened this issue Sep 7, 2024 · 8 comments · Fixed by #1171
Closed

Comments

@yurivict
Copy link

yurivict commented Sep 7, 2024

here

It prevents cmake from finding the ascent package installed into a standard location.

@pgrete
Copy link
Collaborator

pgrete commented Sep 9, 2024

We've been following the Ascent recommendation, see https://ascent.readthedocs.io/en/latest/QuickStart.html#using-ascent-in-your-project

Also, I'm not even sure there's a "standard" location per se as I'm not aware of any system were Ascent is installed under a, say, /usr path.

Does this cause any issue on your end? Maybe we can fix those in a different way.

@yurivict
Copy link
Author

yurivict commented Sep 9, 2024

Also, I'm not even sure there's a "standard" location per se as I'm not aware of any system were Ascent is installed under a, say, /usr path.

The standard location is /usr/local/lib/cmake (among several others).
The find_package documentation describes the search algorithm.

Does this cause any issue on your end? Maybe we can fix those in a different way.

Yes, the Ascent package isn't found when NO_DEFAULT_PATH is present.

@Yurlungur
Copy link
Collaborator

It is very likely that the ascent developers recommend NO_DEFAULT_PATH to avoid using system libraries, which are likely not what ascent was linked against on supercomputing systems. This is exactly the opposite use-case for, e.g., OpenBSD. @pgrete I recomend we add a build option such as PARTHENON_USE_SYSTEM_PACKAGES which switches NO_DEFAULT_PATH off.

@pgrete
Copy link
Collaborator

pgrete commented Sep 10, 2024

Yes, that sounds like a good path forward.
I'm happy to add those changes once I'm back.
Otherwise, if @yurivict you'd like to take a stab at it, you're very welcome to.

@pgrete
Copy link
Collaborator

pgrete commented Sep 10, 2024

Now that I wrote it: From the point of packaging is there any issue with setting -DAscent_DIR=/usr or wherever Ascent is installed to by default?
Maybe that already fixes this issue (as some var would need to be set anyway).

@yurivict
Copy link
Author

yurivict commented Sep 10, 2024

Maybe that already fixes this issue (as some var would need to be set anyway).

No vars need to be set by default. find_package should just find the package in the standard location.

@Yurlungur
Copy link
Collaborator

I just went ahead and submitted an MR. #1171.

@Yurlungur
Copy link
Collaborator

@yurivict with this change you should be able to just set -DPARTHENON_USE_SYSTEM_PACKAGES=ON to automatically import Kokkos and use default system paths for Ascent.

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 a pull request may close this issue.

3 participants