Skip to content

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

Merged
climbfuji merged 13 commits into
JCSDA:developfrom
rickgrubin-noaa:feature/kokkos
Aug 18, 2026
Merged

climbfuji merged 13 commits into
JCSDA:developfrom
rickgrubin-noaa:feature/kokkos

Conversation

@rickgrubin-noaa

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

Copy link
Copy Markdown
Contributor

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.

@climbfuji climbfuji mentioned this pull request Aug 18, 2026
7 of 11 tasks
@climbfuji
climbfuji merged commit 039352e into JCSDA:develop Aug 18, 2026
6 checks passed
@github-project-automation github-project-automation Bot moved this from In Progress to Done in spack-stack-2.2.x (2026 Q4) Aug 18, 2026
climbfuji pushed a commit that referenced this pull request Sep 8, 2026
…and MKL (#2118)

This PR adds:
- arborx to the UFS WM env package recipe ufs_weather_model_env/package.py
- an entry for the oneAPI compiler module to the oneAPI MPI and MKL package specs modules section

Package arborx is now added as a variant for ufs_weather_model_env, following on with the addition of kokkos and kokkos-kernels in PR #2088.

Per discussion with Ben Koziol re: CICE/CECE/CATChem components, envs were built for oneAPI and GCC with arborx, and with and without CUDA support. Testing leads to a preference for adding arborx but excluding CUDA support at this time.

Like kokkos / kokkos-kernels,arborx is added as a variant to ufs_weather_model_env/package.py (default=False) and is enabled only for ufs_weather_model_env.

arborx / kokkos / kokkos-kernels are spec'd to build with %cxx=gcc because for H100 GPUs, kokkos relies on nvcc_wrapper for CMake CUDA support, and GCC is the primary target host compiler suggested by NVIDIA, as it is known to provide broad stability. The test envs bear this out.

As well, for the backends chosen to be built for arborx and kokkos, GCC is preferred.

Comments are provided in configs/sites/tier1/ursa/packages.yaml to turn on CUDA support if desired in the future.

Lastly, for oneAPI package yaml files, an entry for the compiler is added to both the MPI and MKL specs modules section, so as to have MPI and MKL module successfully located and loaded at build time.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

[INSTALL]: kokkos & kokkos-kernels

4 participants