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

Bundled Kokkos + CUDA #15432

Closed
drwells opened this issue Jun 22, 2023 · 2 comments · Fixed by #15435
Closed

Bundled Kokkos + CUDA #15432

drwells opened this issue Jun 22, 2023 · 2 comments · Fixed by #15435

Comments

@drwells
Copy link
Member

drwells commented Jun 22, 2023

It looks like we can't configure our bundled copy of Kokkos to use CUDA - is this expected? I see the following message:

-- DEAL_II_WITH_KOKKOS has unmet external dependencies.
-- 
-- DEAL_II_WITH_KOKKOS successfully set up with bundled packages.
-- 
-- Include /home/drwells/Documents/Code/CPP/dealii/cmake/configure/configure_40_cuda.cmake
-- DEAL_II_WITH_CUDA has unmet external dependencies.
CMake Error at cmake/configure/configure_40_cuda.cmake:103 (message):
  

  Could not find any suitable cuda library!

  deal.II can only be compiled with Cuda support if Kokkos was built with
  Cuda support!

How hard would it be to build our own Kokkos with CUDA support? I would like to do this so I can test step-64.

@masterleinad
Copy link
Member

We hardcode the Kokkos configuration to only provide the Serial backend for the bundled Kokkos copy so that we can avoid running Kokkos whole CMake configuration. It's not feasible to support building different backends if we don't commit to use Kokkos' build system.
If you want to test step-64, I would just use an external Kokkos installation (although step-64 shouldn't really need Cuda support anymore anyway) like we do in our CI

- uses: actions/checkout@v3
with:
repository: kokkos/kokkos
ref: 3.7.00
path: kokkos
- name: compile and install kokkos
working-directory: kokkos
run: |
mkdir build
cd build
cmake -D BUILD_SHARED_LIBS=ON \
-D CMAKE_CXX_COMPILER=${GITHUB_WORKSPACE}/kokkos/bin/nvcc_wrapper \
-D CMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/../kokkos-install \
-D Kokkos_ENABLE_CUDA=ON \
-D Kokkos_ENABLE_CUDA_LAMBDA=ON \
-D Kokkos_ENABLE_CUDA_CONSTEXPR=ON \
-D Kokkos_ARCH_VOLTA70=ON \
..
make install
.

@drwells
Copy link
Member Author

drwells commented Jun 22, 2023

Thanks - I'll try that out and also see if I can put a better error message in the build system.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants