#include <init.hpp>
Inheritance diagram for q3::execution::PlanewaveGPUExecutionPolicy:Public Member Functions | |
| PlanewaveGPUExecutionPolicy (std::shared_ptr< gpu::device::GPUDeviceBackend > device_backend, gpu::blas::GPUBLAS &gpu_blas) | |
| void | add_scaled_vector (int number_of_elements, ComplexValue scaling_factor, const ComplexValue *vector_x, ComplexValue *vector_y) const override |
| std::vector< Real > | assemble_global_kpoint_state_data (const std::vector< Real > &local_data, int, int, int) const override |
| std::unique_ptr< FFTGrid > | create_fft_grid () const override |
| ComplexValue | dot_product (int number_of_elements, const ComplexValue *vector_x, const ComplexValue *vector_y) const override |
| bool | each_process_owns_whole_kpoints () const override |
| The single GPU process holds every k-point whole. | |
| int | global_kpoint_index (int local_kpoint_index) const override |
| Identity: the single GPU process holds the global k-point grid in order. | |
| gpu::blas::GPUBLAS & | gpu_blas () |
| const gpu::blas::GPUBLAS & | gpu_blas () const |
| KPointsGrid | local_kpoint_grid (const KPointsGrid &global_kpoint_grid) const override |
| Real | norm (int number_of_elements, const ComplexValue *vector_x) const override |
| int | number_of_pools () const override |
| bool | one_process_owns_complete_state () const override |
| void | reduce_band_group_scalar_min (int &) const override |
| void | reduce_charge_density (std::vector< std::vector< Real > > &) const override |
| void | reduce_scalar (Real &) const override |
| void | reduce_scalar_max (int &) const override |
| void | reduce_scalar_max (Real &) const override |
| void | reduce_scalar_min (Real &) const override |
| void | reduce_vector (std::vector< Real > &) const override |
| void | reduce_within_pool_scalar (Real &) const override |
| void | reduce_within_pool_vector (std::vector< Real > &) const override |
Public Member Functions inherited from q3::execution::gpu::GPUExecutionPolicy | |
| GPUExecutionPolicy (std::shared_ptr< device::GPUDeviceBackend > device_backend) | |
| void | allgather_within_group (const Real *local_data, int local_count, Real *full_data, int) const override |
| const device::GPUDeviceBackend & | device_backend () const |
| int | global_number_of_elements (int local_number_of_elements) const override |
| int | group_rank_index () const override |
| int | group_size () const override |
| bool | is_root () const override |
| int | number_of_processes () const override |
| void | reduce_within_group (ComplexValue *, int) const override |
| void | reduce_within_group (Real *, int) const override |
Public Member Functions inherited from q3::execution::ExecutionPolicy | |
| virtual | ~ExecutionPolicy ()=default |
| virtual void | allgather_across_bands (ComplexValue *, const int *, const int *) const |
| virtual int | band_distribution_rank_index () const |
| virtual int | band_distribution_size () const |
| virtual void | broadcast_across_bands (ComplexValue *, int) const |
| virtual void | broadcast_across_bands (int *, int) const |
| Integer overload, for the counts that decide collective sizes. | |
| virtual void | broadcast_across_bands (Real *, int) const |
| Real overload, for eigenvalues – the numbers convergence decisions are made from. | |
| virtual void | broadcast_from_group_root (ComplexValue *, int) const |
| virtual void | broadcast_from_group_root (Real *, int) const |
| virtual void | reduce_across_bands (Real *, int) const |
| virtual void | reduce_group_distributed_result (ComplexValue *, int) const |
Public Member Functions inherited from q3::execution::PlanewaveExecutionPolicy | |
| ~PlanewaveExecutionPolicy () override=default | |
| virtual void | disable_band_distribution () |
| generated::ResultsExecution | execution_record () const |
| virtual bool | number_of_pools_was_requested () const |
| virtual void | reconfigure_topology (int) |
Public Member Functions inherited from q3::execution::QuantumSystemExecutionPolicy | |
| ~QuantumSystemExecutionPolicy () override=default | |
| int | band_rank_index () const |
| int | band_size () const |
Public Member Functions inherited from q3::FFTGridFactory | |
| virtual | ~FFTGridFactory ()=default |
Additional Inherited Members | |
Public Types inherited from q3::execution::ExecutionPolicy | |
| using | ComplexValue = Complex |
Protected Attributes inherited from q3::execution::gpu::GPUExecutionPolicy | |
| std::shared_ptr< device::GPUDeviceBackend > | device_backend_ |
|
inline |
|
inlineoverridevirtual |
Scaled vector addition via GPUBLAS: vector_y += scaling_factor * vector_x.
Reimplemented from q3::execution::gpu::GPUExecutionPolicy.
Definition at line 58 of file init.hpp.
References q3::execution::gpu::blas::GPUBLAS::axpy().
|
inlineoverridevirtual |
Assemble fixed-width data for local k-point states into global order.
Local state order is spin-major, with physical k-points ordered as they appear in local_kpoint_grid(). The returned data uses the same spin-major convention over the complete global grid. Serial policies return the input unchanged; MPI policies gather one contribution per pool.
Implements q3::execution::PlanewaveExecutionPolicy.
|
inlineoverridevirtual |
Create a GPU FFT grid instance.
Intentionally returns nullptr: vendor GPU FFT grids (GPUFFTGrid, cuFFT/hipFFT/SYCL-backed) exist but are constructed by the GPU entry points (main_gpu*.cpp) and handed to the basis directly, not created through this policy hook. The caller must check for null and fall back to a serial FFT grid.
Implements q3::FFTGridFactory.
|
inlineoverridevirtual |
Compute the inner product x† · y via GPUBLAS.
Reimplemented from q3::execution::gpu::GPUExecutionPolicy.
Definition at line 49 of file init.hpp.
References q3::execution::gpu::blas::GPUBLAS::dot_product().
|
inlineoverridevirtual |
The single GPU process holds every k-point whole.
Implements q3::execution::PlanewaveExecutionPolicy.
|
inlineoverridevirtual |
Identity: the single GPU process holds the global k-point grid in order.
Implements q3::execution::PlanewaveExecutionPolicy.
|
inline |
|
inline |
|
inlineoverridevirtual |
Identity: return the global grid unchanged.
Implements q3::execution::PlanewaveExecutionPolicy.
|
inlineoverridevirtual |
Euclidean norm via GPUBLAS.
Reimplemented from q3::execution::gpu::GPUExecutionPolicy.
Definition at line 68 of file init.hpp.
References q3::execution::gpu::blas::GPUBLAS::norm().
|
inlineoverridevirtual |
Number of k-point pools in the current topology.
Returns 1 in serial mode. In MPI mode returns the number of pools configured by configure_topology(). Used by the factory to validate that no pool is left empty (which would cause MPI collective mismatches).
Implements q3::execution::PlanewaveExecutionPolicy.
|
inlineoverridevirtual |
Whether one process owns every k-point and every G-vector coefficient.
Writers without a gather implementation may serialize state only when this is true. It is stronger than checking the current group size because a small-basis fallback can disable coefficient distribution without turning a multi-process FFT grid into a serial one.
Implements q3::execution::PlanewaveExecutionPolicy.
|
inlineoverridevirtual |
Reduce an integer scalar within the band group using MPI_MIN.
Used during initialization to check if any rank in the pool received zero plane waves from slab distribution.
| value | In-out: local value, replaced by band-group minimum. |
Implements q3::execution::PlanewaveExecutionPolicy.
|
inlineoverridevirtual |
Implements q3::execution::PlanewaveExecutionPolicy.
|
inlineoverridevirtual |
── Across-pool reductions (inter-pool communicator) ──────────────────────
Use for k-point-local quantities that must be summed across pools. With 1-rank-per-pool these happen over MPI_COMM_WORLD; with multiple ranks per pool they use the inter-pool communicator (one rank per pool). Reduce a scalar k-point sum across all pools (MPI_SUM).
Used for band_energy and smearing_entropy after local k-point accumulation.
| value | In-out: local k-point contribution, replaced by global sum. |
Implements q3::execution::PlanewaveExecutionPolicy.
|
inlineoverridevirtual |
Reduce a scalar across all pools using MPI_MAX.
Used for summary statistics such as max_plane_waves_per_kpoint where each pool holds only its local k-points and the global maximum is needed.
| value | In-out: local maximum, replaced by global maximum. |
Implements q3::execution::PlanewaveExecutionPolicy.
|
inlineoverridevirtual |
Reduce a Real scalar across all pools using MPI_MAX.
Used for global eigenvalue range (e.g., HOMO across pools).
| value | In-out: local maximum, replaced by global maximum. |
Implements q3::execution::PlanewaveExecutionPolicy.
|
inlineoverridevirtual |
Reduce a Real scalar across all pools using MPI_MIN.
Used for global eigenvalue range (e.g., LUMO across pools).
| value | In-out: local minimum, replaced by global minimum. |
Implements q3::execution::PlanewaveExecutionPolicy.
|
inlineoverridevirtual |
Reduce a vector of k-point-local values across all pools (MPI_SUM).
Used for nonlocal forces and kinetic/nonlocal stress contributions.
| values | In-out: local k-point contributions, replaced by global sum. |
Implements q3::execution::PlanewaveExecutionPolicy.
|
inlineoverridevirtual |
── Within-pool reductions (band communicator) ────────────────────────────
Use for real-space slab integrals. With 1-rank-per-pool these are no-ops. With multiple ranks per pool, FFTW-MPI distributes the real-space grid across the band communicator; each rank integrates only its local slabs and these methods sum the partial results within the pool. Reduce a real-space slab integral scalar within this pool (MPI_SUM).
Used for XC energy, double-counting correction, and delta-eSCF correction.
| value | In-out: partial slab integral, replaced by pool-total. |
Implements q3::execution::PlanewaveExecutionPolicy.
|
inlineoverridevirtual |
Reduce a real-space slab integral vector within this pool (MPI_SUM).
Used for local forces, XC stress, local-PP stress, and core-correction forces/stress computed from real-space grid slabs.
| values | In-out: partial slab contributions, replaced by pool-total. |
Implements q3::execution::PlanewaveExecutionPolicy.