Skip to content

Can‘t compile with USE_CUDA=1 and ENABLE_DEEPKS=1 simultaneously #5910

@xuan112358

Description

@xuan112358

Describe the bug

I can compile ABACUS with USE_CUDA=1 or ENABLE_DEEPKS=1.
But I can't compile with USE_CUDA=1 and ENABLE_DEEPKS=1 simultaneously.
The cmake error is:

CMake Error at cmake/FindMKL.cmake:87 (add_library):
add_library cannot create ALIAS target "IntelMKL::MKL" because another
target with the same name already exists.
Call Stack (most recent call first):
/home/xuan/03_library/libtorch-2.3.1/share/cmake/Caffe2/public/mkl.cmake:1 (find_package)
/home/xuan/03_library/libtorch-2.3.1/share/cmake/Caffe2/Caffe2Config.cmake:113 (include)
/home/xuan/03_library/libtorch-2.3.1/share/cmake/Torch/TorchConfig.cmake:68 (find_package)
CMakeLists.txt:499 (find_package)

-- Found Torch: /home/xuan/03_library/libtorch-2.3.1/lib/libtorch.so
-- Checking for one of the modules 'libxc'
-- Found Libxc: /home/xuan/03_library/libxc/libxc-5.2.3/lib/libxc.a
-- Found Libxc: version 5.2.3
-- Configuring incomplete, errors occurred!

I used oneapi of 2022. If I use the 2024 version, it seems that there is a mismatch between compiler and cudatoolkit, with the error of "Could not find librt library, needed by CUDA::cudart_static"
@dyzheng @caic99 @dzzz2001 Can you help me?

Expected behavior

No response

To Reproduce

No response

Environment

No response

Additional Context

No response

Task list for Issue attackers (only for developers)

  • Verify the issue is not a duplicate.
  • Describe the bug.
  • Steps to reproduce.
  • Expected behavior.
  • Error message.
  • Environment details.
  • Additional context.
  • Assign a priority level (low, medium, high, urgent).
  • Assign the issue to a team member.
  • Label the issue with relevant tags.
  • Identify possible related issues.
  • Create a unit test or automated test to reproduce the bug (if applicable).
  • Fix the bug.
  • Test the fix.
  • Update documentation (if necessary).
  • Close the issue and inform the reporter (if applicable).

Metadata

Metadata

Assignees

No one assigned

    Labels

    GPU & DCU & HPCGPU and DCU and HPC related any issuesMachine LearningIssues related to the DeePKS

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions