OOPS
oops::mpi Namespace Reference

Functions

const eckit::mpi::Comm & world ()
 Default communicator with all MPI tasks (ie MPI_COMM_WORLD) More...
 
const eckit::mpi::Comm & myself ()
 Default communicator with each MPI task by itself. More...
 
void gather (const eckit::mpi::Comm &comm, const std::vector< double > &send, std::vector< double > &recv, const size_t root)
 
void allGather (const eckit::mpi::Comm &comm, const Eigen::VectorXd &sendbuf, std::vector< Eigen::VectorXd > &recvbuf)
 
template<typename SERIALIZABLE >
void send (const eckit::mpi::Comm &comm, const SERIALIZABLE &sendobj, const int dest, const int tag)
 Extend eckit Comm for Serializable oops objects. More...
 
template<typename SERIALIZABLE >
void receive (const eckit::mpi::Comm &comm, SERIALIZABLE &recvobj, const int source, const int tag)
 
template<typename SERIALIZABLE >
void gather (const eckit::mpi::Comm &comm, const std::vector< SERIALIZABLE > &send, std::vector< SERIALIZABLE > &recv, const size_t root)
 
template<typename CIter , typename Iter >
void allGathervUsingSerialize (const eckit::mpi::Comm &comm, CIter first, CIter last, Iter recvbuf)
 A wrapper around the MPI all gather operation for serializable types. More...
 

Function Documentation

◆ allGather()

void oops::mpi::allGather ( const eckit::mpi::Comm &  comm,
const Eigen::VectorXd &  sendbuf,
std::vector< Eigen::VectorXd > &  recvbuf 
)

Definition at line 58 of file oops/mpi/mpi.cc.

Here is the caller graph for this function:

◆ allGathervUsingSerialize()

template<typename CIter , typename Iter >
void oops::mpi::allGathervUsingSerialize ( const eckit::mpi::Comm &  comm,
CIter  first,
CIter  last,
Iter  recvbuf 
)

A wrapper around the MPI all gather operation for serializable types.

The all gather operation gathers data from all tasks and delivers the combined data to all tasks. This wrapper performs that operation for collections of non-primitive types that nevertheless support the OOPS serialization interface, i.e. provide the functions

void serialize(std::vector<double> &vect) const;
void deserialize(const std::vector<double> &vect, size_t &current);

An example of such a type is util::DateTime.

Parameters
commCommunicator.
first,lastRange of values to be delivered from this task to all other tasks.
recvbufOutput iterator to the beginning of the range to receive the combined data from all tasks.

Definition at line 107 of file oops/mpi/mpi.h.

Here is the caller graph for this function:

◆ gather() [1/2]

void oops::mpi::gather ( const eckit::mpi::Comm &  comm,
const std::vector< double > &  send,
std::vector< double > &  recv,
const size_t  root 
)

Definition at line 34 of file oops/mpi/mpi.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ gather() [2/2]

template<typename SERIALIZABLE >
void oops::mpi::gather ( const eckit::mpi::Comm &  comm,
const std::vector< SERIALIZABLE > &  send,
std::vector< SERIALIZABLE > &  recv,
const size_t  root 
)

Definition at line 64 of file oops/mpi/mpi.h.

Here is the call graph for this function:

◆ myself()

const eckit::mpi::Comm & oops::mpi::myself ( )

Default communicator with each MPI task by itself.

Definition at line 28 of file oops/mpi/mpi.cc.

Here is the caller graph for this function:

◆ receive()

template<typename SERIALIZABLE >
void oops::mpi::receive ( const eckit::mpi::Comm &  comm,
SERIALIZABLE &  recvobj,
const int  source,
const int  tag 
)

Definition at line 46 of file oops/mpi/mpi.h.

Here is the caller graph for this function:

◆ send()

template<typename SERIALIZABLE >
void oops::mpi::send ( const eckit::mpi::Comm &  comm,
const SERIALIZABLE &  sendobj,
const int  dest,
const int  tag 
)

Extend eckit Comm for Serializable oops objects.

Definition at line 36 of file oops/mpi/mpi.h.

Here is the caller graph for this function:

◆ world()

const eckit::mpi::Comm & oops::mpi::world ( )

Default communicator with all MPI tasks (ie MPI_COMM_WORLD)

Definition at line 22 of file oops/mpi/mpi.cc.

Here is the caller graph for this function: