Skip to content

CUDA build fixes and nvcc warning cleanup - #3565

Merged
asalmgren merged 6 commits into
erf-model:developmentfrom
llnl:dg/ci_check_cuda13_matrix
Aug 7, 2026
Merged

CUDA build fixes and nvcc warning cleanup#3565
asalmgren merged 6 commits into
erf-model:developmentfrom
llnl:dg/ci_check_cuda13_matrix

Conversation

@debog

@debog debog commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Fixes four CUDA build failures and warning sources found on LLNL LC Matrix (nvcc 13.1.1, ERF_ENABLE_TESTS=ON), plus the report-gate pattern that hid them. Each failure masked the next, so they surfaced serially after #3548.

  • Tests/CMakeLists.txt: compile the six test-helper executables via setup_target_for_cuda_compilation(). They link AMReX::amrex and include the generated AMReX_Config.H, so AMREX_USE_CUDA is defined and AMReX_GpuReduce.H requires <cub/cub.cuh>; built as plain CXX they receive no CUDA include path and fail. Latent since Add native SHOC state-update regression coverage #3492 added Tests/ShocPlotfileCheck.cpp, and invisible upstream because ERF_ENABLE_TESTS defaults to OFF and cuda-ci.yml does not set it.
  • Tests/Unit/Microphysics/SatAdj/ERF_GTestSatAdjTemperatureDiagnostics.cpp: move the ParallelFor into a free function. nvcc rejects an extended __device__ lambda whose enclosing function has private class access, which googletest's TestBody always has. Introduced by Cloud Chamber initialization, wall fluxes, and budgets - Stage 1 #3527; currently failing cuda-ci.yml on development.
  • Source/Microphysics/{SAM,Kessler,Morrison,WSM6,SuperDropletsMoist}: add using NullMoist::Update_Micro_Vars;. Cloud Chamber initialization, wall fluxes, and budgets - Stage 1 #3527 added a second Update_Micro_Vars(MultiFab&, const MultiFab*) overload to NullMoist; classes overriding only the single-argument form hide it, emitting nvcc #611-D roughly 700 times per build. Dispatch is unchanged. Support reference-state thermodynamics in anelastic microphysics #3564 covers all of these except SuperDropletsMoist by overriding both overloads.
  • Source/TimeIntegration/ERF_SlowRhsPre.cpp: remove the dead z_t (#550-D), unused since Fix problem of omega not having enough ghost cells when used in creat… #3342.
  • .github/workflows/cuda-ci.yml: the report gate greps warning:|error:, which never matches nvcc's warning #NNN-D:. Run 31113179047 at 1ecf606ea logged 818 #611-D diagnostics and reported Warnings: 1.

@debog
debog marked this pull request as ready for review August 7, 2026 19:39
@asalmgren
asalmgren merged commit e2c55c7 into erf-model:development Aug 7, 2026
37 of 47 checks passed
@debog
debog deleted the dg/ci_check_cuda13_matrix branch August 7, 2026 19:48
@pressel

pressel commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

@debog, thanks for the fixes.

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 this pull request may close these issues.

3 participants