UFO
|
Describes how observations in an ObsSpace are distributed across MPI processes. More...
#include <ParallelObsDistribution.h>
Public Member Functions | |
ParallelObsDistribution (const ioda::ObsSpace &obsspace) | |
Construct an object describing the distribution of observations in obsspace across MPI processes. More... | |
size_t | globalObsCount () const |
Return the total number of observations held by all MPI processes. More... | |
const std::vector< int > & | localObsCounts () const |
Return a vector whose ith element is the number of observations held by the MPI process with rank i. More... | |
const std::vector< int > & | localObsIdDisplacements () const |
Return a vector whose ith element is the total number of observations held by the MPI processes with ranks less than i. More... | |
Private Attributes | |
size_t | globalObsCount_ |
std::vector< int > | localObsCounts_ |
std::vector< int > | localObsIdDisplacements_ |
Related Functions | |
(Note that these are not member functions.) | |
template<typename T > | |
std::vector< T > | getGlobalVariableValues (const ioda::ObsSpace &obsspace, const ParallelObsDistribution &obsDistribution, const std::string &variable, const std::string &group) |
Return a vector containing the values of variable variable@group for all observations held by process 0, then all observations held by process 1 etc. More... | |
Describes how observations in an ObsSpace are distributed across MPI processes.
Definition at line 19 of file src/ufo/utils/ParallelObsDistribution.h.
|
explicit |
Construct an object describing the distribution of observations in obsspace
across MPI processes.
Definition at line 13 of file ParallelObsDistribution.cc.
|
inline |
Return the total number of observations held by all MPI processes.
Definition at line 26 of file src/ufo/utils/ParallelObsDistribution.h.
|
inline |
Return a vector whose ith element is the number of observations held by the MPI process with rank i.
The returned vector can be passed to the recvcounts
parameter of eckit::mpi::Comm::allGatherv().
Definition at line 33 of file src/ufo/utils/ParallelObsDistribution.h.
|
inline |
Return a vector whose ith element is the total number of observations held by the MPI processes with ranks less than i.
The returned vector can be passed to the recvcounts
parameter of eckit::mpi::Comm::displs().
Definition at line 40 of file src/ufo/utils/ParallelObsDistribution.h.
|
related |
Return a vector containing the values of variable variable@group
for all observations held by process 0, then all observations held by process 1 etc.
T | Type of the variable values. Must be int, float, double or util::DateTime, otherwise a linking error will occur. |
Definition at line 30 of file ParallelObsDistribution.cc.
|
private |
Definition at line 43 of file src/ufo/utils/ParallelObsDistribution.h.
|
private |
Definition at line 44 of file src/ufo/utils/ParallelObsDistribution.h.
|
private |
Definition at line 45 of file src/ufo/utils/ParallelObsDistribution.h.