abacus-develop icon indicating copy to clipboard operation
abacus-develop copied to clipboard

RT-TDDFT detects memory leak

Open 1041176461 opened this issue 1 year ago • 7 comments

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

image

Expected behavior

No response

To Reproduce

td-test.zip

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

1041176461 avatar Jul 09 '24 08:07 1041176461

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

1041176461 avatar Jul 09 '24 08:07 1041176461

I also test the restart function, different scf ETOT is obtained

image

1041176461 avatar Jul 10 '24 01:07 1041176461

Got it, I will look into it very soon.

AsTonyshment avatar Jul 10 '24 03:07 AsTonyshment

ABACUS v3.5.4 can work well

1041176461 avatar Jul 10 '24 11:07 1041176461

meet the same problem using another test case.

test.tar.gz

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.

Satinelamp avatar Jul 12 '24 08:07 Satinelamp

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

Satinelamp avatar Jul 12 '24 17:07 Satinelamp

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

ESROAMER avatar Dec 16 '24 13:12 ESROAMER