Skip to content

Conversation

zgn-26714
Copy link

@zgn-26714 zgn-26714 commented Aug 13, 2025

This pull request addresses issue #6377
image

44b2136

Fix memory statistics error
- The memory for the record variable hRGintCd was not accounted for.
- When calculating the memory for the record variable DMRGint, it was multiplied by 4 twice.

07a9a23

Removed the temporary variable DMRGint_full when transitioning from 2D block parallelism to serial in Hcontainer.
A temporary variable DM2D_tmp was created to split the 2D block parallel DM2D into smaller blocks. The function transferParallels2Serials is directly called to convert DM2D_tmp into DMRGint[]. This approach avoids the large memory consumption that would occur if a large matrix DMRGint_full was first used to hold DM2D and then split into smaller matrices DMRGint.
some detail need to modify

0a799ba

Following a similar approach as described above, the temporary variable hRGintCd, which was used in the conversion of HContainer from serial to 2D block distributed parallel layout, has been removed. Instead, a smaller auxiliary matrix hR_tmp is now used to partition hR into blocks, facilitating the type conversion. The data transfer path has been changed from the original hRGint_tmp → hRGintCd → hR to hRGint_tmp → hR_tmp → hR.

todo:

  • delete DMRGint_full
  • delete hRGintCd
  • Further optimize other variables

@dyzheng
Copy link
Collaborator

dyzheng commented Aug 14, 2025

LGTM,but the test case "204_NO_KP_NC" is error, I don't think it related to this PR, but you should check it .

@mohanchen mohanchen added Bugs Bugs that only solvable with sufficient knowledge of DFT Long-Time Support (LTS) Issues related to LTS version labels Aug 15, 2025
@zgn-26714 zgn-26714 changed the title Fixed the bug in memory statistics Memory Optimization for Hcontainer Class in Parallel Execution Aug 19, 2025
@zgn-26714
Copy link
Author

zgn-26714 commented Aug 26, 2025

07a9a23

the test case "204_NO_KP_NC" can pass when tested locally
20250826-112739

0a799ba

Several test cases are causing crashes and require fixes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bugs Bugs that only solvable with sufficient knowledge of DFT Long-Time Support (LTS) Issues related to LTS version
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants