Quantum 3xplorer (Q3)
An AI-native quantum simulation engine
Loading...
Searching...
No Matches
q3::PlanewaveKohnShamSCFReporter Class Reference

#include <reporter.hpp>

Static Public Member Functions

static void report_convergence_summary (const PlanewaveKohnShamSCFConvergenceSummary &summary)
 
static void report_first_iteration (Real total_energy, const PlanewaveKohnShamEnergies &energies)
 
static void report_memory_estimate (const PlanewaveMemoryEstimate &estimate)
 
static void report_setup_summary (const PlanewaveKohnShamSCFSetupSummary &summary)
 

Detailed Description

Stateless reporter: all methods are static and write to the global logger.

Definition at line 125 of file reporter.hpp.

Member Function Documentation

◆ report_convergence_summary()

static void q3::PlanewaveKohnShamSCFReporter::report_convergence_summary ( const PlanewaveKohnShamSCFConvergenceSummary &  summary)
inlinestatic

Print the full post-convergence block: magnetization (if spin-polarized), eigenvalues (first ≤10 k-point states), and the final energy breakdown.

Definition at line 303 of file reporter.hpp.

References q3::PlanewaveKohnShamSCFConvergenceSummary::energies.

Referenced by q3::PlanewaveKohnShamSCFIterator::report_convergence_details().

◆ report_first_iteration()

static void q3::PlanewaveKohnShamSCFReporter::report_first_iteration ( Real  total_energy,
const PlanewaveKohnShamEnergies &  energies 
)
inlinestatic

Print the first SCF iteration line, and its energy breakdown.

Only the first line belongs to the SCF trajectory a reader follows; the four components below it are a one-off diagnostic for a first iteration that landed somewhere unexpected, so they ride at debug with the rest of the diagnostics.

Definition at line 288 of file reporter.hpp.

References q3::KohnShamEnergies::band_energy, q3::log::debug(), q3::KohnShamEnergies::double_counting_correction, q3::KohnShamEnergies::exchange_correlation_energy, q3::KohnShamEnergies::hartree_energy, and q3::log::info().

Referenced by q3::PlanewaveKohnShamSCFIterator::report_first_iteration_details().

◆ report_memory_estimate()

static void q3::PlanewaveKohnShamSCFReporter::report_memory_estimate ( const PlanewaveMemoryEstimate &  estimate)
inlinestatic

Print the estimated per-rank memory footprint, term by term.

Printed after the pseudopotential summary rather than with the rest of the setup block, because the projector count it needs does not exist until the pseudopotential basis has been built.

The figures are what the code will allocate, not what it ought to: terms whose labels say "copy" are redundant today and are named so a reader can see the difference between the footprint and the requirement.

A dozen lines of arithmetic nobody reads on a run that fits, so it rides at debug with the rest of the diagnostics; the measured peak at the end of the run still prints, and is what a reader who did not ask for this compares against.

This is what the run allocates, which is not the same as what it keeps resident, and the difference goes both ways. Large transient blocks freed during setup are commonly retained by the allocator rather than returned, which pushes the resident set above this figure. Against that, arrays are sized for the largest basis the solver may reach, and a run that converges before filling one never touches all of it. Compare with the measured peak at the end of the run rather than trusting either number alone.

Definition at line 143 of file reporter.hpp.

References q3::log::debug(), q3::PlanewaveMemoryEstimate::peak_bytes, q3::PlanewaveMemoryEstimate::steady_state, q3::PlanewaveMemoryEstimate::steady_state_bytes, and q3::PlanewaveMemoryEstimate::transient.

Referenced by q3::PlanewavePseudopotentialKohnShamSCFIterator::report_memory_estimate().

◆ report_setup_summary()

static void q3::PlanewaveKohnShamSCFReporter::report_setup_summary ( const PlanewaveKohnShamSCFSetupSummary &  summary)
inlinestatic

Print the one-time setup summary that appears after initialization.

How the ranks were actually arranged, and whether G-vectors ended up distributed. Without this the log cannot distinguish a run that used band groups from one that silently fell back to replicated G-vectors, which changes both the performance and which properties are available.

Ranks per pool is derived rather than taken from band_group_size, because the replicated-G fallback sets the band group size to 1 (see the basis rebuild in the iterator) while the ranks stay in their pools. Printing that value made the parenthetical fail to factor the rank count – "128 (16 pool(s) x 1 rank(s) per pool)" – and contradict the topology line logged at startup. The G-vector line below is what carries the fallback.

Replicated here is the point rather than a fallback: each rank holds every G-vector precisely so that it can own whole bands, which is what keeps its transforms local and leaves stress and export available.

Definition at line 180 of file reporter.hpp.

References q3::PlanewaveKohnShamSCFSetupSummary::band_group_size, q3::PlanewaveKohnShamSCFSetupSummary::bands_are_distributed, q3::PlanewaveKohnShamSCFSetupSummary::cell_volume, q3::PlanewaveKohnShamSCFSetupSummary::charge_density_energy_cutoff, q3::PlanewaveKohnShamSCFSetupSummary::davidson_basis_expansion_factor, q3::PlanewaveKohnShamSCFSetupSummary::density_symmetrization_active, q3::PlanewaveKohnShamSCFSetupSummary::diagonalizer_name, q3::PlanewaveKohnShamSCFSetupSummary::ewald_energy, q3::PlanewaveKohnShamSCFSetupSummary::fft_rho_grid_dimension_1, q3::PlanewaveKohnShamSCFSetupSummary::fft_rho_grid_dimension_2, q3::PlanewaveKohnShamSCFSetupSummary::fft_rho_grid_dimension_3, q3::PlanewaveKohnShamSCFSetupSummary::fft_wave_grid_dimension_1, q3::PlanewaveKohnShamSCFSetupSummary::fft_wave_grid_dimension_2, q3::PlanewaveKohnShamSCFSetupSummary::fft_wave_grid_dimension_3, q3::log::info(), q3::PlanewaveKohnShamSCFSetupSummary::lattice_parameter, q3::linear_algebra_libraries, q3::PlanewaveKohnShamSCFSetupSummary::max_plane_waves_per_kpoint, q3::execution::threading::maximum_threads(), q3::PlanewaveKohnShamSCFSetupSummary::mixer_name, q3::PlanewaveKohnShamSCFSetupSummary::mixing_beta, q3::PlanewaveKohnShamSCFSetupSummary::number_of_atoms, q3::PlanewaveKohnShamSCFSetupSummary::number_of_bands, q3::PlanewaveKohnShamSCFSetupSummary::number_of_electrons, q3::PlanewaveKohnShamSCFSetupSummary::number_of_g_vectors, q3::PlanewaveKohnShamSCFSetupSummary::number_of_kpoint_pools, q3::PlanewaveKohnShamSCFSetupSummary::number_of_kpoints, q3::PlanewaveKohnShamSCFSetupSummary::number_of_processes, q3::PlanewaveKohnShamSCFSetupSummary::number_of_shells, q3::PlanewaveKohnShamSCFSetupSummary::number_of_spin_components, q3::PlanewaveKohnShamSCFSetupSummary::number_of_symmetry_operations, q3::PlanewaveKohnShamSCFSetupSummary::replicated_plane_wave_fallback_active, q3::PlanewaveKohnShamSCFSetupSummary::wavefunction_energy_cutoff, and q3::PlanewaveKohnShamSCFSetupSummary::xc_functional_name.

Referenced by q3::PlanewaveKohnShamSCFIterator::log_representation_summary().


The documentation for this class was generated from the following file: