Skip to content
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

Refactor: remove Hloc, Hloc2, Sloc, Sloc2 in LCAO_Matrix #4574

Merged
merged 16 commits into from
Jul 6, 2024

Conversation

dyzheng
Copy link
Collaborator

@dyzheng dyzheng commented Jul 4, 2024

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

@haozhihan
Copy link
Collaborator

Why didn't clang-tidy do the same wrong behavior as in commit d72d89d in commit db5ad46 in this PR, changing ModuleBase::timer to timex?

@caic99

@caic99
Copy link
Member

caic99 commented Jul 5, 2024

Why didn't clang-tidy do the same wrong behavior as in commit d72d89d in commit db5ad46 in this PR, changing ModuleBase::timer to timex?

@caic99

@haozhihan I guess you are asking why the latest commit is correct, right? As you can see, timer.h is added to dftu_force_stress.hpp in the last commit, hence clang-tidy is able to know the existence of ModuleBase::timer.

Edit: the wrong modification above is the result of missing a header file, but not "random behavior of clang-tidy".

@dyzheng
Copy link
Collaborator Author

dyzheng commented Jul 5, 2024

Why didn't clang-tidy do the same wrong behavior as in commit d72d89d in commit db5ad46 in this PR, changing ModuleBase::timer to timex?
@caic99

@haozhihan I guess you are asking why the latest commit is correct, right? As you can see, timer.h is added to dftu_force_stress.hpp in the last commit, hence clang-tidy is able to know the existence of ModuleBase::timer.

Edit: the wrong modification above is the result of missing a header file, but not "random behavior of clang-tidy".

The lack of header of timer.h won't cause any error in building test, which means header in included by other included headers. I don't think the related rule of clang-tidy is good.

@haozhihan
Copy link
Collaborator

Why didn't clang-tidy do the same wrong behavior as in commit d72d89d in commit db5ad46 in this PR, changing ModuleBase::timer to timex?
@caic99

@haozhihan I guess you are asking why the latest commit is correct, right? As you can see, timer.h is added to dftu_force_stress.hpp in the last commit, hence clang-tidy is able to know the existence of ModuleBase::timer.

Edit: the wrong modification above is the result of missing a header file, but not "random behavior of clang-tidy".

Thank you very much for your patience. I understand the reason for this matter.

Thank you very much again! @caic99

@mohanchen mohanchen added the The Absolute Zero Reduce the "entropy" of the code to 0 label Jul 5, 2024
@caic99
Copy link
Member

caic99 commented Jul 5, 2024

The lack of header of timer.h won't cause any error in building test, which means header in included by other included headers. I don't think the related rule of clang-tidy is good.

@dyzheng Well, I think it helped us to find a potential bug, although it is a compile-time one and easy to fix. Passing building test does not ensure 100% correctness.

@mohanchen mohanchen merged commit 08518df into deepmodeling:develop Jul 6, 2024
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
The Absolute Zero Reduce the "entropy" of the code to 0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants