RT-TDDFT detects memory leak
Describe the bug
I use the same input file to run the RT-TDDFT twice, the program is abnormally interrupted at different MD steps, I suspect it may be due to memory accumulation that has not been released, resulting in insufficient memory, and then the program is interrupted
Expected behavior
No response
To Reproduce
Environment
ABACUS commit 8a1f0125ae8714ab763efcb28a7f2f436e03e722
Additional Context
No response
Task list for Issue attackers (only for developers)
- [ ] Verify the issue is not a duplicate.
- [ ] Describe the bug.
- [ ] Steps to reproduce.
- [ ] Expected behavior.
- [ ] Error message.
- [ ] Environment details.
- [ ] Additional context.
- [ ] Assign a priority level (low, medium, high, urgent).
- [ ] Assign the issue to a team member.
- [ ] Label the issue with relevant tags.
- [ ] Identify possible related issues.
- [ ] Create a unit test or automated test to reproduce the bug (if applicable).
- [ ] Fix the bug.
- [ ] Test the fix.
- [ ] Update documentation (if necessary).
- [ ] Close the issue and inform the reporter (if applicable).
And I suggest that a directory can be created for saving H(K), S(K) wfc(k).... files when out_app_flag is set to False, just like STRU directory for saving MD trajectory. Even though I can set out_interval, there are still too many files in OUT.*, output by current version.
I also test the restart function, different scf ETOT is obtained
Got it, I will look into it very soon.
ABACUS v3.5.4 can work well
meet the same problem using another test case.
there are some errors showing in the log file (abacus.e16985):
abacus: /home/fuyiwei/software/abacus-develop/source/module_base/math_integral.cpp:128: static void ModuleBase::Integral::Simpson_Integral(int, const double *, double, double &): Assertion `mesh&1' failed.
abacus: /home/fuyiwei/software/abacus-develop/source/module_base/math_integral.cpp:128: static void ModuleBase::Integral::Simpson_Integral(int, const double *, double, double &): Assertion `mesh&1' failed.
abacus: /home/fuyiwei/software/abacus-develop/source/module_base/math_integral.cpp:128: static void ModuleBase::Integral::Simpson_Integral(int, const double *, double, double &): Assertion `mesh&1' failed.
I did more tests, it seems ABACUS always crash when using velocity gauge and Heaviside type of electric field together. velocity-gauge-heaviside.tar.gz
example.zip Here is an example of the interruption. Using a 4-process, 4-thread simulation, a severe memory leak in some processes happens at a random step (around step 2000).