forked from abacusmodeling/abacus-develop
-
Notifications
You must be signed in to change notification settings - Fork 151
Try to delete global.h, the use of which is harmful for the whole package #6898
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
1. Refactor global.h: - Removed heterogeneous parallel code (CUDA/ROCm error checking macros) - Added include for source_base/module_device/device_check.h - Removed GlobalC::exx_info declaration 2. Migrate exx_info: - Added GlobalC::exx_info declaration to exx_info.h - Created exx_info.cpp with GlobalC::exx_info definition - Removed exx_info definition from global.cpp - Removed duplicate exx_info definition from exx_helper.cpp 3. Update build system: - Added exx_info.cpp to xc_ library in CMakeLists.txt - Added exx_info.o to OBJS_XC in Makefile.Objects - Fixed formatting in Makefile.Objects 4. Ensure compatibility: - Verify pure PW compilation works with exx_info.cpp - Verify GPU compilation works with refactored code This refactoring improves code modularity by separating heterogeneous parallel functionality from global variables and moving EXX-related global variables to their own module.
1. Move GlobalC::restart declaration from global.h to restart.h 2. Move GlobalC::restart definition from global.cpp to restart.cpp 3. Keep the same functionality and usage 4. Improve code modularity by centralizing restart-related code in source_io module 5. Ensure compatibility with both pure PW and GPU compilation modes
Critsium-xy
reviewed
Jan 25, 2026
Critsium-xy
approved these changes
Jan 25, 2026
Flying-dragon-boxing
pushed a commit
to Flying-dragon-boxing/abacus-develop
that referenced
this pull request
Jan 26, 2026
…kage (deepmodeling#6898) * Refactor: Encapsulate timer functionality in timer_wrapper.h * Refactor timer code and clean_esolver function 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 * Refactor: Move heterogeneous parallel code to source_base/module_device * Refactor heterogeneous parallel code and migrate exx_info to module_xc 1. Refactor global.h: - Removed heterogeneous parallel code (CUDA/ROCm error checking macros) - Added include for source_base/module_device/device_check.h - Removed GlobalC::exx_info declaration 2. Migrate exx_info: - Added GlobalC::exx_info declaration to exx_info.h - Created exx_info.cpp with GlobalC::exx_info definition - Removed exx_info definition from global.cpp - Removed duplicate exx_info definition from exx_helper.cpp 3. Update build system: - Added exx_info.cpp to xc_ library in CMakeLists.txt - Added exx_info.o to OBJS_XC in Makefile.Objects - Fixed formatting in Makefile.Objects 4. Ensure compatibility: - Verify pure PW compilation works with exx_info.cpp - Verify GPU compilation works with refactored code This refactoring improves code modularity by separating heterogeneous parallel functionality from global variables and moving EXX-related global variables to their own module. * Move GlobalC::restart to source_io/restart 1. Move GlobalC::restart declaration from global.h to restart.h 2. Move GlobalC::restart definition from global.cpp to restart.cpp 3. Keep the same functionality and usage 4. Improve code modularity by centralizing restart-related code in source_io module 5. Ensure compatibility with both pure PW and GPU compilation modes * Remove unnecessary global.h includes and fix line_search.cpp compilation error * update global.h * update global.h * update global.h * update global.h * update stress_pw.cpp * update global.h * update global.h in module_pwdft * update global.h * update module_stodft * delete global.h in source_io * fix source_io * delete inclusion of global.h in source_io * Refactor: Remove unnecessary includes and clean up global.h references * delete global.h in source_lcao * update * update * fix * update * fix * update source_cell * update source_esolver * update esolver * update * update module_charge * update module_pot * continue * update fix * fix * update dftu * update deepks * ifx * delete globalc.h in module_ri * fix * fix * fix dftu_io * fix diago_lapack.cpp * updates * update rdmft * update module_rt * update td operator * update module_pwdft/operator etc * solve fft * update xc * update * delete global.h and global.cpp, finally after nearly 20 years * fix op_exx_lcao * fix * fix --------- Co-authored-by: abacus_fixer <mohanchen@pku.eud.cn>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Try to delete global.h, the use of which is harmful for the whole package