|
IODA
|
Inefficient distribution. More...
#include <InefficientDistribution.h>


Public Member Functions | |
| InefficientDistribution (const eckit::mpi::Comm &Comm, const eckit::Configuration &config) | |
| ~InefficientDistribution () | |
| bool | isIdentity () const override |
| Returns true if the distribution assigns all records to all PEs, false otherwise. More... | |
| bool | isMyRecord (std::size_t RecNum) const override |
Returns true if record RecNum has been assigned to the calling PE during a previous call to assignRecord(). More... | |
| void | patchObs (std::vector< bool > &) const override |
| Sets each element of the provided vector to true if the corresponding location is a "patch obs", i.e. More... | |
| void | min (int &x) const override |
| Calculates the global minimum (over all locations on all PEs) of a location-dependent quantity. More... | |
| void | min (std::size_t &x) const override |
| void | min (float &x) const override |
| void | min (double &x) const override |
| void | min (std::vector< int > &x) const override |
| Calculates the global minima (over all locations on all PEs) of multiple location-dependent quantities. More... | |
| void | min (std::vector< std::size_t > &x) const override |
| void | min (std::vector< float > &x) const override |
| void | min (std::vector< double > &x) const override |
| void | max (int &x) const override |
| Calculates the global maximum (over all locations on all PEs) of a location-dependent quantity. More... | |
| void | max (std::size_t &x) const override |
| void | max (float &x) const override |
| void | max (double &x) const override |
| void | max (std::vector< int > &x) const override |
| Calculates the global maxima (over all locations on all PEs) of multiple location-dependent quantities. More... | |
| void | max (std::vector< std::size_t > &x) const override |
| void | max (std::vector< float > &x) const override |
| void | max (std::vector< double > &x) const override |
| void | allGatherv (std::vector< size_t > &x) const override |
| Gather observation data from all processes and deliver the combined data to all processes. More... | |
| void | allGatherv (std::vector< int > &x) const override |
| void | allGatherv (std::vector< float > &x) const override |
| void | allGatherv (std::vector< double > &x) const override |
| void | allGatherv (std::vector< util::DateTime > &x) const override |
| void | allGatherv (std::vector< std::string > &x) const override |
| size_t | globalUniqueConsecutiveLocationIndex (size_t loc) const override |
| Map the index of a location held on the calling process to the index of the corresponding element of any vector produced by allGatherv(). More... | |
| std::string | name () const override |
Public Member Functions inherited from ioda::Distribution | |
| Distribution (const eckit::mpi::Comm &Comm) | |
| virtual | ~Distribution () |
| virtual bool | isNonoverlapping () const |
| Returns true if the distribution does not assign any record to more than one PE, false otherwise. More... | |
| virtual void | assignRecord (const std::size_t RecNum, const std::size_t LocNum, const eckit::geometry::Point2 &point) |
If the record RecNum has not yet been assigned to a PE, assigns it to the appropriate PE. More... | |
| virtual void | computePatchLocs () |
| If necessary, identifies locations of "patch obs", i.e. More... | |
| template<typename T > | |
| std::unique_ptr< Accumulator< T > > | createAccumulator () const |
| Create an object that can be used to calculate the sum of a location-dependent quantity over locations held on all PEs, each taken into account only once even if it's held on multiple PEs. More... | |
| template<typename T > | |
| std::unique_ptr< Accumulator< std::vector< T > > > | createAccumulator (std::size_t n) const |
Create an object that can be used to calculate the sums of n location-dependent quantities over locations held on all PEs, each taken into account only once even if it's held on multiple PEs. More... | |
| size_t | rank () const |
| Accessor to MPI rank. More... | |
Private Member Functions | |
| std::unique_ptr< Accumulator< int > > | createAccumulatorImpl (int init) const override |
| Create an object that can be used to calculate the sum of a location-dependent quantity over locations held on all PEs, each taken into account only once even if it's held on multiple PEs. More... | |
| std::unique_ptr< Accumulator< std::size_t > > | createAccumulatorImpl (std::size_t init) const override |
| std::unique_ptr< Accumulator< float > > | createAccumulatorImpl (float init) const override |
| std::unique_ptr< Accumulator< double > > | createAccumulatorImpl (double init) const override |
| std::unique_ptr< Accumulator< std::vector< int > > > | createAccumulatorImpl (const std::vector< int > &init) const override |
| Create an object that can be used to calculate the sums of multiple location-dependent quantities over locations held on all PEs, each taken into account only once even if it's held on multiple PEs. More... | |
| std::unique_ptr< Accumulator< std::vector< std::size_t > > > | createAccumulatorImpl (const std::vector< std::size_t > &init) const override |
| std::unique_ptr< Accumulator< std::vector< float > > > | createAccumulatorImpl (const std::vector< float > &init) const override |
| std::unique_ptr< Accumulator< std::vector< double > > > | createAccumulatorImpl (const std::vector< double > &init) const override |
| template<typename T > | |
| std::unique_ptr< Accumulator< T > > | createAccumulatorImplT (const T &init) const |
Private Attributes | |
| const std::string | distName_ = "InefficientDistribution" |
Additional Inherited Members | |
Protected Attributes inherited from ioda::Distribution | |
| const eckit::mpi::Comm & | comm_ |
| Local MPI communicator. More... | |
Related Functions inherited from ioda::Distribution | |
| double | dotProduct (const Distribution &dist, std::size_t numVariables, const std::vector< double > &v1, const std::vector< double > &v2) |
| Computes the dot product between two vectors of obs distributed across MPI ranks. More... | |
| std::size_t | globalNumNonMissingObs (const Distribution &dist, size_t numVariables, const std::vector< double > &v) |
| Counts unique non-missing observations in a vector. More... | |
Inefficient distribution.
This class implements distribution that has copies of all observations on each processor (to be used for testing)
Definition at line 29 of file InefficientDistribution.h.
|
explicit |
Definition at line 29 of file InefficientDistribution.cc.
| ioda::InefficientDistribution::~InefficientDistribution | ( | ) |
Definition at line 36 of file InefficientDistribution.cc.
|
inlineoverridevirtual |
Implements ioda::Distribution.
Definition at line 66 of file InefficientDistribution.h.
|
inlineoverridevirtual |
Implements ioda::Distribution.
Definition at line 65 of file InefficientDistribution.h.
|
inlineoverridevirtual |
Implements ioda::Distribution.
Definition at line 64 of file InefficientDistribution.h.
|
inlineoverridevirtual |
Gather observation data from all processes and deliver the combined data to all processes.
| [in,out] | x | On input: a vector whose ith element is associated with the ith observation held by the calling process. On output: a concatenation of the vectors x passed by all calling processes, with duplicates removed (i.e. if any observations are duplicated across multiple processes, the elements of x corresponding to these data are included only once). |
Implements ioda::Distribution.
Definition at line 63 of file InefficientDistribution.h.
|
inlineoverridevirtual |
Implements ioda::Distribution.
Definition at line 68 of file InefficientDistribution.h.
|
inlineoverridevirtual |
Implements ioda::Distribution.
Definition at line 67 of file InefficientDistribution.h.
|
overrideprivatevirtual |
Implements ioda::Distribution.
Definition at line 88 of file InefficientDistribution.cc.

