abacus-develop icon indicating copy to clipboard operation
abacus-develop copied to clipboard

ABACUS compiled with CUDA doesn't run when there is no GPU

Open Flying-dragon-boxing opened this issue 3 months ago • 3 comments

Describe the bug

When running ABACUS compiled with CUDA with no GPU, ABACUS shows this message and exits. Unexpected Device Error /home/mhchen_pkuhpc/mhchen_coe/lustre3/8_Hongxu/tmp/abacus-develop/source/source_base/module_device/output_device.cpp:72: cudaErrorNoDevice, no CUDA-capable device is detected

Expected behavior

Should run normally

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).

Flying-dragon-boxing avatar Oct 04 '25 11:10 Flying-dragon-boxing

Generally, no CUDA-capable device is detected this error is running on a host that does not have a graphics card, not a compilation problem.

tang070205 avatar Oct 14 '25 03:10 tang070205

Generally, no CUDA-capable device is detected this error is running on a host that does not have a graphics card, not a compilation problem.

I've got some clue. When device is set to cpu, ABACUS should not detect GPU device or execute source/source_base/module_device/output_device.cpp:72.

Flying-dragon-boxing avatar Oct 14 '25 03:10 Flying-dragon-boxing

Did you not set device cpu in the INPUT file? If you don't set it manually, it'll default to using gpu

tang070205 avatar Oct 14 '25 06:10 tang070205