Skip to content

Conversation

@mohanchen
Copy link
Collaborator

Fix dependency cycles

abacus_fixer and others added 12 commits January 23, 2026 20:25
1. Remove #ifdef __MPI from timer code, encapsulate in timer_wrapper.h
2. Move ESolver clean logic to after_all_runners method
3. Replace clean_esolver calls with direct delete p_esolver
4. Remove #ifdef __MPI from delete p_esolver
5. Add Cblacs_exit(1) in after_all_runners for LCAO calculations
…cture

- Added detailed English comments to cal_HR_exx function
- Moved implementation to cpp file and added explicit instantiations
- Improved header file organization with sections
- Removed unnecessary LCAO_hamilt.hpp include
- Enhanced endif comments for better code readability
The LCAO_hamilt.hpp file was empty after moving its implementation to spar_exx.cpp.
This commit removes the unused header file and updates all references to it.
- Removed #include xc_functional.h from exx_info.h
- Removed #include exx_info.h from xc_functional.h
This breaks the circular dependency between these two header files, allowing them to compile independently.
- Removed unnecessary #include source_lcao/hamilt_lcao.h from spar_dh.h, spar_hsr.h, and spar_u.h
- Added direct dependencies to spar_dh.h: matrix.h, parallel_orbitals.h, two_center_bundle.h, ORB_read.h
- Adjusted include order in spar_hsr.h and spar_u.h
- Added necessary include to spar_hsr.cpp for HamiltLCAO access
- Added xc_functional.h include to esolver_ks_pw.cpp for XC_Functional class access
- Added xc_functional.h include to input_conv.cpp for XC_Functional class access
- Added parallel_comm.h include to op_exx_pw.cpp for KP_WORLD communication
- Added global_variable.h and exx_info.h includes to stress_pw.cpp for GlobalC namespace access
These changes fix compilation errors caused by the dependency refactoring.
@mohanchen mohanchen requested a review from Critsium-xy January 25, 2026 09:17
@mohanchen mohanchen added Refactor Refactor ABACUS codes The Absolute Zero Reduce the "entropy" of the code to 0 labels Jan 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Refactor Refactor ABACUS codes The Absolute Zero Reduce the "entropy" of the code to 0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant