Skip to content

[Fix][LTS]Change CMAKE_CXX_STANDARD to 17 for CUDA 13#6772

Merged
mohanchen merged 4 commits intoLTSfrom
ZhouXY-PKU-cuda13-LTS
Dec 19, 2025
Merged

[Fix][LTS]Change CMAKE_CXX_STANDARD to 17 for CUDA 13#6772
mohanchen merged 4 commits intoLTSfrom
ZhouXY-PKU-cuda13-LTS

Conversation

@ZhouXY-PKU
Copy link
Collaborator

@ZhouXY-PKU ZhouXY-PKU commented Dec 9, 2025

Linked Issue

Fix #6752
See also conda-forge/abacus-feedstock#78 and #6777

Unit Tests and/or Case Tests for my changes

This PR is a refactoring to improve maintainability and forward-compatibility. No new unit tests are added, as all existing functionality is intended to remain unchanged. The project's existing regression test suite is used to verify that this refactoring does not introduce any regressions across supported CUDA versions.

What's changed?

This PR introduces a CUDA compatibility layer to prepare the codebase for CUDA 13 support and centralize version-specific logic. The key changes are:

  1. API Compatibility: It provides a version-agnostic implementation for cufftGetErrorString, which has removed error codes in CUDA 13.
  2. Code Refactoring: Deprecated CUDA device properties (like clockRate, memoryClockRate, etc) which were removed in CUDA 13 have been moved from device.cpp into the new compatibility layer. This cleans up the main application logic and isolates version-specific code.
  3. Build System Update: CMakeLists.txt was updated to support user-specified CXX version.

The primary impact is that ABACUS can now be built with CUDA 13 without modifying the main application code. This also improves long-term maintainability by creating a dedicated place for future CUDA compatibility fixes.

Any changes of core modules? (ignore if not applicable)

There are no changes to the core solver modules (ESolver, HSolver, ElecState, Hamilt, Operator, or Psi). The changes are contained within the module_device infrastructure layer. The purpose of this refactoring is to abstract away hardware/driver-specific details from the core scientific modules, ensuring they remain unaffected by changes in the underlying CUDA toolkit.

@ZhouXY-PKU ZhouXY-PKU changed the title Update device.cpp [Fix][LTS]Change CMAKE_CXX_STANDARD to 17 for CUDA 13 Dec 9, 2025
@ZhouXY-PKU ZhouXY-PKU marked this pull request as draft December 9, 2025 14:46
@mohanchen mohanchen added GPU & DCU & HPC GPU and DCU and HPC related any issues Refactor Refactor ABACUS codes labels Dec 11, 2025
@ZhouXY-PKU ZhouXY-PKU marked this pull request as ready for review December 18, 2025 23:47
@ZhouXY-PKU ZhouXY-PKU added Bugs Bugs that only solvable with sufficient knowledge of DFT Compile & CICD & Docs & Dependencies Issues related to compiling ABACUS Interfaces Interfaces with other packages Long-Time Support (LTS) Issues related to LTS version labels Dec 18, 2025
@mohanchen mohanchen merged commit 2332ce6 into LTS Dec 19, 2025
24 of 25 checks passed
@ZhouXY-PKU ZhouXY-PKU deleted the ZhouXY-PKU-cuda13-LTS branch December 28, 2025 13:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bugs Bugs that only solvable with sufficient knowledge of DFT Compile & CICD & Docs & Dependencies Issues related to compiling ABACUS GPU & DCU & HPC GPU and DCU and HPC related any issues Interfaces Interfaces with other packages Long-Time Support (LTS) Issues related to LTS version Refactor Refactor ABACUS codes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants