From 2a4bc347def9711d272652594f63b36ac73bc35c Mon Sep 17 00:00:00 2001 From: Emanuel Gull Date: Tue, 23 Jun 2026 11:06:27 +0200 Subject: [PATCH] fix: replace removed cudaDeviceProp::memoryClockRate for CUDA 13 compatibility cudaDeviceProp::memoryClockRate was removed in CUDA 13. Use the driver API cuDeviceGetAttribute with CU_DEVICE_ATTRIBUTE_MEMORY_CLOCK_RATE instead, which returns the same value in kHz and is available across all CUDA versions. Co-Authored-By: Claude Sonnet 4.6 --- src/cuda_check.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/cuda_check.cpp b/src/cuda_check.cpp index 7435e5f..8f79d8a 100644 --- a/src/cuda_check.cpp +++ b/src/cuda_check.cpp @@ -36,7 +36,9 @@ void check_for_cuda(MPI_Comm global_comm, int global_rank, int &devCount_per_nod cudaGetDeviceProperties(&prop, i); std::cout<<"Device Number: " << i << std::endl; std::cout<<" Device name: " << prop.name << std::endl; - std::cout<<" Peak Memory Bandwidth (GB/s): "<<2.0*prop.memoryClockRate*(prop.memoryBusWidth/8)/1.0e6<