Open
Description
Describe the Code Quality Issue
There are memory related issues now:
#3789 there are some errors in memory loggings.
#3675 Memory cost is too large in LCAO code, and the loggings is not enough.
#3710 Memory cost in PW code is not enough too.
#3657 Memory cost is too large in NSPIN=4 calculation in LCAO code.
Additional Context
There are two methods to record the used memory in ABACUS:
cmake -B build -DDEBUG_INFO=1
and then check the remaining memory in everyModuleBase::TITLE()
function.- check the
MEMORY(MB)
block in OUT.{suffix}/running_{calculation}.log .
Ideally, these two method can get same peak memory cost in one calculation, but now they are not.
We should try to follow all memory records in TITLE
to fix the omissive ModuleBase::Memory::record()
.
Task list for Issue attackers (only for developers)
- Identify the specific code file or section with the code quality issue.
- Investigate the issue and determine the root cause.
- Research best practices and potential solutions for the identified issue.
- Refactor the code to improve code quality, following the suggested solution.
- Ensure the refactored code adheres to the project's coding standards.
- Test the refactored code to ensure it functions as expected.
- Update any relevant documentation, if necessary.
- Submit a pull request with the refactored code and a description of the changes made.