Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
7844b53
Update BLT
smithsg84 Apr 2, 2026
923dbc1
Initial CUDA 13 work. Compiles and runs on RH9 with both CUDA 12 an…
smithsg84 Apr 3, 2026
d1b8a89
Merge remote-tracking branch 'origin/develop' into feature/smith84/cu…
smithsg84 Apr 3, 2026
e4e7db8
Style
smithsg84 Apr 3, 2026
2522afe
CUB location has changed in CUDA 13
smithsg84 Apr 8, 2026
9a7821b
Add CUDA 13 test to matrix suite
smithsg84 Apr 8, 2026
dc6d9f4
update camp
smithsg84 Apr 8, 2026
2cebf15
Adding more retional to questions for discussion
smithsg84 Apr 8, 2026
f02c310
Testing matrix CUDA build with modified spack package
smithsg84 Apr 10, 2026
7490bf4
Fixed directory structure
smithsg84 Apr 10, 2026
7c5465c
Deep sigh, fixing path again
smithsg84 Apr 10, 2026
a1bf791
Use development versions of BLT and Camp
smithsg84 Apr 10, 2026
0396164
Fix package testing paths
smithsg84 Apr 13, 2026
ab46365
Temporary mod to use branch of CAMP
smithsg84 Apr 14, 2026
8ab7ebe
Fixed typo
smithsg84 Apr 14, 2026
fc0bee7
Fix package URL
smithsg84 Apr 14, 2026
647c701
Revert camp version
smithsg84 Apr 14, 2026
87d308a
Increase RAJA job allocation time on matrix
smithsg84 Apr 15, 2026
6cce1f6
Merge branch 'develop' into feature/smith84/cuda-13-support
rhornung67 Apr 15, 2026
6740342
Update BLT and CAMP dependencies
smithsg84 May 7, 2026
e8674eb
Cleanup of temporary Spack package file
smithsg84 May 8, 2026
618c1e2
Merge branch 'develop' into feature/smith84/cuda-13-support
smithsg84 May 8, 2026
52b97b6
Working use-with-cmake test in both contexts and examples working in …
smithsg84 May 13, 2026
65ae965
Merge branch 'develop' into feature/smith84/cuda-13-support
smithsg84 May 21, 2026
e036025
Refix install so hosts-config.cmake is present when test are not built
smithsg84 May 22, 2026
a30c0fa
Reintegrate Cody changes
smithsg84 May 22, 2026
3d99495
Cleanup RAJA spack package
smithsg84 May 22, 2026
cb3d0bb
Adding a windows build only CI job
smithsg84 Jun 18, 2026
e5fe6ea
Cleanup
smithsg84 Jun 19, 2026
167375f
Fix indentation
smithsg84 Jun 19, 2026
73001cd
Incorrect reference
smithsg84 Jun 19, 2026
9578599
Simplify, avoid quoting issues
smithsg84 Jun 19, 2026
165959b
Fix YAML syntax
smithsg84 Jun 19, 2026
8690b47
Update camp submodule
smithsg84 Jun 19, 2026
8f327c8
Update camp
smithsg84 Jun 19, 2026
f92148e
Disable shared
smithsg84 Jun 19, 2026
15d1a37
Adding MS flags
smithsg84 Jun 20, 2026
43a6fa6
Remove temporary PR spack package files for updating cuda
smithsg84 Jun 24, 2026
2277bb9
Raja spack package was updated to use latest BLT release
smithsg84 Jun 24, 2026
dcd35a3
Merge branch 'develop' into feature/smith84/cuda-13-support
smithsg84 Jun 24, 2026
951e058
Update radius-spack-configs
smithsg84 Jun 24, 2026
bb9b6b8
Trigger CI pipeline
smithsg84 Jun 24, 2026
3f39c6b
Need current spack-packages for CUDA 13 support
smithsg84 Jun 24, 2026
bb6ff01
Remove spack-packages commit hash from uberenv and move to radius-spa…
smithsg84 Jun 25, 2026
e56d07b
Revert temporaroy testing radiuss-spack-configs fork to main repository
smithsg84 Jun 26, 2026
3e74194
Creating windows notes
smithsg84 Jun 26, 2026
e402d8d
Merge branch 'feature/smith84/cuda-13-support' into feature/smith84/c…
smithsg84 Jun 26, 2026
2fa75ef
Merge branch 'windows-cuda-build' into feature/smith84/ci-windows-cud…
smithsg84 Jun 26, 2026
0fdd459
Notes and added SGS patches
smithsg84 Jun 26, 2026
d22f4df
Fix stupid MS line ending reformating?
smithsg84 Jun 26, 2026
842377f
Update with CI job note
smithsg84 Jun 26, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,61 @@ jobs:
## - run: |
## dir -r D:\a\RAJA\RAJA\build\test
## ====================================
## Run tests action
- uses: threeal/ctest-action@v1.1.0
with:
build-config: Debug

build_windows_cuda:
strategy:
matrix:
shared:
- args:
BUILD_SHARED_LIBS=Off
- args:
BUILD_SHARED_LIBS=On
CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=On

# Running on Visual Studio 2022 for better CUDA 12 compatibility
# windows-2025 would be locked to Visual Studio 2026
# windows-latest can be changed by GitHub
runs-on: windows-2022

steps:
- uses: actions/checkout@v2
with:
submodules: recursive

- uses: Jimver/cuda-toolkit@v0.2.35
with:
cuda: '12.9.1'
sub-packages: '["nvcc", "visual_studio_integration", "cudart", "nvrtc", "thrust"]'

- name: Check CUDA
shell: pwsh
run: |
nvcc --version
echo "CUDA_PATH=$env:CUDA_PATH"

- uses: threeal/cmake-action@v1.3.0
with:
build-dir: build
options:
ENABLE_WARNINGS_AS_ERRORS=Off
BLT_CXX_STD="c++20"
CMAKE_CUDA_FLAGS="-Xcompiler=/TP"
CMAKE_CXX_STANDARD=20
CMAKE_BUILD_TYPE=Release
CMAKE_CUDA_ARCHITECTURES=75
ENABLE_CUDA=On
${{ matrix.shared.args }}
run-build: true
# build-args: '--parallel 16'
## ====================================
## Print the contents of the test directory in the build space (debugging)
## - run: |
## dir -r D:\a\RAJA\RAJA\build\test
## ====================================
## Run tests action
- uses: threeal/ctest-action@v1.1.0
with:
Expand Down
5 changes: 5 additions & 0 deletions .gitlab/jobs/matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,8 @@ clang_18_1_8_cuda_12_6_0:
variables:
SPEC: " ~shared +cuda cuda_arch=90 +tests %llvm@=18.1.8 ^cuda@12.6.0+allow-unsupported-compilers"
extends: .job_on_matrix

clang_18_1_8_cuda_13_1_1:
variables:
SPEC: " ~shared +cuda cuda_arch=90 +tests %llvm@=18.1.8 ^cuda@13.1.1+allow-unsupported-compilers"
extends: .job_on_matrix
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,12 @@ endif()

if(RAJA_ENABLE_TESTS)
add_subdirectory(test)
else()
# For Spack stand-alone tests need host config information for building simple
# examples even if full tests are not done.
configure_file(
test/install/using-with-cmake/host-config.cmake.in
${PROJECT_BINARY_DIR}/examples/using-with-cmake/host-config.cmake)
endif()

if(RAJA_ENABLE_REPRODUCERS)
Expand Down
2 changes: 1 addition & 1 deletion blt
Submodule blt updated 36 files
+1 −0 .gitignore
+4 −12 .gitlab-ci.yml
+13 −25 .gitlab/build_dane.yml
+0 −71 .gitlab/build_lassen.yml
+54 −0 .gitlab/build_matrix.yml
+5 −19 .gitlab/build_tioga.yml
+1 −1 README.md
+18 −3 RELEASE-NOTES.md
+1 −1 SetupBLT.cmake
+1 −1 cmake/BLTInstallableMacros.cmake
+19 −6 cmake/BLTMacros.cmake
+6 −9 cmake/SetupCompilerOptions.cmake
+7 −0 cmake/thirdparty/BLTSetupCUDA.cmake
+1 −1 docs/api/code_check.rst
+1 −1 docs/api/documentation.rst
+5 −6 docs/api/git.rst
+27 −27 docs/api/target.rst
+5 −8 docs/tutorial/common_hpc_dependencies.rst
+9 −9 docs/tutorial/host_configs.rst
+0 −67 host-configs/llnl/blueos_3_ppc64le_ib_p9/clang@10.0.1_nvcc_c++14_export_tpls.cmake
+0 −80 host-configs/llnl/blueos_3_ppc64le_ib_p9/clang@10.0.1_nvcc_c++14_xlf.cmake
+0 −64 host-configs/llnl/blueos_3_ppc64le_ib_p9/clang@10.0.1_nvcc_c++17.cmake
+0 −61 host-configs/llnl/blueos_3_ppc64le_ib_p9/clang@10.0.1_nvcc_c++17_no_separable.cmake
+0 −40 host-configs/llnl/blueos_3_ppc64le_ib_p9/clang@14.0.5_with_gcc@8.3.1_nvcc_c++_only.cmake
+2 −0 host-configs/llnl/toss_4_x86_64_ib/gcc@10.3.1_nvcc.cmake
+1 −1 host-configs/llnl/toss_4_x86_64_ib/intel@2022.1.0-c++17.cmake
+52 −0 host-configs/llnl/toss_4_x86_64_ib/intel@2025.2.0-c++20.cmake
+3 −2 tests/smoke/CMakeLists.txt
+10 −3 tests/smoke/blt_cuda_runtime_smoke.cpp
+14 −0 tests/smoke/blt_mpi_smoke.cpp
+2 −0 thirdparty_builtin/CMakeLists.txt
+7 −2 thirdparty_builtin/googletest-1.16.0/googletest/cmake/internal_utils.cmake
+6 −2 thirdparty_builtin/googletest-1.16.0/googletest/include/gtest/gtest-printers.h
+28 −0 thirdparty_builtin/patches/gtest-2025-12-08-fix-flag-change-intel-llvm.patch
+13 −0 thirdparty_builtin/patches/gtest-2025-12-09-remove-Winline.patch
+22 −0 thirdparty_builtin/patches/gtest-2026-01-20-quiet-implicit-cast-warning.patch
3 changes: 2 additions & 1 deletion cmake/thirdparty/FindCUB.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ find_path(CUB_INCLUDE_DIRS
HINTS
${CUB_DIR}/
${CUB_DIR}/include
${CUDA_TOOLKIT_ROOT_DIR}/include)
${CUDA_TOOLKIT_ROOT_DIR}/include
${CUDA_TOOLKIT_ROOT_DIR}/include/cccl)

find_package_handle_standard_args(
CUB
Expand Down
16 changes: 16 additions & 0 deletions include/RAJA/policy/cuda/MemUtils_CUDA.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,10 +146,26 @@ struct DevicePinnedAllocator
void* ptr;
CAMP_CUDA_API_INVOKE_AND_CHECK(cudaMallocManaged, &ptr, nbytes,
cudaMemAttachGlobal);
#if CUDART_VERSION >= 13000
cudaMemLocation devLoc {};
devLoc.type = cudaMemLocationTypeDevice;
devLoc.id = device;

CAMP_CUDA_API_INVOKE_AND_CHECK(cudaMemAdvise, ptr, nbytes,
cudaMemAdviseSetPreferredLocation, devLoc);

cudaMemLocation cpuLoc {};
cpuLoc.type = cudaMemLocationTypeHost;
cpuLoc.id = 0;

CAMP_CUDA_API_INVOKE_AND_CHECK(cudaMemAdvise, ptr, nbytes,
cudaMemAdviseSetAccessedBy, cpuLoc);
#else
CAMP_CUDA_API_INVOKE_AND_CHECK(cudaMemAdvise, ptr, nbytes,
cudaMemAdviseSetPreferredLocation, device);
CAMP_CUDA_API_INVOKE_AND_CHECK(cudaMemAdvise, ptr, nbytes,
cudaMemAdviseSetAccessedBy, cudaCpuDeviceId);
#endif

return ptr;
}
Expand Down
2 changes: 1 addition & 1 deletion scripts/radiuss-spack-configs
Submodule radiuss-spack-configs updated 35 files
+14 −0 .github/hubcast.yml
+263 −0 .github/workflows/track-spack-packages.yml
+0 −69 .gitlab/lassen.yml
+1 −1 .gitlab/scripts/get-spack
+0 −6 .gitlab/spack/ci.yaml
+1 −1 .gitlab/spack/envs/cached-cmake/pipeline.yml
+6 −6 .gitlab/spack/envs/cached-cmake/spack.yaml
+1 −1 .gitlab/spack/envs/shared-ci/pipeline.yml
+6 −6 .gitlab/spack/envs/shared-ci/spack.yaml
+0 −20 .gitlab/spack/reindex-lassen.yml
+0 −9 .gitlab/variables.yml
+29 −0 RELEASE_NOTES.md
+0 −24 blueos_3_ppc64le_ib/config.yaml
+0 −1 blueos_3_ppc64le_ib/lassen/config.yaml
+0 −489 blueos_3_ppc64le_ib/lassen/packages.yaml
+0 −1 blueos_3_ppc64le_ib/lassen/spack.yaml
+0 −505 blueos_3_ppc64le_ib/packages.yaml
+0 −12 blueos_3_ppc64le_ib/spack.yaml
+0 −1 blueos_3_ppc64le_ib_p9
+1 −1 docs/sphinx/ci_implementation/index.rst
+2 −2 docs/sphinx/user_guide/how_to.rst
+0 −36 gitlab/radiuss-jobs/lassen.yml
+2 −2 gitlab/radiuss-jobs/tioga.yml
+2 −2 gitlab/radiuss-jobs/tuolumne.yml
+0 −1 toss_4_x86_64_ib/dane/packages.yaml
+507 −0 toss_4_x86_64_ib/dane/packages.yaml
+1 −1 toss_4_x86_64_ib/matrix/config.yaml
+1 −1 toss_4_x86_64_ib/matrix/spack.yaml
+0 −1 toss_4_x86_64_ib/poodle/config.yaml
+0 −507 toss_4_x86_64_ib/poodle/packages.yaml
+0 −1 toss_4_x86_64_ib/poodle/spack.yaml
+1 −1 toss_4_x86_64_ib/spack.yaml
+53 −53 toss_4_x86_64_ib_cray/packages.yaml
+1 −1 toss_4_x86_64_ib_cray/spack.yaml
+53 −53 toss_4_x86_64_ib_cray/tioga/packages.yaml
+53 −53 toss_4_x86_64_ib_cray/tuolumne/packages.yaml
23 changes: 16 additions & 7 deletions test/unit/resource/tests/test-resource-AsyncTime.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,22 +32,31 @@ gpu_time_wait_for(float time, float clockrate) {
int get_clockrate()
{
int cuda_device = 0;
cudaDeviceProp deviceProp;
CAMP_CUDA_API_INVOKE_AND_CHECK(cudaGetDevice, &cuda_device);
CAMP_CUDA_API_INVOKE_AND_CHECK(cudaGetDeviceProperties, &deviceProp, cuda_device);
if ((deviceProp.concurrentKernels == 0))

int concurrentKernels = 0;
CAMP_CUDA_API_INVOKE_AND_CHECK(cudaDeviceGetAttribute,
&concurrentKernels,
cudaDevAttrConcurrentKernels,
cuda_device);

if (concurrentKernels == 0)
{
printf("> GPU does not support concurrent kernel execution\n");
printf(" CUDA kernel runs will be serialized\n");
return -1;
}
//printf("> Detected Compute SM %d.%d hardware with %d multi-processors\n",
// deviceProp.major, deviceProp.minor, deviceProp.multiProcessorCount);

int clockRate = 0;
CAMP_CUDA_API_INVOKE_AND_CHECK(cudaDeviceGetAttribute,
&clockRate,
cudaDevAttrClockRate,
cuda_device);

#if defined(__arm__) || defined(__aarch64__)
return deviceProp.clockRate/1000;
return clockRate / 1000;
#else
return deviceProp.clockRate;
return clockRate;
#endif
}

Expand Down
192 changes: 192 additions & 0 deletions tmp-windows-cuda-notes/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,192 @@
# RAJA Build with CUDA on Windows

## Window CUDA CI build

A Windows CUDA CI job was added. Not working since the RAJA compile is not working.

See ../.github/workflows/build.yml

Should adjust CUDA and MSVCC versions when a working compile.

Do we want to test multiple CUDA MSVCC versions?

## MS toolchain

### Install Visual Studio

2026 https://visualstudio.microsoft.com/downloads/
2022 https://aka.ms/vs/17/release/vs\_community.exe

Steve : tried both initially to see if one would show fewer errors. The errors seem to be mostly the same for both so used 2026.

NOTE: MS seems to remove references to old VS community versions, found above 2022 link on reddit not sure how long links remain for the old versions.
Paid subscribers can get access to the old VS versions.

### Install Cmake

https://cmake.org/download/

### Install Git

https://git-scm.com/install/windows

### Install CUDA

https://developer.nvidia.com/cuda-downloads

Steve: Tried both CUDA 12 and CUDA 13. Both had issues so went with CUDA 13 since we have added support for it.

## Git stuff

All generic stuff. Added a key for GitHub.

```
ssh-keygen -t ed25519 -C "smith84@llnl.gov"
type %userprofile%\\.ssh\\id\_ed25519.pub | clip

git clone --recursive git@github.com:llnl/RAJA.git
```

## Failed attempts to build.

Steve : Tried combinations of MSVCC 2022 and 2026 with Cuda 12 and 13 to see if some combination might work....needed to start deeper patching.

## Steve patching

### BLT

Apply the blt.patch to fix argument passing to MSVCC. nvcc does not pass "/arg" to MSVCC by default which causes nvcc to interpret the arguments as directories/files.

Kenny has similar patch for blt in AXOM branch.

```

cd blt

git apply ..\\tmp-windows-cuda-notes\\blt.patch

```

### Camp

MSVCC has issue parsing variadic macros. Uses non-standard CPP parser. Did come up with patch for CAMP but Nvidia CUDA 13 recommends using the "-Xcompiler=/Zc:preprocessor" flag which uses more standard conforming CPP. Seemed more reasonable approach.

Camp patch is in camp-variadic.patch.

## RAJA config/build

CUDA 13 recommends the preprocessor flag and fix a CAMP issue. MSVCC uses some non-standard conforming parsing if this is not done.

"/TP" treats .C files as C++. Was fixing some issues with CUDA 12 toolkit during initial attempts but should double check this requirement.

```
cmake -B cudabuild RAJA -DENABLE\_CUDA=ON -DCMAKE\_CUDA\_FLAGS=" --keep -Xcompiler=/TP -Xcompiler=/Zc:preprocessor" -DCMAKE\_CUDA\_ARCHITECTURES=75

```

```
cmake --build cudabuild --target atomic-histogram\_solution > zz.build.txt 2>\&1
```

Steve: reached a point with a template issue, which above build exposes.

```
 atomic-histogram\_solution.cpp
  atomic-histogram\_solution.cudafe1.cpp
C:\\Users\\smith84\\projects\\raja\\clean\\RAJA\\include\\RAJA/index/IndexSet.hpp(754): warning C4244: 'return': conversion from '\_\_int64' to 'int', possible
 loss of data \[C:\\Users\\smith84\\projects\\raja\\clean\\cudabuild\\exercises\\atomic-histogram\_solution.vcxproj]
C:\\Users\\smith84\\projects\\raja\\clean\\RAJA\\include\\RAJA/index/IndexSet.hpp(759): warning C4244: 'return': conversion from 'const \_\_int64' to 'int', po
ssible loss of data \[C:\\Users\\smith84\\projects\\raja\\clean\\cudabuild\\exercises\\atomic-histogram\_solution.vcxproj]
C:\\Users\\smith84\\projects\\raja\\clean\\cudabuild\\exercises\\atomic-h.9E0645A7\\x64\\Debug\\atomic-histogram\_solution.cudafe1.stub.c(37): error C2912: expli
cit specialization 'void RAJA::policy::cuda::impl::\_\_wrapper\_\_device\_stub\_forallp\_cuda\_kernel<RAJA::policy::cuda::cuda\_exec\_explicit<RAJA::iteration\_
mapping::Direct,RAJA::cuda::IndexGlobal<RAJA::named\_dim::x,256,0>,RAJA::CudaDefaultConcretizer,1,false>,1,RAJA::Iterators::numeric\_iterator<StorageT,
DiffT,Type \*>,\_\_nv\_dl\_wrapper\_t<\_\_nv\_dl\_tag<int (\_\_cdecl \*)(int,char \*\*),\&int main(int,char \*\*),1>,int \*,int \*>,int,RAJA::expt::ForallParamPack<>,RAJ
A::iteration\_mapping::Direct,RAJA::cuda::IndexGlobal<RAJA::named\_dim::x,256,0>,256>(const \_ZN4camp5decayIZ4mainEUliE0\_EE \&,const \_ZN4camp5decayIN4RAJ
A9Iterators16numeric\_iteratorIiiPiEEEE \&,const \_ZN4camp5decayIiEE \&,\_ZN4camp5decayIN4RAJA4expt15ForallParamPackIJEEEEE \&)' is not a specialization of
&#x20;a function template \[C:\\Users\\smith84\\projects\\raja\\clean\\cudabuild\\exercises\\atomic-histogram\_solution.vcxproj]
&#x20; with
&#x20; \[
&#x20; StorageT=int,
&#x20; DiffT=int,
&#x20; Type=int
&#x20; ]
C:\\Program Files\\Microsoft Visual Studio\\18\\Community\\MSBuild\\Microsoft\\VC\\v180\\BuildCustomizations\\CUDA 13.3.targets(804,9): error MSB3721: The comm
and ""C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v13.3\\bin\\nvcc.exe" --use-local-env -ccbin "C:\\Program Files\\Microsoft Visual Studio\\18\\Com
munity\\VC\\Tools\\MSVC\\14.51.36231\\bin\\HostX64\\x64" -x cu -IC:\\Users\\smith84\\projects\\raja\\clean\\RAJA\\include -IC:\\Users\\smith84\\projects\\raja\\clean\\
cudabuild\\include -IC:\\Users\\smith84\\projects\\raja\\clean\\RAJA\\tpl\\camp\\include -IC:\\Users\\smith84\\projects\\raja\\clean\\cudabuild\\tpl\\camp\\include -I"C
:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v13.3\\include" -I"C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v13.3\\include\\cccl" -I"C:\\Prog
ram Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v13.3\\include" -G --keep --keep-dir atomic-h.9E0645A7\\x64\\Debug -maxrregcount=0 --machine 64 --com
pile -cudart static -forward-unknown-to-host-compiler -restrict --expt-extended-lambda --expt-relaxed-constexpr -Xcudafe --display\_error\_number -O0 -
std=c++20 --generate-code=arch=compute\_75,code=\[compute\_75,sm\_75] -Xcompiler="/TP /Zc:preprocessor" -g -DRAJA\_WIN\_STATIC\_BUILD -DCAMP\_WIN\_STATIC\_BUI
LD -D"CMAKE\_INTDIR=\\"Debug\\"" -D\_MBCS -DWIN32 -D\_WINDOWS -DRAJA\_WIN\_STATIC\_BUILD -DCAMP\_WIN\_STATIC\_BUILD -D"CMAKE\_INTDIR=\\"Debug\\"" -Xcompiler "/EHsc
&#x20;/W3 /nologo /FS /Zi /RTC1 /MTd /GR" -Xcompiler "/Fdatomic-histogram\_solution.dir\\Debug\\vc145.pdb" -o atomic-histogram\_solution.dir\\Debug\\atomic-his
togram\_solution.obj "C:\\Users\\smith84\\projects\\raja\\clean\\RAJA\\exercises\\atomic-histogram\_solution.cpp"" exited with code 2. \[C:\\Users\\smith84\\projec
ts\\raja\\clean\\cudabuild\\exercises\\atomic-histogram\_solution.vcxproj]
```

## Kenny Weiss work on AXOM

Steve : Learned of Kenny branch of AXOM. Kenny took Steve's CUDA 13 branch and made patches with extra fixes for Windows. Steve was starting to parse through Kenny patching. The template issue above might be have been similar to what is patched in "kweiss-windows-cuda-msvc.patch" pulled from Kenny's repository. Current RAJA has modified the templates so this needs some work.

Steve goes on vacation :(

Kenny/AI found some other changes, note Kenny was using VS 2022 and Cuda 13.

## Kenny Notes:

Hi Steve,

I do!

(CC-ing Rich and Brian Han since they’re also likely interested in the details)

I’m still working through some of the details, so I haven’t created a PR yet, but the branch is here: https://github.com/llnl/axom/compare/develop...feature/kweiss/windows-gpu

I used codex w/ gpt@5.5 to work through a bunch of the issues. The compilation times on my laptop (6 core i7; I forget the GPU, but it was CUDA\_ARCHITECTURE 75) can be really long, so each round took a few hours, but it eventually got there.

Axom uses vcpkg (https://github.com/microsoft/vcpkg) through uberenv ( https://github.com/llnl/uberenv/ | https://uberenv.readthedocs.io/en/latest/)

to manage our TPLs on windows. We manage some local ports of raja, umpire, mfem, conduit, … inside of axom’s ./scripts/vcpkg\_ports directory.

(ports are equivalent to spack package recipes)

To get this working w/ uberenv, I had to add some slight edits: https://github.com/llnl/uberenv/pull/160 -- which should be merged soon

I also have a few changes to BLT, but I haven’t yet looked closely enough to determine which are strictly necessary, and haven’t posted a PR/branch to BLT’s github yet

My branch has a bunch of updates to our vcpkg ports to get raja, umpire and camp to build on msvc+cuda.

Since my build uses cuda@13, I needed some patches from your raja and camp PRs related to cuda@13.

To set up my build environment on Windows, I had to install:

the cuda toolkit ( https://developer.nvidia.com/cuda-downloads -- I am using cuda@13)

MS visual studio community ( https://visualstudio.microsoft.com/vs/community/ --

I am using visual studio community 2022. Presumably it’d work w/ visual studio community 2026 ).

If you need MPI, you also need to install MS MPI -- https://learn.microsoft.com/en-us/message-passing-interface/microsoft-mpi

Some gotchas in my msvc+cuda porting:

cuda@13 has some changes (but you’re clearly aware of those)

MSVC does not support extended lambdas inside of if constexpr --

See item 11 in Section 5.3.8.4 -- https://docs.nvidia.com/cuda/cuda-programming-guide/05-appendices/cpp-language-support.html#extended-lambda-restrictions

Microsoft defines some regular words as macros, e.g. min, max, small, large

I hope this helps and would be happy to discuss this further/answer questions,

Kenny

\--

Kenneth Weiss

Numerics, Modular Applications and Performance Group Leader

ASQ Division, Computing Directorate, LLNL

28 changes: 28 additions & 0 deletions tmp-windows-cuda-notes/blt.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
diff --git a/thirdparty_builtin/CMakeLists.txt b/thirdparty_builtin/CMakeLists.txt
index 74a4f8d..56c59a3 100644
--- a/thirdparty_builtin/CMakeLists.txt
+++ b/thirdparty_builtin/CMakeLists.txt
@@ -111,10 +111,19 @@ if(ENABLE_TESTS)
#
# For more info see: https://github.com/LLNL/blt/issues/79
#
-
- blt_append_custom_compiler_flag( FLAGS_VAR gtest_extra_flags
- DEFAULT " "
- MSVC "/wd4251" "/wd4275" )
+ if(MSVC AND ENABLE_CUDA)
+ # For CUDA nvcc compiler pass arg to MSVCC with -Xcompiler
+ set(gtest_extra_flags
+ "$<$<NOT:$<COMPILE_LANGUAGE:CUDA>>:/wd4251>"
+ "$<$<NOT:$<COMPILE_LANGUAGE:CUDA>>:/wd4275>"
+ "$<$<COMPILE_LANGUAGE:CUDA>:-Xcompiler=/wd4251>"
+ "$<$<COMPILE_LANGUAGE:CUDA>:-Xcompiler=/wd4275>"
+ )
+ else()
+ blt_append_custom_compiler_flag( FLAGS_VAR gtest_extra_flags
+ DEFAULT " "
+ MSVC "/wd4251" "/wd4275" )
+ endif()

set (INSTALL_GMOCK OFF CACHE BOOL "")
set (INSTALL_GTEST OFF CACHE BOOL "")
Loading
Loading