forked from abacusmodeling/abacus-develop
-
Notifications
You must be signed in to change notification settings - Fork 151
20260125 fix initialized #6904
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
Open
mohanchen
wants to merge
15
commits into
deepmodeling:develop
Choose a base branch
from
mohanchen:20260125-fix-initialized
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
20260125 fix initialized #6904
mohanchen
wants to merge
15
commits into
deepmodeling:develop
from
mohanchen:20260125-fix-initialized
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
This commit fixes 37 uninitialized variables (19 int, 18 double) in 19 files within the source_pw directory. All variables are initialized to 0 or 0.0 to prevent undefined behavior and improve code safety. Affected files: - source_stodft/sto_wf.cpp - source_stodft/sto_tool.h - source_stodft/sto_iter.h - source_stodft/sto_iter.cpp - source_stodft/sto_forces.cpp - source_pwdft/stress_func_loc.cpp - source_pwdft/soc.cpp - source_pwdft/parallel_grid.cpp - source_pwdft/onsite_projector.cpp - source_pwdft/operator_pw/exx_pw_ace.cpp - source_pwdft/onsite_proj_tools.h - source_pwdft/nonlocal_maths.hpp - source_pwdft/fs_nonlocal_tools.h - source_pwdft/elecond.cpp - source_pwdft/forces_cc.cpp - source_pwdft/VNL_in_pw.cpp - source_pwdft/forces_scc.cpp - source_pwdft/forces.cpp - source_pwdft/VNL_grad_pw.cpp
This commit fixes uninitialized variables (int and double) in 18 files within the source_lcao directory. All variables are initialized to 0 or 0.0 to prevent undefined behavior and improve code safety. Affected files: - spar_hsr.cpp, spar_dh.cpp - wavefunc_in_pw.cpp - module_rt/velocity_op.cpp, module_rt/norm_psi.cpp, module_rt/propagator.cpp, module_rt/td_folding.cpp, module_rt/boundary_fix.cpp - module_ri/exx_abfs-io.cpp, module_ri/module_exx_symmetry/irreducible_sector_bvk.cpp, module_ri/module_exx_symmetry/symmetry_rotation.cpp - module_lr/dm_trans/dmr_complex.cpp, module_lr/esolver_lrtd_lcao.cpp - module_operator_lcao/dspin_force_stress.hpp, module_operator_lcao/dftu_force_stress.hpp - module_hcontainer/func_folding.cpp, module_hcontainer/test/test_hcontainer.cpp - module_gint/set_ddphi.cpp
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.
Fixed uninitialized variables.