Skip to content

fix output#7317

Merged
mohanchen merged 10 commits into
deepmodeling:developfrom
mohanchen:20260507-fix_output
May 15, 2026
Merged

fix output#7317
mohanchen merged 10 commits into
deepmodeling:developfrom
mohanchen:20260507-fix_output

Conversation

@mohanchen
Copy link
Copy Markdown
Collaborator

@mohanchen mohanchen commented May 7, 2026

Summary

Cleans up several runtime log messages and fixes a latent bug in the GPU memory tracker.

Changes

Bug fix

  • Memory::print GPU path: previously record_gpu called print(find), but the body of print(int) indexed the CPU arrays (name[find], consume[find]). GPU memory warnings therefore printed the wrong name/size. Refactored print to take (name, size_mb) so the caller passes the correct array, fixing CPU and GPU paths uniformly.

Behavioral change

  • Raised the memory-allocation warning threshold from 5 MB → 20 MB to reduce log noise. Allocations in the 5–20 MB range no longer emit the warning.

Output polish

  • Reworded the memory warning header to *** Memory Allocation Warning ***.
  • SET NONLOCAL PSEUDOPOTENTIAL PROJECTORS now appends the element label, so the line is meaningful in multi-element runs.
  • START CHARGE value (init_chg) is now uppercased for consistency with surrounding output.
  • For nspin == 2, the printed k-point count now shows the physical number (nkstot / 2) instead of the spin-duplicated total stored internally. nspin == 1 and nspin == 4 are unaffected, matching how set_kup_and_kdw populates nkstot.
  • Added a blank line before the per-element pseudopotential block in read_cell_pseudopots for readability.
  • Switched the "readin total magnetization" line in CalAtomsInfo to use ModuleBase::GlobalFunc::OUT so its formatting matches neighboring entries.

@mohanchen mohanchen added Refactor Refactor ABACUS codes The Absolute Zero Reduce the "entropy" of the code to 0 labels May 7, 2026
@mohanchen mohanchen requested a review from dzzz2001 May 7, 2026 03:14
Comment thread source/source_io/module_output/print_info.cpp Outdated
Comment thread source/source_lcao/module_gint/test/test_gint_common.cpp Outdated
Comment thread source/source_cell/cal_atoms_info.h Outdated
Comment thread source/source_base/memory.cpp
@mohanchen mohanchen added the Bugs Bugs that only solvable with sufficient knowledge of DFT label May 14, 2026
@mohanchen mohanchen merged commit c2e6533 into deepmodeling:develop May 15, 2026
15 checks passed
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 Refactor Refactor ABACUS codes The Absolute Zero Reduce the "entropy" of the code to 0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants