Skip to content

Feature: DeltaSpin for LCAO and PW base and DFTU for PW, both collinear and noncollinear spin (code change and UTs)#7384

Open
dyzheng wants to merge 5 commits into
deepmodeling:developfrom
dyzheng:feat/port-dftu-ds-code-v4
Open

Feature: DeltaSpin for LCAO and PW base and DFTU for PW, both collinear and noncollinear spin (code change and UTs)#7384
dyzheng wants to merge 5 commits into
deepmodeling:developfrom
dyzheng:feat/port-dftu-ds-code-v4

Conversation

@dyzheng
Copy link
Copy Markdown
Collaborator

@dyzheng dyzheng commented May 26, 2026

Reminder

  • Have you linked an issue with this pull request?
  • Have you added adequate unit tests and/or case tests for your pull request?
  • Have you noticed possible changes of behavior below or in the linked issue?
  • Have you explained the changes of codes in core modules of ESolver, HSolver, ElecState, Hamilt, Operator or Psi? (ignore if not applicable)

Linked Issue

Fix #...

Unit Tests and/or Case Tests for my changes

  • A unit test is added for each new feature or bug fix.

What's changed?

  • Example: My changes might affect the performance of the application under certain conditions, and I have tested the impact on various scenarios...

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

  • Example: I have added a new virtual function in the esolver base class in order to ...

dyzheng added 5 commits May 26, 2026 16:02
…ing develop)

Direct sync of source/ directory from feat/dftu-pw-port-v2
which has been merged with origin/develop.
101 files changed, +10659/-1262 lines.
Reverted infrastructure files to origin/develop state to clean up the PR.
Files reverted:
- source/source_cell/read_atoms_helper.cpp
- source/source_base/parallel_global.cpp
- source/source_base/timer.cpp
- source/source_base/kernels/cuda/math_kernel_op.cu
- source/source_base/module_device/device_check.h
- source/source_base/module_container/base/macros/cuda.h
- source/source_base/module_container/base/third_party/cusolver.h
- source/source_esolver/lcao_others.cpp
- source/source_hsolver/kernels/cuda/diag_cusolvermp.cu
- source/source_io/module_unk/berryphase.cpp
- source/source_lcao/module_rt/solve_propagation.cpp
- source/source_main/main.cpp
- source/source_lcao/module_ri/RPA_LRI.hpp

Kept:
- DFT+U/DeltaSpin core functionality (esolver, kernels with npol, dftu modules)
- Input parameters
- Build/Test system updates
Restored the following files from port-v2 as they contain essential
functional changes and bug fixes:

- source/source_esolver/lcao_others.cpp: Passes sc_direction_only parameter to init_deltaspin_lcao.
- source/source_base/parallel_global.cpp: Fixes MPI_Comm_free logic to avoid freeing MPI_COMM_WORLD.
- source/source_main/main.cpp: Reorders fftw_cleanup_threads before MPI_Finalize to avoid segfault.
- source/source_base/kernels/cuda/math_kernel_op.cu: Adds cublas_handle null check.

Other infrastructure files (timer.cpp, device_check.h, berryphase.cpp, etc.) remain reverted to develop.
Restoring all code-related changes as previous partial revert caused
compilation errors in CI.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant