Skip to content

Add support for kokkos / kokkos-kernels and cuda to unified-dev env - #2088

Open
rickgrubin-noaa wants to merge 13 commits into
JCSDA:developfrom
rickgrubin-noaa:feature/kokkos
Open

Add support for kokkos / kokkos-kernels and cuda to unified-dev env#2088
rickgrubin-noaa wants to merge 13 commits into
JCSDA:developfrom
rickgrubin-noaa:feature/kokkos

Conversation

@rickgrubin-noaa

@rickgrubin-noaa rickgrubin-noaa commented Aug 17, 2026

Copy link
Copy Markdown
Collaborator

Description

Add support for kokkos / kokkos-kernels and cuda (where appropriate) to the unified-dev env.

kokkos / kokkos-kernels each specify, per variants, two backends to be built: openmp and serial. Further, for host ursa, GPUs (H100) are available, thus +cuda cuda_arch=90 (-DKokkos_ARCH_HOPPER90=ON) is specified.

Version 5.1.1 for each was spec'd per what users have been testing with; see issue #2081. This can likely change and still result in concretization / build success.

Build Notes

kokkos / kokkos-kernels build with both GCC and Intel oneAPI compilers when cuda support is not requested. When cuda support is requested, they must be built with GCC, per this error message:

    /path/to/envs/<env>/install/none/none/cuda-13.3.0-aqm2afo/bin/../targets/x86_64-linux/include/crt/host_config.h:118:2:
    118 | #error -- unsupported Intel ICX compiler! The nvcc flag '-allow-unsupported-compiler' can be used to override this version check; however, using an unsupported host compiler may cause compilation failure or incorrect run time execution. Use at your own risk.

That message comes from NVIDIA nvcc, not from Kokkos. cuda does not support icx/icpx as a host compiler, and configuration per host_config.h.

Note also that #2066 is in play here; successful builds of test environments required not using module: stanzas for host-specific compiler+MPI and other packages (e.g. MKL) in yaml config files, in favor of pathing only.

Dependencies

Depends on JCSDA/spack-packages#80

Issues addressed

Resolves #2081

Applications affected

UFS WM

Systems affected

gaea-c6: no cuda support (no GPUs available)
ursa: with cuda support for H100s

Testing

  • CI: Note whether the automatic tests (GitHub actions tests that run automatically for every commit) pass or not
    • GitHub actions CI tests pass
    • GitHub actions CI tests do not pass (provide explanation)
    • GitHub actions CI tests skipped (provide explanation if necessary)
  • New tests added: List and describe any new tests added to GitHub actions
    • ...
  • Additional testing: Add information on any additional tests conducted
    • built test envs with and without cuda support on gaea-c6 and ursa; users requesting this change reported satisfactory resulrs

Checklist

  • This PR addresses one issue/problem/enhancement or has a very good reason for not doing so.
  • These changes have been tested on the affected systems and applications.
  • All dependency PRs/issues have been resolved and this PR can be merged.
  • All necessary updates to the documentation (spack-stack wiki) will be made when this PR is merged

@climbfuji climbfuji left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Nice work!

The CI tests don't cover the newly added packages, but from the conversation in the issue it is clear that the spack installs were successful and that downstream users successfully tested the installs.

@climbfuji

Copy link
Copy Markdown
Collaborator

Thanks for the work on the package and the pr review. I'll merge once the CI tests are done.

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

Labels

None yet

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

[INSTALL]: kokkos & kokkos-kernels

4 participants