pw parallel domain: plane-wave distribution within a pool.
More...
#include <para_pw_world.h>
|
| | ParaPwWorld (int npw) |
| | Construct a serial (single-process) pw domain.
|
| | ParaPwWorld (const MPI_Comm &comm, const std::vector< int > &npw_per) |
| | Construct a pw domain on an existing pool communicator.
|
| int | npw () const |
| | Number of plane waves on this process.
|
| int | npwtot () const |
| | Total number of plane waves in the pool.
|
| int | npw_per (int p) const |
| | Number of plane waves on process p in the pool.
|
| int | poolnproc () const |
| | Number of processes in the pool (same as size()).
|
| int | poolrank () const |
| | Rank within the pool (same as rank()).
|
| virtual | ~ParaWorld ()=default |
| const std::string & | tag () const |
| | Domain tag string.
|
| int | rank () const |
| | Rank of this process inside the domain (0 in serial builds).
|
| int | size () const |
| | Number of processes in the domain (1 in serial builds).
|
| bool | valid () const |
| | True if this process belongs to the domain.
|
| MPI_Comm | comm () const |
| | Underlying MPI communicator (MPI builds only).
|
|
| int | npw_ = 0 |
| | local plane-wave count
|
| int | npwtot_ = 0 |
| | total plane waves in pool
|
| std::vector< int > | npw_per_ |
| | per-process plane-wave counts
|
|
| static ParaWorld | serial (const std::string &tag) |
| | Build a serial (size=1, rank=0) domain for the given tag.
|
| static std::unique_ptr< ParaWorld > | make_serial (const std::string &tag) |
| | Build a serial domain as a heap-allocated unique_ptr.
|
| static ParaWorld | make_mpi (const std::string &tag, const MPI_Comm &comm) |
| | Build a domain wrapping an MPI communicator.
|
| static std::unique_ptr< ParaWorld > | make_mpi_ptr (const std::string &tag, const MPI_Comm &comm) |
| | ParaWorld (const std::string &tag) |
| | Construct a serial (single-process) domain.
|
| | ParaWorld (const std::string &tag, const MPI_Comm &comm) |
| | Construct a domain wrapping an existing MPI communicator.
|
pw parallel domain: plane-wave distribution within a pool.
Self-contained replacement for poolnproc/poolrank/npw_per/npwtot members scattered across PW_Basis and GlobalV::NPROC_IN_POOL. Owns the pool-level parallel topology and plane-wave count distribution.
The actual FFT-based distribution algorithm (method1/method2) stays in PW_Basis; this class only holds the result: how many plane waves each process in the pool gets.
Tests only need this header; no PW_Basis, no parallel_comm.h.
◆ ParaPwWorld() [1/2]
| Parallel::ParaPwWorld::ParaPwWorld |
( |
int | npw | ) |
|
|
explicit |
Construct a serial (single-process) pw domain.
- Parameters
-
| [in] | npw | number of plane waves on this process |
◆ ParaPwWorld() [2/2]
| Parallel::ParaPwWorld::ParaPwWorld |
( |
const MPI_Comm & | comm, |
|
|
const std::vector< int > & | npw_per ) |
Construct a pw domain on an existing pool communicator.
- Parameters
-
| [in] | comm | pool communicator (e.g. POOL_WORLD) |
| [in] | npw_per | array of plane-wave counts per process (size = pool size) |
◆ npw()
| int Parallel::ParaPwWorld::npw |
( |
| ) |
const |
|
inline |
Number of plane waves on this process.
◆ npw_per()
| int Parallel::ParaPwWorld::npw_per |
( |
int | p | ) |
const |
Number of plane waves on process p in the pool.
◆ npwtot()
| int Parallel::ParaPwWorld::npwtot |
( |
| ) |
const |
|
inline |
Total number of plane waves in the pool.
◆ poolnproc()
| int Parallel::ParaPwWorld::poolnproc |
( |
| ) |
const |
|
inline |
Number of processes in the pool (same as size()).
◆ poolrank()
| int Parallel::ParaPwWorld::poolrank |
( |
| ) |
const |
|
inline |
Rank within the pool (same as rank()).
◆ npw_
| int Parallel::ParaPwWorld::npw_ = 0 |
|
private |
◆ npw_per_
| std::vector<int> Parallel::ParaPwWorld::npw_per_ |
|
private |
per-process plane-wave counts
◆ npwtot_
| int Parallel::ParaPwWorld::npwtot_ = 0 |
|
private |
total plane waves in pool
The documentation for this class was generated from the following files:
- /home/runner/work/abacus-develop/abacus-develop/source/source_base/module_parallel/para_pw_world.h
- /home/runner/work/abacus-develop/abacus-develop/source/source_base/module_parallel/para_pw_world.cpp