|
overrideprivatevirtual |
Implements ioda::Distribution.
Definition at line 83 of file InefficientDistribution.cc.

|
overrideprivatevirtual |
Create an object that can be used to calculate the sums of multiple location-dependent quantities over locations held on all PEs, each taken into account only once even if it's held on multiple PEs.
| init | A vector of as many elements as there are sums to calculate. The values of these elements are ignored. |
Implements ioda::Distribution.
Definition at line 73 of file InefficientDistribution.cc.

|
overrideprivatevirtual |
Implements ioda::Distribution.
Definition at line 78 of file InefficientDistribution.cc.

|
overrideprivatevirtual |
Implements ioda::Distribution.
Definition at line 68 of file InefficientDistribution.cc.

|
overrideprivatevirtual |
Implements ioda::Distribution.
Definition at line 63 of file InefficientDistribution.cc.

|
overrideprivatevirtual |
Create an object that can be used to calculate the sum of a location-dependent quantity over locations held on all PEs, each taken into account only once even if it's held on multiple PEs.
| init | Used only to select the right overload – the value is ignored. |
Implements ioda::Distribution.
Definition at line 53 of file InefficientDistribution.cc.

|
overrideprivatevirtual |
Implements ioda::Distribution.
Definition at line 58 of file InefficientDistribution.cc.

|
private |
Definition at line 94 of file InefficientDistribution.cc.

|
overridevirtual |
Map the index of a location held on the calling process to the index of the corresponding element of any vector produced by allGatherv().
Implements ioda::Distribution.
Definition at line 99 of file InefficientDistribution.cc.
|
inlineoverridevirtual |
Returns true if the distribution assigns all records to all PEs, false otherwise.
Reimplemented from ioda::Distribution.
Definition at line 35 of file InefficientDistribution.h.
|
inlineoverridevirtual |
Returns true if record RecNum has been assigned to the calling PE during a previous call to assignRecord().
Clients can use this function to determine which records to keep when reading in observations.
Implements ioda::Distribution.
Definition at line 37 of file InefficientDistribution.h.
|
inlineoverridevirtual |
Implements ioda::Distribution.
Definition at line 56 of file InefficientDistribution.h.
|
inlineoverridevirtual |
Implements ioda::Distribution.
Definition at line 55 of file InefficientDistribution.h.
|
inlineoverridevirtual |
Calculates the global maximum (over all locations on all PEs) of a location-dependent quantity.
| [in,out] | x | On input, the local maximum (over all locations on the current PE) of a location-dependent quantity. On output, its global maximum. |
Implements ioda::Distribution.
Definition at line 53 of file InefficientDistribution.h.
|
inlineoverridevirtual |
Implements ioda::Distribution.
Definition at line 54 of file InefficientDistribution.h.
|
inlineoverridevirtual |
Implements ioda::Distribution.
Definition at line 60 of file InefficientDistribution.h.
|
inlineoverridevirtual |
Implements ioda::Distribution.
Definition at line 59 of file InefficientDistribution.h.
|
inlineoverridevirtual |
Calculates the global maxima (over all locations on all PEs) of multiple location-dependent quantities.
| [in,out] | x | On input, each element of x should be the local maximum (over all locations on the current PE) of a location-dependent quantity. On output, that element will be set to the global maximum of that quantity. |
Implements ioda::Distribution.
Definition at line 57 of file InefficientDistribution.h.
|
inlineoverridevirtual |
Implements ioda::Distribution.
Definition at line 58 of file InefficientDistribution.h.
|
inlineoverridevirtual |
Implements ioda::Distribution.
Definition at line 47 of file InefficientDistribution.h.
|
inlineoverridevirtual |
Implements ioda::Distribution.
Definition at line 46 of file InefficientDistribution.h.
|
inlineoverridevirtual |
Calculates the global minimum (over all locations on all PEs) of a location-dependent quantity.
| [in,out] | x | On input, the local minimum (over all locations on the current PE) of a location-dependent quantity. On output, its global minimum. |
Implements ioda::Distribution.
Definition at line 44 of file InefficientDistribution.h.
|
inlineoverridevirtual |
Implements ioda::Distribution.
Definition at line 45 of file InefficientDistribution.h.
|
inlineoverridevirtual |
Implements ioda::Distribution.
Definition at line 51 of file InefficientDistribution.h.
|
inlineoverridevirtual |
Implements ioda::Distribution.
Definition at line 50 of file InefficientDistribution.h.
|
inlineoverridevirtual |
Calculates the global minima (over all locations on all PEs) of multiple location-dependent quantities.
| [in,out] | x | On input, each element of x should be the local minimum (over all locations on the current PE) of a location-dependent quantity. On output, that element will be set to the global minimum of that quantity. |
Implements ioda::Distribution.
Definition at line 48 of file InefficientDistribution.h.
|
inlineoverridevirtual |
Implements ioda::Distribution.
Definition at line 49 of file InefficientDistribution.h.
|
inlineoverridevirtual |
Implements ioda::Distribution.
Definition at line 72 of file InefficientDistribution.h.

|
overridevirtual |
Sets each element of the provided vector to true if the corresponding location is a "patch obs", i.e.
it belongs to a record owned by this PE, and to false otherwise.
| isPatchObs | Preallocated vector of as many elements as there are locations on this PE. |
Implements ioda::Distribution.
Definition at line 41 of file InefficientDistribution.cc.
|
private |
Definition at line 97 of file InefficientDistribution.h.