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

Unable to build with haero and in-tree CMake based EKAT build #89

Open
cameronrutherford opened this issue Dec 20, 2022 · 2 comments
Open
Labels
build system kokkos Related to Kokkos C++

Comments

@cameronrutherford
Copy link
Collaborator

See #64 for the context where the first failure was noticed.

HAERO's exported CMake configuration installs an nvcc wrapper into install/bin for ease of use.

However, when performing an in-tree CMake build of EKAT, the CMAKE_CXX_COMPILER ends up pointing to the nvcc_wrapper in the HAERO source directory, rather than the one that is installed in install/bin.

This means that HAERO is dependent on it's own source directory when installing, and to resolve this issue, HAERO installations should be independent of the resource code.

To observe this issue, simply install HAERO per default mam4xx configuration using the GPU, delete the cloned HAERO source code, and then attempt to install mam4xx. You will see an error that no CMAKE_CXX_COMPILER can be found, where the error has the path where the HAERO source director was.

@jeff-cohere also witnessed this issue.

@jeff-cohere jeff-cohere added build system kokkos Related to Kokkos C++ labels Dec 20, 2022
@jeff-cohere
Copy link
Collaborator

The real solution in my opinion is to convince the EAMxx folks not to use in-tree builds for things like EKAT, because CMake build phases work in a way that makes these in-tree builds awkward. CMake's ExternalProject machinery is a far better way to handle third-party library builds. I don't think we can impose this on the EAMxx project at this point, so we might have to find a workaround for now.

@cameronrutherford
Copy link
Collaborator Author

The current workaround is to not delete the source files in CI, or when developing locally.

I agree that truly resolving this and not implementing just a workaround requires EAMMxx buy in

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build system kokkos Related to Kokkos C++
Projects
None yet
Development

No branches or pull requests

2 participants