From cf516f8788bf37f543820ca8a465a581002f2eff Mon Sep 17 00:00:00 2001 From: Jiacheng Xu <13862180016@163.com> Date: Wed, 22 Jul 2026 14:16:52 +0800 Subject: [PATCH] cmake: require cuSolverMp 0.9.0 --- cmake/modules/SetupCuSolverMp.cmake | 15 +++++++++++---- docs/advanced/acceleration/cuda.md | 8 ++++++++ 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/cmake/modules/SetupCuSolverMp.cmake b/cmake/modules/SetupCuSolverMp.cmake index 7ad1af4789..6ce2be1899 100644 --- a/cmake/modules/SetupCuSolverMp.cmake +++ b/cmake/modules/SetupCuSolverMp.cmake @@ -44,12 +44,19 @@ function(abacus_setup_cusolvermp) endif() endif() - # Check minimum version requirement (>= 0.4.0) - if(CUSOLVERMP_VERSION_STR AND CUSOLVERMP_VERSION_STR VERSION_LESS "0.4.0") + # Check minimum version requirement (>= 0.9.0) + if(NOT CUSOLVERMP_VERSION_STR) + message(FATAL_ERROR + "Unable to detect the cuSOLVERMp version from ${CUSOLVERMP_VERSION_HEADER}. " + "ABACUS requires cuSOLVERMp >= 0.9.0." + ) + elseif(CUSOLVERMP_VERSION_STR VERSION_LESS "0.9.0") message(FATAL_ERROR "cuSOLVERMp version ${CUSOLVERMP_VERSION_STR} is too old. " - "ABACUS requires cuSOLVERMp >= 0.4.0 (NVIDIA HPC SDK >= 23.5). " - "Please upgrade your NVIDIA HPC SDK installation." + "NVIDIA documents an STEDC defect in cuSOLVERMp 0.4.2 through 0.8.0 that affects " + "non-power-of-two block sizes and certain 2D process grids; Syevd and " + "Sygvd use STEDC internally. " + "ABACUS requires cuSOLVERMp >= 0.9.0. Please upgrade cuSOLVERMp." ) endif() diff --git a/docs/advanced/acceleration/cuda.md b/docs/advanced/acceleration/cuda.md index 42c09859d7..7be2c2a243 100644 --- a/docs/advanced/acceleration/cuda.md +++ b/docs/advanced/acceleration/cuda.md @@ -24,6 +24,14 @@ To compile and use ABACUS in CUDA mode, you currently need to have an NVIDIA GPU - Install a driver and toolkit appropriate for your system (SDK is not necessary) +NVIDIA reports that cuSOLVERMp 0.4.2 through 0.8.0 contain an STEDC defect +affecting non-power-of-two block sizes and certain 2D process grids. Because +`Syevd` and `Sygvd` use STEDC internally, affected versions may fail or hang +during distributed diagonalization. ABACUS therefore requires cuSOLVERMp 0.9.0 +or newer when `ENABLE_CUSOLVERMP=ON`. The recommended stack is cuSOLVERMp 0.9.0 +with cuBLASMp 0.9.1. See the +[cuSOLVERMp 0.9.0 release notes](https://docs.nvidia.com/cuda/cusolvermp/release_notes/index.html#cusolvermp-v0-9-0) +for the upstream fix details. ## Building ABACUS with the GPU support: