TIMPI
|
#include <communicator.h>
Public Types | |
enum | SendMode { DEFAULT =0, SYNCHRONOUS } |
Whether to use default or synchronous sends? More... | |
enum | SyncType { NBX, ALLTOALL_COUNTS, SENDRECEIVE } |
What algorithm to use for parallel synchronization? More... | |
Public Member Functions | |
Communicator ()=default | |
Communicator (const TIMPI::communicator &comm) | |
Communicator (const Communicator &)=delete | |
Communicator & | operator= (const Communicator &)=delete |
Communicator (Communicator &&)=default | |
Communicator & | operator= (Communicator &&)=default |
~Communicator ()=default | |
void | split (int color, int key, Communicator &target) const |
void | split_by_type (int split_type, int key, info i, Communicator &target) const |
void | duplicate (const Communicator &comm) |
void | duplicate (const communicator &comm) |
communicator & | get () |
const communicator & | get () const |
MessageTag | get_unique_tag (int tagvalue=MessageTag::invalid_tag) const |
Get a tag that is unique to this Communicator. More... | |
void | reference_unique_tag (int tagvalue) const |
Reference an already-acquired tag, so that we know it will be dereferenced multiple times before we can re-release it. More... | |
void | dereference_unique_tag (int tagvalue) const |
Dereference an already-acquired tag, and see if we can re-release it. More... | |
void | clear () |
Free and reset this communicator. More... | |
processor_id_type | rank () const |
processor_id_type | size () const |
constexpr processor_id_type | size () const |
template<typename Map , typename std::enable_if< std::is_base_of< DataType, StandardType< typename Map::key_type >>::value &&std::is_base_of< DataType, StandardType< typename Map::mapped_type >>::value, int >::type > | |
void | map_broadcast (Map &timpi_mpi_var(data), const unsigned int root_id, const bool timpi_mpi_var(identical_sizes)) const |
template<typename Map > | |
void | map_broadcast (Map &timpi_mpi_var(data), const unsigned int root_id, const bool timpi_mpi_var(identical_sizes)) const |
void | send_mode (const SendMode sm) |
Explicitly sets the SendMode type used for send operations. More... | |
SendMode | send_mode () const |
Gets the user-requested SendMode. More... | |
void | sync_type (const SyncType st) |
Explicitly sets the SyncType used for sync operations. More... | |
void | sync_type (const std::string &st) |
Sets the sync type used for sync operations via a string. More... | |
SyncType | sync_type () const |
Gets the user-requested SyncType. More... | |
void | barrier () const |
Pause execution until all processors reach a certain point. More... | |
void | nonblocking_barrier (Request &req) const |
Start a barrier that doesn't block. More... | |
template<typename T > | |
timpi_pure bool | verify (const T &r) const |
Check whether a local variable has the same value on all processors, returning true if it does or false if not. More... | |
template<typename T > | |
bool | verify (const T &r) const |
template<typename T > | |
timpi_pure bool | semiverify (const T *r) const |
Check whether a local pointer points to the same value on all processors where it is not null, returning true if it does or false if not. More... | |
template<typename T > | |
bool | semiverify (const T *r) const |
template<typename T > | |
void | min (const T &r, T &o, Request &req) const |
Non-blocking minimum of the local value r into o with the request req . More... | |
template<typename T > | |
void | min (T &r) const |
Take a local variable and replace it with the minimum of it's values on all processors. More... | |
template<typename T > | |
void | min (T &timpi_mpi_var(r)) const |
template<typename A > | |
void | min (std::vector< bool, A > &r) const |
template<typename T > | |
void | minloc (T &r, unsigned int &min_id) const |
Take a local variable and replace it with the minimum of it's values on all processors, returning the minimum rank of a processor which originally held the minimum value. More... | |
template<typename T , typename A1 , typename A2 > | |
void | minloc (std::vector< T, A1 > &r, std::vector< unsigned int, A2 > &min_id) const |
Take a vector of local variables and replace each entry with the minimum of it's values on all processors. More... | |
template<typename A1 , typename A2 > | |
void | minloc (std::vector< bool, A1 > &r, std::vector< unsigned int, A2 > &min_id) const |
template<typename T > | |
void | max (const T &r, T &o, Request &req) const |
Non-blocking maximum of the local value r into o with the request req . More... | |
template<typename T > | |
void | max (T &r) const |
Take a local variable and replace it with the maximum of it's values on all processors. More... | |
template<typename T > | |
void | max (T &timpi_mpi_var(r)) const |
template<typename A > | |
void | max (std::vector< bool, A > &r) const |
template<typename T > | |
void | maxloc (T &r, unsigned int &max_id) const |
Take a local variable and replace it with the maximum of it's values on all processors, returning the minimum rank of a processor which originally held the maximum value. More... | |
template<typename T , typename A1 , typename A2 > | |
void | maxloc (std::vector< T, A1 > &r, std::vector< unsigned int, A2 > &max_id) const |
Take a vector of local variables and replace each entry with the maximum of it's values on all processors. More... | |
template<typename A1 , typename A2 > | |
void | maxloc (std::vector< bool, A1 > &r, std::vector< unsigned int, A2 > &max_id) const |
template<typename T > | |
void | sum (T &r) const |
Take a local variable and replace it with the sum of it's values on all processors. More... | |
template<typename T > | |
void | sum (const T &r, T &o, Request &req) const |
Non-blocking sum of the local value r into o with the request req . More... | |
template<typename T > | |
void | sum (T &timpi_mpi_var(r)) const |
template<typename T > | |
void | sum (std::complex< T > &timpi_mpi_var(r)) const |
template<typename T > | |
void | set_union (T &data, const unsigned int root_id) const |
Take a container (set, map, unordered_set, multimap, etc) of local variables on each processor, and collect their union over all processors, replacing the original on the processor with rank root_id . More... | |
template<typename T > | |
void | set_union (T &data) const |
Take a container of local variables on each processor, and replace it with their union over all processors, replacing the original on all processors. More... | |
status | probe (const unsigned int src_processor_id, const MessageTag &tag=any_tag) const |
Blocking message probe. More... | |
template<typename T > | |
Status | packed_range_probe (const unsigned int src_processor_id, const MessageTag &tag, bool &flag) const |
Non-Blocking message probe for a packed range message. More... | |
template<typename T > | |
void | send (const unsigned int dest_processor_id, const T &buf, const MessageTag &tag=no_tag) const |
Blocking-send to one processor with data-defined type. More... | |
template<typename T > | |
void | send (const unsigned int dest_processor_id, const T &buf, Request &req, const MessageTag &tag=no_tag) const |
Nonblocking-send to one processor with data-defined type. More... | |
template<typename T > | |
void | send (const unsigned int dest_processor_id, const T &buf, const DataType &type, const MessageTag &tag=no_tag) const |
Blocking-send to one processor with user-defined type. More... | |
template<typename T > | |
void | send (const unsigned int dest_processor_id, const T &buf, const DataType &type, Request &req, const MessageTag &tag=no_tag) const |
Nonblocking-send to one processor with user-defined type. More... | |
template<typename T > | |
void | send (const unsigned int dest_processor_id, const T &buf, const NotADataType &type, Request &req, const MessageTag &tag=no_tag) const |
Nonblocking-send to one processor with user-defined packable type. More... | |
template<typename T > | |
void | send (const unsigned int dest_processor_id, const std::basic_string< T > &buf, const MessageTag &tag) const |
template<typename T > | |
void | send (const unsigned int dest_processor_id, const std::basic_string< T > &buf, Request &req, const MessageTag &tag) const |
template<typename T > | |
Status | receive (const unsigned int dest_processor_id, T &buf, const MessageTag &tag=any_tag) const |
Blocking-receive from one processor with data-defined type. More... | |
template<typename T > | |
void | receive (const unsigned int dest_processor_id, T &buf, Request &req, const MessageTag &tag=any_tag) const |
Nonblocking-receive from one processor with data-defined type. More... | |
template<typename T > | |
Status | receive (const unsigned int dest_processor_id, T &buf, const DataType &type, const MessageTag &tag=any_tag) const |
Blocking-receive from one processor with user-defined type. More... | |
template<typename T > | |
void | receive (const unsigned int dest_processor_id, T &buf, const DataType &type, Request &req, const MessageTag &tag=any_tag) const |
Nonblocking-receive from one processor with user-defined type. More... | |
template<typename T > | |
Status | receive (const unsigned int src_processor_id, std::basic_string< T > &buf, const MessageTag &tag) const |
template<typename T > | |
void | receive (const unsigned int src_processor_id, std::basic_string< T > &buf, Request &req, const MessageTag &tag) const |
template<typename T , typename A , typename std::enable_if< std::is_base_of< DataType, StandardType< T >>::value, int >::type = 0> | |
bool | possibly_receive (unsigned int &src_processor_id, std::vector< T, A > &buf, Request &req, const MessageTag &tag) const |
Nonblocking-receive from one processor with user-defined type. More... | |
template<typename T , typename A , typename std::enable_if< Has_buffer_type< Packing< T >>::value, int >::type = 0> | |
bool | possibly_receive (unsigned int &src_processor_id, std::vector< T, A > &buf, Request &req, const MessageTag &tag) const |
dispatches to possibly_receive_packed_range More... | |
template<typename T , typename A , typename std::enable_if< std::is_base_of< DataType, StandardType< T >>::value, int >::type = 0> | |
bool | possibly_receive (unsigned int &src_processor_id, std::vector< T, A > &buf, const DataType &type, Request &req, const MessageTag &tag) const |
Nonblocking-receive from one processor with user-defined type. More... | |
template<typename T , typename A , typename std::enable_if< Has_buffer_type< Packing< T >>::value, int >::type = 0> | |
bool | possibly_receive (unsigned int &src_processor_id, std::vector< T, A > &buf, const NotADataType &type, Request &req, const MessageTag &tag) const |
Nonblocking-receive from one processor with user-defined type. More... | |
template<typename T , typename A1 , typename A2 > | |
bool | possibly_receive (unsigned int &src_processor_id, std::vector< std::vector< T, A1 >, A2 > &buf, const DataType &type, Request &req, const MessageTag &tag) const |
template<typename T , typename A1 , typename A2 > | |
bool | possibly_receive (unsigned int &src_processor_id, std::vector< std::vector< T, A1 >, A2 > &buf, Request &req, const MessageTag &tag) const |
template<typename Context , typename OutputIter , typename T > | |
bool | possibly_receive_packed_range (unsigned int &src_processor_id, Context *context, OutputIter out, const T *output_type, Request &req, const MessageTag &tag) const |
Nonblocking packed range receive from one processor with user-defined type. More... | |
template<typename Context , typename Iter > | |
void | send_packed_range (const unsigned int dest_processor_id, const Context *context, Iter range_begin, const Iter range_end, const MessageTag &tag=no_tag, std::size_t approx_buffer_size=1000000) const |
Blocking-send range-of-pointers to one processor. More... | |
template<typename Context , typename Iter > | |
void | send_packed_range (const unsigned int dest_processor_id, const Context *context, Iter range_begin, const Iter range_end, Request &req, const MessageTag &tag=no_tag, std::size_t approx_buffer_size=1000000) const |
Nonblocking-send range-of-pointers to one processor. More... | |
template<typename Context , typename Iter > | |
void | nonblocking_send_packed_range (const unsigned int dest_processor_id, const Context *context, Iter range_begin, const Iter range_end, Request &req, const MessageTag &tag=no_tag) const |
Similar to the above Nonblocking send_packed_range with a few important differences: More... | |
template<typename Context , typename Iter > | |
void | nonblocking_send_packed_range (const unsigned int dest_processor_id, const Context *context, Iter range_begin, const Iter range_end, Request &req, std::shared_ptr< std::vector< typename TIMPI::Packing< typename std::iterator_traits< Iter >::value_type >::buffer_type >> &buffer, const MessageTag &tag=no_tag) const |
Similar to the above Nonblocking send_packed_range with a few important differences: More... | |
template<typename Context , typename Iter > | |
void | nonblocking_send_packed_range (const unsigned int dest_processor_id, const Context *context, Iter range_begin, const Iter range_end, Request &req, std::shared_ptr< std::vector< typename Packing< typename std::iterator_traits< Iter >::value_type >::buffer_type >> &buffer, const MessageTag &tag) const |
template<typename Context , typename OutputIter , typename T > | |
void | receive_packed_range (const unsigned int dest_processor_id, Context *context, OutputIter out, const T *output_type, const MessageTag &tag=any_tag) const |
Blocking-receive range-of-pointers from one processor. More... | |
template<typename Context , typename OutputIter , typename T > | |
void | nonblocking_receive_packed_range (const unsigned int src_processor_id, Context *context, OutputIter out, const T *output_type, Request &req, Status &stat, const MessageTag &tag=any_tag) const |
Non-Blocking-receive range-of-pointers from one processor. More... | |
template<typename Context , typename OutputIter , typename T > | |
void | nonblocking_receive_packed_range (const unsigned int src_processor_id, Context *context, OutputIter out, const T *output_type, Request &req, Status &stat, std::shared_ptr< std::vector< typename TIMPI::Packing< T >::buffer_type >> &buffer, const MessageTag &tag=any_tag) const |
Non-Blocking-receive range-of-pointers from one processor. More... | |
template<typename Context , typename OutputIter , typename T > | |
void | nonblocking_receive_packed_range (const unsigned int src_processor_id, Context *context, OutputIter out, const T *, Request &req, Status &stat, std::shared_ptr< std::vector< typename Packing< T >::buffer_type >> &buffer, const MessageTag &tag) const |
template<typename T1 , typename T2 , typename std::enable_if< std::is_base_of< DataType, StandardType< T1 >>::value &&std::is_base_of< DataType, StandardType< T2 >>::value, int >::type = 0> | |
void | send_receive (const unsigned int dest_processor_id, const T1 &send_data, const unsigned int source_processor_id, T2 &recv_data, const MessageTag &send_tag=no_tag, const MessageTag &recv_tag=any_tag) const |
Send data send to one processor while simultaneously receiving other data recv from a (potentially different) processor. More... | |
template<typename T1 , typename T2 > | |
void | send_receive (const unsigned int dest_processor_id, const T1 &send_data, const DataType &type1, const unsigned int source_processor_id, T2 &recv_data, const DataType &type2, const MessageTag &send_tag=no_tag, const MessageTag &recv_tag=any_tag) const |
Send data send to one processor while simultaneously receiving other data recv from a (potentially different) processor, using a user-specified MPI Dataype. More... | |
template<typename T , typename A , typename std::enable_if< Has_buffer_type< Packing< T >>::value, int >::type > | |
void | send_receive (const unsigned int dest_processor_id, const std::vector< T, A > &send_data, const unsigned int source_processor_id, std::vector< T, A > &recv_data, const MessageTag &send_tag, const MessageTag &recv_tag) const |
template<typename T , typename A1 , typename A2 > | |
void | send_receive (const unsigned int dest_processor_id, const std::vector< std::vector< T, A1 >, A2 > &sendvec, const unsigned int source_processor_id, std::vector< std::vector< T, A1 >, A2 > &recv, const MessageTag &send_tag, const MessageTag &recv_tag) const |
template<typename T1 , typename T2 , typename std::enable_if< std::is_base_of< DataType, StandardType< T1 >>::value &&std::is_base_of< DataType, StandardType< T2 >>::value, int >::type > | |
void | send_receive (const unsigned int timpi_dbg_var(send_tgt), const T1 &send_val, const unsigned int timpi_dbg_var(recv_source), T2 &recv_val, const MessageTag &, const MessageTag &) const |
Send-receive data from one processor. More... | |
template<typename T , typename A , typename std::enable_if< std::is_base_of< DataType, StandardType< T >>::value, int >::type > | |
void | send_receive (const unsigned int timpi_dbg_var(dest_processor_id), const std::vector< T, A > &send, const unsigned int timpi_dbg_var(source_processor_id), std::vector< T, A > &recv, const MessageTag &, const MessageTag &) const |
template<typename T , typename A1 , typename A2 > | |
void | send_receive (const unsigned int timpi_dbg_var(dest_processor_id), const std::vector< std::vector< T, A1 >, A2 > &send, const unsigned int timpi_dbg_var(source_processor_id), std::vector< std::vector< T, A1 >, A2 > &recv, const MessageTag &, const MessageTag &) const |
template<typename Context1 , typename RangeIter , typename Context2 , typename OutputIter , typename T > | |
void | send_receive_packed_range (const unsigned int dest_processor_id, const Context1 *context1, RangeIter send_begin, const RangeIter send_end, const unsigned int source_processor_id, Context2 *context2, OutputIter out, const T *output_type, const MessageTag &send_tag=no_tag, const MessageTag &recv_tag=any_tag, std::size_t approx_buffer_size=1000000) const |
Send a range-of-pointers to one processor while simultaneously receiving another range from a (potentially different) processor. More... | |
template<typename Context1 , typename RangeIter , typename Context2 , typename OutputIter , typename T > | |
void | send_receive_packed_range (const unsigned int timpi_dbg_var(dest_processor_id), const Context1 *context1, RangeIter send_begin, const RangeIter send_end, const unsigned int timpi_dbg_var(source_processor_id), Context2 *context2, OutputIter out_iter, const T *output_type, const MessageTag &, const MessageTag &, std::size_t) const |
Send-receive range-of-pointers from one processor. More... | |
template<typename T , typename A > | |
void | gather (const unsigned int root_id, const T &send_data, std::vector< T, A > &recv) const |
Take a vector of length comm.size(), and on processor root_id fill in recv[processor_id] = the value of send on processor processor_id. More... | |
template<typename T , typename A > | |
void | gather (const unsigned int root_id, const std::basic_string< T > &send_data, std::vector< std::basic_string< T >, A > &recv_data, const bool identical_buffer_sizes=false) const |
The gather overload for string types has an optional identical_buffer_sizes optimization for when all strings are the same length. More... | |
template<typename T , typename A , typename std::enable_if< std::is_base_of< DataType, StandardType< T >>::value, int >::type = 0> | |
void | gather (const unsigned int root_id, std::vector< T, A > &r) const |
Take a vector of local variables and expand it on processor root_id to include values from all processors More... | |
template<typename T , typename A , typename std::enable_if< Has_buffer_type< Packing< T >>::value, int >::type = 0> | |
void | gather (const unsigned int root_id, std::vector< T, A > &r) const |
template<typename T , typename A , typename std::enable_if< std::is_base_of< DataType, StandardType< T >>::value, int >::type = 0> | |
void | allgather (const T &send_data, std::vector< T, A > &recv_data) const |
Take a vector of length this->size() , and fill in recv [processor_id] = the value of send on that processor. More... | |
template<typename T , typename A , typename std::enable_if< Has_buffer_type< Packing< T >>::value, int >::type = 0> | |
void | allgather (const T &send_data, std::vector< T, A > &recv_data) const |
Take a vector of length this->size() , and fill in recv [processor_id] = the value of send on that processor. More... | |
template<typename T , typename A > | |
void | allgather (const std::basic_string< T > &send_data, std::vector< std::basic_string< T >, A > &recv_data, const bool identical_buffer_sizes=false) const |
The allgather overload for string types has an optional identical_buffer_sizes optimization for when all strings are the same length. More... | |
template<typename T , typename A , typename std::enable_if< std::is_base_of< DataType, StandardType< T >>::value, int >::type = 0> | |
void | allgather (std::vector< T, A > &r, const bool identical_buffer_sizes=false) const |
Take a vector of fixed size local variables and expand it to include values from all processors. More... | |
template<typename T , typename A1 , typename A2 , typename std::enable_if< std::is_base_of< DataType, StandardType< T >>::value, int >::type = 0> | |
void | allgather (const std::vector< T, A1 > &send_data, std::vector< std::vector< T, A1 >, A2 > &recv_data, const bool identical_buffer_sizes=false) const |
Take a vector of fixed size local variables and collect similar vectors from all processors. More... | |
template<typename T , typename A1 , typename A2 , typename std::enable_if< Has_buffer_type< Packing< T >>::value, int >::type = 0> | |
void | allgather (const std::vector< T, A1 > &send_data, std::vector< std::vector< T, A1 >, A2 > &recv_data, const bool identical_buffer_sizes=false) const |
Take a vector of dynamic-size local variables and collect similar vectors from all processors. More... | |
template<typename T , typename A , typename std::enable_if< Has_buffer_type< Packing< T >>::value, int >::type = 0> | |
void | allgather (std::vector< T, A > &r, const bool identical_buffer_sizes=false) const |
Take a vector of possibly dynamically sized local variables and expand it to include values from all processors. More... | |
template<typename T , typename A > | |
void | allgather (std::vector< std::basic_string< T >, A > &r, const bool identical_buffer_sizes=false) const |
AllGather overload for vectors of string types. More... | |
template<typename T , typename A > | |
void | scatter (const std::vector< T, A > &data, T &recv, const unsigned int root_id=0) const |
Take a vector of local variables and scatter the ith item to the ith processor in the communicator. More... | |
template<typename T , typename A > | |
void | scatter (const std::vector< T, A > &data, std::vector< T, A > &recv, const unsigned int root_id=0) const |
Take a vector of local variables and scatter the ith equal-sized chunk to the ith processor in the communicator. More... | |
template<typename T , typename A1 , typename A2 > | |
void | scatter (const std::vector< T, A1 > &data, const std::vector< CountType, A2 > counts, std::vector< T, A1 > &recv, const unsigned int root_id=0) const |
Take a vector of local variables and scatter the ith variable-sized chunk to the ith processor in the communicator. More... | |
template<typename T , typename A1 , typename A2 > | |
void | scatter (const std::vector< T, A1 > &data, const std::vector< int, A2 > counts, std::vector< T, A1 > &recv, const unsigned int root_id=0) const |
vector<int> based scatter, for backwards compatibility More... | |
template<typename T , typename A1 , typename A2 > | |
void | scatter (const std::vector< std::vector< T, A1 >, A2 > &data, std::vector< T, A1 > &recv, const unsigned int root_id=0, const bool identical_buffer_sizes=false) const |
Take a vector of vectors and scatter the ith inner vector to the ith processor in the communicator. More... | |
template<typename Context , typename Iter , typename OutputIter > | |
void | gather_packed_range (const unsigned int root_id, Context *context, Iter range_begin, const Iter range_end, OutputIter out, std::size_t approx_buffer_size=1000000) const |
Take a range of local variables, combine it with ranges from all processors, and write the output to the output iterator on rank root. More... | |
template<typename Context , typename Iter , typename OutputIter > | |
void | allgather_packed_range (Context *context, Iter range_begin, const Iter range_end, OutputIter out, std::size_t approx_buffer_size=1000000) const |
Take a range of local variables, combine it with ranges from all processors, and write the output to the output iterator. More... | |
template<typename T , typename A > | |
void | alltoall (std::vector< T, A > &r) const |
Effectively transposes the input vector across all processors. More... | |
template<typename T #ifdef TIMPI_HAVE_MPI, typename std::enable_if< std::is_base_of< DataType, StandardType< T >>::value, int >::type = 0 #endif> | |
void | broadcast (T &data, const unsigned int root_id=0, const bool identical_sizes=false) const |
Take a local value and broadcast it to all processors. More... | |
template<typename T , typename std::enable_if< Has_buffer_type< Packing< T >>::value, int >::type = 0> | |
void | broadcast (T &data, const unsigned int root_id=0, const bool identical_sizes=false) const |
Take a possibly dynamically-sized local value and broadcast it to all processors. More... | |
template<typename T > | |
void | broadcast (std::basic_string< T > &data, const unsigned int root_id, const bool identical_sizes) const |
template<typename T , typename A > | |
void | broadcast (std::vector< std::basic_string< T >, A > &data, const unsigned int root_id, const bool identical_sizes) const |
template<typename T #ifdef TIMPI_HAVE_MPI, typename std::enable_if< std::is_base_of< DataType, StandardType< T >>::value, int >::type # endif> | |
void | broadcast (T &timpi_mpi_var(data), const unsigned int root_id, const bool) const |
template<typename Context , typename OutputContext , typename Iter , typename OutputIter > | |
void | broadcast_packed_range (const Context *context1, Iter range_begin, const Iter range_end, OutputContext *context2, OutputIter out, const unsigned int root_id=0, std::size_t approx_buffer_size=1000000) const |
Blocking-broadcast range-of-pointers to one processor. More... | |
Definition at line 1396 of file communicator.h.
|
inherited |
Whether to use default or synchronous sends?
Enumerator | |
---|---|
DEFAULT | |
SYNCHRONOUS |
Definition at line 220 of file communicator.h.
|
inherited |
What algorithm to use for parallel synchronization?
Enumerator | |
---|---|
NBX | |
ALLTOALL_COUNTS | |
SENDRECEIVE |
Definition at line 225 of file communicator.h.
|
default |
|
inlineexplicit |
Definition at line 1399 of file communicator.h.
|
delete |
|
default |
|
default |
|
inlineinherited |
Take a vector of length this->size()
, and fill in recv
[processor_id] = the value of send
on that processor.
This overload works on fixed size types
Definition at line 3382 of file parallel_implementation.h.
References TIMPI::Communicator::size().
Referenced by TIMPI::Communicator::allgather(), TIMPI::Communicator::allgather_packed_range(), TIMPI::Communicator::gather(), TIMPI::Communicator::map_max(), TIMPI::Communicator::map_sum(), testAllGather(), testAllGatherEmptyVectorString(), testAllGatherHalfEmptyVectorString(), testAllGatherString(), testAllGatherVectorString(), testAllGatherVectorVector(), testAllGatherVectorVectorInPlace(), testAllGatherVectorVectorPacked(), testArrayContainerAllGather(), testContainerAllGather(), testMapContainerAllGather(), testPairContainerAllGather(), testTupleContainerAllGather(), and testVectorOfContainersAllGather().
|
inlineinherited |
Take a vector of length this->size()
, and fill in recv
[processor_id] = the value of send
on that processor.
This overload works on potentially dynamically sized types, and dispatches to allgather_packed_range
|
inlineinherited |
The allgather overload for string types has an optional identical_buffer_sizes optimization for when all strings are the same length.
Definition at line 1625 of file parallel_implementation.h.
References TIMPI::Communicator::allgather(), and TIMPI::Communicator::size().
|
inlineinherited |
Take a vector of fixed size local variables and expand it to include values from all processors.
By default, each processor is allowed to have its own unique input buffer length. If it is known that all processors have the same input sizes additional communication can be avoided.
Specifically, this function transforms this:
* Processor 0: [ ... N_0 ] * Processor 1: [ ....... N_1 ] * ... * Processor M: [ .. N_M] *
into this:
* [ [ ... N_0 ] [ ....... N_1 ] ... [ .. N_M] ] *
on each processor. This function is collective and therefore must be called by all processors in the Communicator.
Definition at line 3431 of file parallel_implementation.h.
References TIMPI::Communicator::allgather(), TIMPI::Communicator::size(), and TIMPI::Communicator::verify().
|
inlineinherited |
Take a vector of fixed size local variables and collect similar vectors from all processors.
By default, each processor is allowed to have its own unique input buffer length. If it is known that all processors have the same input sizes additional communication can be avoided.
Definition at line 2833 of file parallel_implementation.h.
References TIMPI::Communicator::allgather(), TIMPI::Communicator::assign(), and TIMPI::Communicator::size().
|
inlineinherited |
Take a vector of dynamic-size local variables and collect similar vectors from all processors.
|
inlineinherited |
Take a vector of possibly dynamically sized local variables and expand it to include values from all processors.
By default, each processor is allowed to have its own unique input buffer length. If it is known that all processors have the same input sizes additional communication can be avoided.
Specifically, this function transforms this:
* Processor 0: [ ... N_0 ] * Processor 1: [ ....... N_1 ] * ... * Processor M: [ .. N_M] *
into this:
* [ [ ... N_0 ] [ ....... N_1 ] ... [ .. N_M] ] *
on each processor. This function is collective and therefore must be called by all processors in the Communicator.
|
inlineinherited |
AllGather overload for vectors of string types.
Definition at line 3547 of file parallel_implementation.h.
References TIMPI::Communicator::allgather(), TIMPI::Communicator::size(), and TIMPI::Communicator::verify().
|
inlineinherited |
Take a range of local variables, combine it with ranges from all processors, and write the output to the output iterator.
The approximate maximum size (in entries; number of bytes will likely be 4x or 8x larger) to use in a single data vector buffer to send can be specified for performance or memory usage reasons; if the range cannot be packed into a single buffer of this size then multiple buffers and messages will be used.
Note that the received data vector sizes will be the sum of the sent vector sizes; a smaller-than-default size may be useful for users on many processors, in cases where all-to-one communication cannot be avoided entirely.
Definition at line 4228 of file parallel_implementation.h.
References TIMPI::Communicator::allgather(), TIMPI::Communicator::max(), TIMPI::pack_range(), and TIMPI::unpack_range().
Referenced by testGettableStringAllGather(), testNestingAllGather(), testNullAllGather(), and testTupleStringAllGather().
|
inlineinherited |
Effectively transposes the input vector across all processors.
The jth entry on processor i is replaced with the ith entry from processor j.
Definition at line 3830 of file parallel_implementation.h.
References TIMPI::ignore(), TIMPI::Communicator::size(), and TIMPI::Communicator::verify().
Referenced by TIMPI::detail::push_parallel_alltoall_helper().
|
inherited |
Pause execution until all processors reach a certain point.
Definition at line 225 of file communicator.C.
References TIMPI::Communicator::size().
Referenced by testBarrier(), and TIMPI::TIMPIInit::~TIMPIInit().
|
inlineinherited |
Take a local value and broadcast it to all processors.
Optionally takes the root_id
processor, which specifies the processor initiating the broadcast.
If data
is a container, it will be resized on target processors. When using pre-sized target containers, specify identical_sizes=true
on all processors for an optimization.
Fixed variant
Definition at line 3888 of file parallel_implementation.h.
References TIMPI::Communicator::broadcast_packed_range(), TIMPI::ignore(), TIMPI::Communicator::rank(), and TIMPI::Communicator::size().
Referenced by TIMPI::Communicator::broadcast(), TIMPI::Communicator::broadcast_packed_range(), TIMPI::Communicator::map_broadcast(), TIMPI::Communicator::scatter(), testBroadcast(), testBroadcastArrayType(), testBroadcastNestedType(), testBroadcastString(), testContainerBroadcast(), and testVectorOfContainersBroadcast().
|
inlineinherited |
Take a possibly dynamically-sized local value and broadcast it to all processors.
Optionally takes the root_id
processor, which specifies the processor initiating the broadcast.
If data
is a container, it will be resized on target processors. When using pre-sized target containers, specify identical_sizes=true
on all processors for an optimization.
Dynamic variant
|
inlineinherited |
Definition at line 1716 of file parallel_implementation.h.
References TIMPI::Communicator::broadcast(), TIMPI::Communicator::rank(), TIMPI::Communicator::size(), and TIMPI::Communicator::verify().
|
inlineinherited |
The strings will be packed in one long array with the size of each string preceding the actual characters
Definition at line 1760 of file parallel_implementation.h.
References TIMPI::Communicator::broadcast(), TIMPI::Communicator::rank(), TIMPI::Communicator::size(), and TIMPI::Communicator::verify().
|
inlineinherited |
Definition at line 3863 of file parallel_implementation.h.
References TIMPI::ignore(), TIMPI::Communicator::rank(), and TIMPI::Communicator::size().
|
inlineinherited |
Blocking-broadcast range-of-pointers to one processor.
This function does not send the raw pointers, but rather constructs new objects at the other end whose contents match the objects pointed to by the sender.
void TIMPI::pack(const T *, vector<int> & data, const Context *) is used to serialize type T onto the end of a data vector.
unsigned int TIMPI::packable_size(const T *, const Context *) is used to allow data vectors to reserve memory, and for additional error checking
unsigned int TIMPI::packed_size(const T *, vector<int>::const_iterator) is used to advance to the beginning of the next object's data.
The approximate maximum size (in entries; number of bytes will likely be 4x or 8x larger) to use in a single data vector buffer can be specified for performance or memory usage reasons; if the range cannot be packed into a single buffer of this size then multiple buffers and messages will be used.
Definition at line 4130 of file parallel_implementation.h.
References TIMPI::Communicator::broadcast(), TIMPI::pack_range(), TIMPI::Communicator::rank(), TIMPI::Communicator::size(), and TIMPI::unpack_range().
Referenced by TIMPI::Communicator::broadcast().
|
inherited |
Free and reset this communicator.
Definition at line 162 of file communicator.C.
References TIMPI::Communicator::_communicator, and TIMPI::Communicator::_I_duped_it.
Referenced by TIMPI::Communicator::operator=(), TIMPI::Communicator::split(), TIMPI::Communicator::split_by_type(), and TIMPI::Communicator::~Communicator().
|
inherited |
Dereference an already-acquired tag, and see if we can re-release it.
Definition at line 46 of file communicator.C.
References TIMPI::Communicator::used_tag_values.
Referenced by TIMPI::MessageTag::operator=(), and TIMPI::MessageTag::~MessageTag().
|
inherited |
Definition at line 137 of file communicator.C.
References TIMPI::Communicator::_communicator, TIMPI::Communicator::send_mode(), and TIMPI::Communicator::sync_type().
Referenced by testGetUniqueTagAuto(), and testStringSyncType().
|
inherited |
Definition at line 146 of file communicator.C.
References TIMPI::Communicator::_communicator, TIMPI::Communicator::_I_duped_it, and TIMPI::Communicator::assign().
|
inlineinherited |
Take a vector of length comm.size(), and on processor root_id fill in recv[processor_id] = the value of send on processor processor_id.
Definition at line 3218 of file parallel_implementation.h.
References TIMPI::Communicator::rank(), and TIMPI::Communicator::size().
Referenced by TIMPI::Communicator::gather(), TIMPI::Communicator::gather_packed_range(), testGather(), testGatherString(), and testGatherString2().
|
inlineinherited |
The gather overload for string types has an optional identical_buffer_sizes optimization for when all strings are the same length.
Definition at line 3318 of file parallel_implementation.h.
References TIMPI::Communicator::gather(), TIMPI::Communicator::rank(), and TIMPI::Communicator::size().
|
inlineinherited |
Take a vector of local variables and expand it on processor root_id to include values from all processors
This handles the case where the lengths of the vectors may vary. Specifically, this function transforms this:
* Processor 0: [ ... N_0 ] * Processor 1: [ ....... N_1 ] * ... * Processor M: [ .. N_M] *
into this:
* [ [ ... N_0 ] [ ....... N_1 ] ... [ .. N_M] ] *
on processor root_id. This function is collective and therefore must be called by all processors in the Communicator.
If the type T is a standard (fixed-size) type then we use a standard MPI_Gatherv; if it is a packable variable-size type then we dispatch to gather_packed_range.
Definition at line 3248 of file parallel_implementation.h.
References TIMPI::Communicator::allgather(), TIMPI::Communicator::rank(), and TIMPI::Communicator::size().
|
inlineinherited |
|
inlineinherited |
Take a range of local variables, combine it with ranges from all processors, and write the output to the output iterator on rank root.
The approximate maximum size (in entries; number of bytes will likely be 4x or 8x larger) to use in a single data vector buffer to send can be specified for performance or memory usage reasons; if the range cannot be packed into a single buffer of this size then multiple buffers and messages will be used.
Note that the received data vector sizes will be the sum of the sent vector sizes; a smaller-than-default size may be useful for users on many processors, in cases where all-to-one communication cannot be avoided entirely.
Definition at line 4188 of file parallel_implementation.h.
References TIMPI::Communicator::gather(), TIMPI::Communicator::max(), TIMPI::pack_range(), and TIMPI::unpack_range().
|
inlineinherited |
Definition at line 167 of file communicator.h.
References TIMPI::Communicator::_communicator.
Referenced by TIMPI::PostWaitUnpackNestedBuffer< Container >::run(), and testMPIULongMin().
|
inlineinherited |
|
inherited |
Get a tag that is unique to this Communicator.
A requested tag value may be provided. If no request is made then an automatic unique tag value will be generated; such usage of get_unique_tag() must be done on every processor in a consistent order.
tagvalue
unspecified is recommended in most cases. Manually selecting tag values is dangerous, as tag values may be freed and reselected earlier than expected in asynchronous communication algorithms. Definition at line 251 of file communicator.C.
References TIMPI::Communicator::_max_tag, TIMPI::Communicator::_next_tag, TIMPI::MessageTag::invalid_tag, TIMPI::Communicator::max(), and TIMPI::Communicator::used_tag_values.
Referenced by TIMPI::pull_parallel_vector_data(), TIMPI::detail::push_parallel_alltoall_helper(), TIMPI::detail::push_parallel_nbx_helper(), TIMPI::detail::push_parallel_roundrobin_helper(), testGetUniqueTagAuto(), testGetUniqueTagManual(), and testGetUniqueTagOverlap().
|
inlineinherited |
Definition at line 4005 of file parallel_implementation.h.
References TIMPI::Communicator::broadcast(), TIMPI::ignore(), TIMPI::Communicator::rank(), TIMPI::Communicator::size(), and TIMPI::Communicator::verify().
|
inlineinherited |
Definition at line 4051 of file parallel_implementation.h.
References TIMPI::ignore().
|
inlineinherited |
Non-blocking maximum of the local value r
into o
with the request req
.
Definition at line 2356 of file parallel_implementation.h.
References TIMPI::Request::get(), TIMPI::Request::null_request, and TIMPI::Communicator::size().
Referenced by TIMPI::Communicator::allgather_packed_range(), TIMPI::detail::empty_send_assertion(), TIMPI::Communicator::gather_packed_range(), TIMPI::Communicator::get_unique_tag(), TIMPI::detail::push_parallel_roundrobin_helper(), TIMPI::Communicator::semiverify(), testInfinityMax(), testMapMax(), testMax(), testMaxVecBool(), testNonblockingMax(), testNonFixedTypeMapMax(), and TIMPI::Communicator::verify().
|
inlineinherited |
Take a local variable and replace it with the maximum of it's values on all processors.
Containers are replaced element-wise.
|
inlineinherited |
|
inlineinherited |
Definition at line 2410 of file parallel_implementation.h.
References TIMPI::Communicator::size(), and TIMPI::Communicator::verify().
|
inlineinherited |
Take a local variable and replace it with the maximum of it's values on all processors, returning the minimum rank of a processor which originally held the maximum value.
Definition at line 2548 of file parallel_implementation.h.
References TIMPI::ignore(), TIMPI::DataPlusInt< T >::rank, TIMPI::Communicator::rank(), TIMPI::Communicator::size(), and TIMPI::DataPlusInt< T >::val.
Referenced by testMaxloc(), testMaxlocBool(), testMaxlocDouble(), and testMaxlocPair().
|
inlineinherited |
Take a vector of local variables and replace each entry with the maximum of it's values on all processors.
Set each min_id
entry to the minimum rank where a corresponding maximum was found.
Definition at line 2573 of file parallel_implementation.h.
References TIMPI::Communicator::rank(), TIMPI::Communicator::size(), and TIMPI::Communicator::verify().
|
inlineinherited |
Definition at line 2611 of file parallel_implementation.h.
References TIMPI::Communicator::rank(), TIMPI::Communicator::size(), and TIMPI::Communicator::verify().
|
inlineinherited |
Non-blocking minimum of the local value r
into o
with the request req
.
Definition at line 2179 of file parallel_implementation.h.
References TIMPI::Request::get(), TIMPI::Request::null_request, and TIMPI::Communicator::size().
Referenced by TIMPI::Communicator::semiverify(), testInfinityMin(), testMin(), testMinLarge(), testMinVecBool(), testNonblockingMin(), testNonblockingTest(), testNonblockingWaitany(), and TIMPI::Communicator::verify().
|
inlineinherited |
Take a local variable and replace it with the minimum of it's values on all processors.
Containers are replaced element-wise.
|
inlineinherited |
|
inlineinherited |
Definition at line 2236 of file parallel_implementation.h.
References TIMPI::Communicator::size(), and TIMPI::Communicator::verify().
|
inlineinherited |
Take a local variable and replace it with the minimum of it's values on all processors, returning the minimum rank of a processor which originally held the minimum value.
Definition at line 2258 of file parallel_implementation.h.
References TIMPI::ignore(), TIMPI::DataPlusInt< T >::rank, TIMPI::Communicator::rank(), TIMPI::Communicator::size(), and TIMPI::DataPlusInt< T >::val.
Referenced by testMinloc(), testMinlocBool(), testMinlocDouble(), and testMinlocPair().
|
inlineinherited |
Take a vector of local variables and replace each entry with the minimum of it's values on all processors.
Set each min_id
entry to the minimum rank where a corresponding minimum was found.
Definition at line 2283 of file parallel_implementation.h.
References TIMPI::Communicator::rank(), TIMPI::Communicator::size(), and TIMPI::Communicator::verify().
|
inlineinherited |
Definition at line 2320 of file parallel_implementation.h.
References TIMPI::Communicator::rank(), TIMPI::Communicator::size(), and TIMPI::Communicator::verify().
|
inherited |
Start a barrier that doesn't block.
Definition at line 238 of file communicator.C.
References TIMPI::Request::get(), and TIMPI::Communicator::size().
Referenced by TIMPI::detail::push_parallel_nbx_helper().
|
inlineinherited |
Non-Blocking-receive range-of-pointers from one processor.
This is meant to receive messages from nonblocking_send_packed_range
Similar in design to the above receive_packed_range. However, this version requires a Request and a Status.
The Status must be a positively tested Status for a message of this type (i.e. a message does exist). It should most likely be generated by Communicator::packed_range_probe.
Definition at line 1286 of file parallel_implementation.h.
References TIMPI::Request::add_post_wait_work(), TIMPI::Communicator::receive(), and TIMPI::Status::size().
Referenced by TIMPI::Communicator::possibly_receive_packed_range(), and TIMPI::push_parallel_packed_range().
|
inlineinherited |
Non-Blocking-receive range-of-pointers from one processor.
This is meant to receive messages from nonblocking_send_packed_range
Similar in design to the above receive_packed_range. However, this version requires a Request and a Status.
The Status must be a positively tested Status for a message of this type (i.e. a message does exist). It should most likely be generated by Communicator::packed_range_probe.
|
inlineinherited |
Definition at line 1933 of file parallel_implementation.h.
References TIMPI::Request::add_post_wait_work(), TIMPI::Communicator::receive(), and TIMPI::Status::size().
|
inlineinherited |
Similar to the above Nonblocking send_packed_range with a few important differences:
Definition at line 773 of file parallel_implementation.h.
References TIMPI::Request::add_post_wait_work(), TIMPI::pack_range(), and TIMPI::Communicator::send().
Referenced by TIMPI::push_parallel_packed_range().
|
inlineinherited |
Similar to the above Nonblocking send_packed_range with a few important differences:
|
inlineinherited |
Definition at line 1580 of file parallel_implementation.h.
References TIMPI::Request::add_post_wait_work(), TIMPI::pack_range(), and TIMPI::Communicator::send().
|
delete |
|
default |
|
inlineinherited |
Non-Blocking message probe for a packed range message.
Allows information about a message to be examined before the message is actually received.
Template type must match the object type that will be in the packed range
src_processor_id | The processor the message is expected from or TIMPI::any_source |
tag | The message tag or TIMPI::any_tag |
flag | Output. True if a message exists. False otherwise. |
Definition at line 4270 of file parallel_implementation.h.
References TIMPI::any_source, TIMPI::Status::get(), TIMPI::ignore(), TIMPI::Communicator::size(), and TIMPI::MessageTag::value().
Referenced by TIMPI::push_parallel_packed_range().
|
inlineinherited |
Nonblocking-receive from one processor with user-defined type.
Checks to see if a message can be received from the src_processor_id . If so, it starts a non-blocking receive using the passed in request and returns true
Otherwise - if there is no message to receive it returns false
Note: The buf does NOT need to be properly sized before this call this will resize the buffer automatically
src_processor_id | The pid to receive from or "any". will be set to the actual src being received from |
buf | The buffer to receive into |
req | The request to use |
tag | The tag to use |
Definition at line 4300 of file parallel_implementation.h.
Referenced by TIMPI::Communicator::possibly_receive(), and TIMPI::push_parallel_vector_data().
|
inlineinherited |
dispatches to possibly_receive_packed_range
src_processor_id | The pid to receive from or "any". will be set to the actual src being received from |
buf | The buffer to receive into |
req | The request to use |
tag | The tag to use |
|
inlineinherited |
Nonblocking-receive from one processor with user-defined type.
As above, but with manually-specified data type.
src_processor_id | The pid to receive from or "any". will be set to the actual src being received from |
buf | The buffer to receive into |
type | The intrinsic datatype to receive |
req | The request to use |
tag | The tag to use |
Definition at line 1967 of file parallel_implementation.h.
References TIMPI::Request::add_post_wait_work(), TIMPI::any_source, TIMPI::Request::get(), TIMPI::Status::get(), TIMPI::Status::size(), TIMPI::Communicator::size(), TIMPI::Status::source(), and TIMPI::MessageTag::value().
|
inlineinherited |
Nonblocking-receive from one processor with user-defined type.
Dispatches to possibly_receive_packed_range
src_processor_id | The pid to receive from or "any". will be set to the actual src being received from |
buf | The buffer to receive into |
type | The packable type to receive |
req | The request to use |
tag | The tag to use |
Definition at line 2008 of file parallel_implementation.h.
References TIMPI::Communicator::possibly_receive_packed_range().
|
inlineinherited |
Definition at line 2027 of file parallel_implementation.h.
References TIMPI::Request::add_post_wait_work(), TIMPI::any_source, TIMPI::Status::get(), TIMPI::Communicator::receive(), TIMPI::Status::size(), TIMPI::Communicator::size(), TIMPI::Status::source(), and TIMPI::MessageTag::value().
|
inlineinherited |
Definition at line 4328 of file parallel_implementation.h.
References TIMPI::Communicator::possibly_receive().
|
inlineinherited |
Nonblocking packed range receive from one processor with user-defined type.
Checks to see if a message can be received from the src_processor_id . If so, it starts a nonblocking packed range receive using the passed in request and returns true
Otherwise - if there is no message to receive it returns false
void Parallel::unpack(const T *, OutputIter data, const Context *) is used to unserialize type T
src_processor_id | The pid to receive from or "any". will be set to the actual src being receieved from |
context | Context pointer that will be passed into the unpack functions |
out | The output iterator |
output_type | The intrinsic datatype to receive |
req | The request to use |
tag | The tag to use |
Definition at line 4340 of file parallel_implementation.h.
References TIMPI::Request::add_post_wait_work(), TIMPI::any_source, TIMPI::Communicator::nonblocking_receive_packed_range(), and TIMPI::Communicator::size().
Referenced by TIMPI::Communicator::possibly_receive(), and TIMPI::push_parallel_packed_range().
|
inherited |
Blocking message probe.
Allows information about a message to be examined before the message is actually received.
Definition at line 283 of file communicator.C.
References TIMPI::any_source, TIMPI::ignore(), TIMPI::Communicator::size(), and TIMPI::MessageTag::value().
Referenced by TIMPI::pull_parallel_vector_data(), TIMPI::detail::push_parallel_alltoall_helper(), and TIMPI::Communicator::receive().
|
inlineinherited |
Definition at line 208 of file communicator.h.
References TIMPI::Communicator::_rank.
Referenced by TIMPI::Communicator::broadcast(), TIMPI::Communicator::broadcast_packed_range(), TIMPI::detail::empty_send_assertion(), fill_data(), fill_scalar_data(), fill_vector_data(), TIMPI::Communicator::gather(), TIMPI::Communicator::map_broadcast(), TIMPI::Communicator::maxloc(), TIMPI::Communicator::minloc(), TIMPI::pull_parallel_vector_data(), TIMPI::detail::push_parallel_alltoall_helper(), TIMPI::detail::push_parallel_nbx_helper(), TIMPI::detail::push_parallel_roundrobin_helper(), TIMPI::report_here(), TIMPI::Communicator::scatter(), TIMPI::Communicator::send_receive(), TIMPI::Communicator::send_receive_packed_range(), testAllGather(), testAllGatherHalfEmptyVectorString(), testAllGatherString(), testAllGatherVectorString(), testAllGatherVectorVector(), testAllGatherVectorVectorInPlace(), testAllGatherVectorVectorPacked(), testArrayContainerAllGather(), testBigUnion(), testBroadcast(), testBroadcastArrayType(), testBroadcastNestedType(), testBroadcastString(), testContainerAllGather(), testContainerBroadcast(), testContainerSendReceive(), testEmptyEntry(), testGather(), testGatherString(), testGatherString2(), testGettableStringAllGather(), testIrecvSend(), testIsendRecv(), testLargeSetUnion(), testMapContainerAllGather(), testMapMap(), testMapMax(), testMapSet(), testMax(), testMaxloc(), testMaxlocBool(), testMaxlocDouble(), testMaxlocPair(), testMaxVecBool(), testMin(), testMinLarge(), testMinloc(), testMinlocBool(), testMinlocDouble(), testMinlocPair(), testMinVecBool(), testMPIULongMin(), testNestingAllGather(), testNonblockingMax(), testNonblockingMin(), testNonblockingSum(), testNonblockingTest(), testNonblockingWaitany(), testNonFixedTypeMapMax(), testNonFixedTypeSum(), testNullAllGather(), testNullSendReceive(), testPackedSetUnion(), testPairContainerAllGather(), testPush(), testPushImpl(), testPushMove(), testPushMultimapImpl(), testPushMultimapVecVecImpl(), testPushPackedImpl(), testPushPackedImplMove(), testPushPackedNestedImpl(), testPushVecVecImpl(), testRecvIsendSets(), testRecvIsendVecVecs(), testScatter(), testSemiVerifyInf(), testSemiVerifyString(), testSemiVerifyType(), testSemiVerifyVector(), testSendRecvVecVecs(), testSplit(), testSplitByType(), testSum(), testSumOpFunction(), testTupleContainerAllGather(), testTupleStringAllGather(), testUnion(), testVectorOfContainersAllGather(), and testVectorOfContainersBroadcast().
|
inlineinherited |
Blocking-receive from one processor with data-defined type.
We do not currently support receives on one processor without MPI.
Definition at line 858 of file parallel_implementation.h.
References TIMPI::any_source, TIMPI::Status::get(), TIMPI::Communicator::probe(), TIMPI::Communicator::size(), and TIMPI::MessageTag::value().
Referenced by TIMPI::Communicator::nonblocking_receive_packed_range(), TIMPI::Communicator::possibly_receive(), TIMPI::pull_parallel_vector_data(), TIMPI::push_parallel_vector_data(), TIMPI::Communicator::receive(), TIMPI::Communicator::receive_packed_range(), testIrecvSend(), testIsendRecv(), testRecvIsendSets(), testRecvIsendVecVecs(), and testSendRecvVecVecs().
|
inlineinherited |
Nonblocking-receive from one processor with data-defined type.
Definition at line 881 of file parallel_implementation.h.
References TIMPI::Request::add_post_wait_work(), TIMPI::any_source, TIMPI::Request::get(), TIMPI::Communicator::size(), and TIMPI::MessageTag::value().
|
inlineinherited |
Blocking-receive from one processor with user-defined type.
If T
is a container, container-of-containers, etc., then type
should be the DataType of the underlying fixed-size entries in the container(s).
Definition at line 155 of file serial_implementation.h.
|
inlineinherited |
Nonblocking-receive from one processor with user-defined type.
If T
is a container, container-of-containers, etc., then type
should be the DataType of the underlying fixed-size entries in the container(s).
Definition at line 162 of file serial_implementation.h.
|
inlineinherited |
Definition at line 814 of file parallel_implementation.h.
References TIMPI::Communicator::receive().
|
inlineinherited |
Definition at line 829 of file parallel_implementation.h.
References TIMPI::Request::add_post_wait_work(), and TIMPI::Communicator::receive().
|
inlineinherited |
Blocking-receive range-of-pointers from one processor.
This function does not receive raw pointers, but rather constructs new objects whose contents match the objects pointed to by the sender.
The objects will be of type T = iterator_traits<OutputIter>::value_type.
Using std::back_inserter as the output iterator allows receive to fill any container type. Using some null_output_iterator allows the receive to be dealt with solely by TIMPI::unpack(), for objects whose unpack() is written so as to not leak memory when used in this fashion.
A future version of this method should be created to preallocate memory when receiving vectors...
void TIMPI::unpack(vector<int>::iterator in, T ** out, Context *) is used to unserialize type T, typically into a new heap-allocated object whose pointer is returned as *out.
unsigned int TIMPI::packed_size(const T *, vector<int>::const_iterator) is used to advance to the beginning of the next object's data.
Definition at line 1222 of file parallel_implementation.h.
References TIMPI::Communicator::receive(), TIMPI::Status::source(), TIMPI::Status::tag(), and TIMPI::unpack_range().
Referenced by TIMPI::Communicator::send_receive_packed_range().
|
inherited |
Reference an already-acquired tag, so that we know it will be dereferenced multiple times before we can re-release it.
Definition at line 37 of file communicator.C.
References TIMPI::Communicator::used_tag_values.
Referenced by TIMPI::MessageTag::MessageTag(), and TIMPI::MessageTag::operator=().
|
inlineinherited |
Take a vector of local variables and scatter the ith item to the ith processor in the communicator.
The result is saved into recv.
Definition at line 3634 of file parallel_implementation.h.
References TIMPI::ignore(), TIMPI::Communicator::rank(), and TIMPI::Communicator::size().
Referenced by TIMPI::Communicator::scatter(), and testScatter().
|
inlineinherited |
Take a vector of local variables and scatter the ith equal-sized chunk to the ith processor in the communicator.
The data size must be a multiple of the communicator size. The result is saved into recv buffer. The recv buffer does not have to be sized prior to this operation.
Definition at line 3668 of file parallel_implementation.h.
References TIMPI::Communicator::broadcast(), TIMPI::ignore(), TIMPI::Communicator::rank(), and TIMPI::Communicator::size().
|
inlineinherited |
Take a vector of local variables and scatter the ith variable-sized chunk to the ith processor in the communicator.
The counts vector should contain the number of items for each processor. The result is saved into recv buffer. The recv buffer does not have to be sized prior to this operation.
Definition at line 3709 of file parallel_implementation.h.
References TIMPI::ignore(), TIMPI::Communicator::rank(), TIMPI::Communicator::scatter(), and TIMPI::Communicator::size().
|
inlineinherited |
vector<int> based scatter, for backwards compatibility
Definition at line 3768 of file parallel_implementation.h.
References TIMPI::Communicator::scatter().
|
inlineinherited |
Take a vector of vectors and scatter the ith inner vector to the ith processor in the communicator.
The result is saved into recv buffer. The recv buffer does not have to be sized prior to this operation.
Definition at line 3782 of file parallel_implementation.h.
References TIMPI::Communicator::rank(), TIMPI::Communicator::scatter(), and TIMPI::Communicator::size().
|
inlineinherited |
Check whether a local pointer points to the same value on all processors where it is not null, returning true if it does or false if not.
Useful in assertions and possibly in user error checking.
Containers must have the same value in every entry on all processors where the pointer is not null for this function to return true.
Referenced by testSemiVerifyInf(), testSemiVerifyString(), testSemiVerifyType(), and testSemiVerifyVector().
|
inlineinherited |
Definition at line 2108 of file parallel_implementation.h.
References TIMPI::Communicator::max(), TIMPI::Communicator::min(), and TIMPI::Communicator::size().
|
inlineinherited |
Definition at line 303 of file parallel_implementation.h.
References TIMPI::Communicator::send_mode(), TIMPI::Communicator::size(), TIMPI::Communicator::SYNCHRONOUS, and TIMPI::MessageTag::value().
|
inlineinherited |
Definition at line 324 of file parallel_implementation.h.
References TIMPI::Request::add_post_wait_work(), TIMPI::Request::get(), TIMPI::Communicator::send_mode(), TIMPI::Communicator::size(), TIMPI::Communicator::SYNCHRONOUS, and TIMPI::MessageTag::value().
|
inlineinherited |
Blocking-send to one processor with data-defined type.
We do not currently support sends on one processor without MPI.
Definition at line 350 of file parallel_implementation.h.
References TIMPI::Communicator::send_mode(), TIMPI::Communicator::size(), TIMPI::Communicator::SYNCHRONOUS, and TIMPI::MessageTag::value().
Referenced by TIMPI::Communicator::nonblocking_send_packed_range(), TIMPI::pull_parallel_vector_data(), TIMPI::push_parallel_vector_data(), TIMPI::Communicator::send_packed_range(), TIMPI::Communicator::send_receive(), testIrecvSend(), testIsendRecv(), testRecvIsendSets(), testRecvIsendVecVecs(), and testSendRecvVecVecs().
|
inlineinherited |
Nonblocking-send to one processor with data-defined type.
Definition at line 370 of file parallel_implementation.h.
References TIMPI::Request::add_post_wait_work(), TIMPI::Request::get(), TIMPI::Communicator::send_mode(), TIMPI::Communicator::size(), TIMPI::Communicator::SYNCHRONOUS, and TIMPI::MessageTag::value().
|
inlineinherited |
Blocking-send to one processor with user-defined type.
If T
is a container, container-of-containers, etc., then type
should be the DataType of the underlying fixed-size entries in the container(s).
Definition at line 78 of file serial_implementation.h.
|
inlineinherited |
Nonblocking-send to one processor with user-defined type.
If T
is a container, container-of-containers, etc., then type
should be the DataType of the underlying fixed-size entries in the container(s).
Definition at line 85 of file serial_implementation.h.
|
inlineinherited |
Nonblocking-send to one processor with user-defined packable type.
Packing<T>
must be defined for T
Definition at line 93 of file serial_implementation.h.
|
inlineinherited |
Explicitly sets the SendMode
type used for send operations.
Definition at line 333 of file communicator.h.
References TIMPI::Communicator::_send_mode.
Referenced by TIMPI::Communicator::duplicate(), TIMPI::detail::push_parallel_nbx_helper(), TIMPI::Communicator::split(), TIMPI::Communicator::split_by_type(), testIrecvSend(), and testIsendRecv().
|
inlineinherited |
Gets the user-requested SendMode.
Definition at line 338 of file communicator.h.
References TIMPI::Communicator::_send_mode.
Referenced by TIMPI::Communicator::duplicate(), TIMPI::Communicator::send(), TIMPI::Communicator::split(), and TIMPI::Communicator::split_by_type().
|
inlineinherited |
Blocking-send range-of-pointers to one processor.
This function does not send the raw pointers, but rather constructs new objects at the other end whose contents match the objects pointed to by the sender.
void TIMPI::pack(const T *, vector<int> & data, const Context *) is used to serialize type T onto the end of a data vector.
unsigned int TIMPI::packable_size(const T *, const Context *) is used to allow data vectors to reserve memory, and for additional error checking
The approximate maximum size (in entries; number of bytes will likely be 4x or 8x larger) to use in a single data vector buffer can be specified for performance or memory usage reasons; if the range cannot be packed into a single buffer of this size then multiple buffers and messages will be used.
Definition at line 648 of file parallel_implementation.h.
References TIMPI::pack_range(), TIMPI::packed_range_size(), and TIMPI::Communicator::send().
Referenced by TIMPI::Communicator::send_receive_packed_range().
|
inlineinherited |
Nonblocking-send range-of-pointers to one processor.
This function does not send the raw pointers, but rather constructs new objects at the other end whose contents match the objects pointed to by the sender.
void TIMPI::pack(const T *, vector<int> & data, const Context *) is used to serialize type T onto the end of a data vector.
unsigned int TIMPI::packable_size(const T *, const Context *) is used to allow data vectors to reserve memory, and for additional error checking
The approximate maximum size (in entries; number of bytes will likely be 4x or 8x larger) to use in a single data vector buffer can be specified for performance or memory usage reasons; if the range cannot be packed into a single buffer of this size then multiple buffers and messages will be used.
Definition at line 696 of file parallel_implementation.h.
References TIMPI::Request::add_post_wait_work(), TIMPI::Request::add_prior_request(), TIMPI::pack_range(), TIMPI::packed_range_size(), and TIMPI::Communicator::send().
|
inlineinherited |
Send-receive data from one processor.
Definition at line 189 of file serial_implementation.h.
|
inlineinherited |
Definition at line 238 of file serial_implementation.h.
References TIMPI::Communicator::send().
|
inlineinherited |
Definition at line 297 of file serial_implementation.h.
References TIMPI::Communicator::send().
|
inlineinherited |
Send data send
to one processor while simultaneously receiving other data recv
from a (potentially different) processor.
This overload is defined for fixed-size data; other overloads exist for many other categories.
Definition at line 1393 of file parallel_implementation.h.
References TIMPI::any_source, TIMPI::Communicator::rank(), TIMPI::Communicator::size(), and TIMPI::MessageTag::value().
Referenced by TIMPI::push_parallel_vector_data().
|
inlineinherited |
Send data send
to one processor while simultaneously receiving other data recv
from a (potentially different) processor, using a user-specified MPI Dataype.
|
inlineinherited |
Definition at line 1372 of file parallel_implementation.h.
References TIMPI::Communicator::send_receive_packed_range().
|
inlineinherited |
Definition at line 1505 of file parallel_implementation.h.
|
inlineinherited |
Send-receive range-of-pointers from one processor.
If you call this without MPI you might be making a mistake, but we'll support it.
Definition at line 322 of file serial_implementation.h.
References TIMPI::pack_range(), and TIMPI::unpack_range().
|
inlineinherited |
Send a range-of-pointers to one processor while simultaneously receiving another range from a (potentially different) processor.
This function does not send or receive raw pointers, but rather constructs new objects at each receiver whose contents match the objects pointed to by the sender.
The objects being sent will be of type T1 = iterator_traits<RangeIter>::value_type, and the objects being received will be of type T2 = iterator_traits<OutputIter>::value_type
void TIMPI::pack(const T1*, vector<int> & data, const Context1*) is used to serialize type T1 onto the end of a data vector.
Using std::back_inserter as the output iterator allows send_receive to fill any container type. Using some null_output_iterator allows the receive to be dealt with solely by TIMPI::unpack(), for objects whose unpack() is written so as to not leak memory when used in this fashion.
A future version of this method should be created to preallocate memory when receiving vectors...
void TIMPI::unpack(vector<int>::iterator in, T2** out, Context *) is used to unserialize type T2, typically into a new heap-allocated object whose pointer is returned as *out.
unsigned int TIMPI::packable_size(const T1*, const Context1*) is used to allow data vectors to reserve memory, and for additional error checking.
unsigned int TIMPI::packed_size(const T2*, vector<int>::const_iterator) is used to advance to the beginning of the next object's data.
Definition at line 1523 of file parallel_implementation.h.
References TIMPI::pack_range(), TIMPI::Communicator::rank(), TIMPI::Communicator::receive_packed_range(), TIMPI::Communicator::send_packed_range(), TIMPI::unpack_range(), and TIMPI::Request::wait().
Referenced by TIMPI::push_parallel_packed_range(), TIMPI::Communicator::send_receive(), testContainerSendReceive(), and testNullSendReceive().
|
inlineinherited |
Take a container (set, map, unordered_set, multimap, etc) of local variables on each processor, and collect their union over all processors, replacing the original on the processor with rank root_id
.
If the data
is a map or unordered_map and entries exist on different processors with the same key and different values, then the value with the lowest processor id takes precedence.
If the data
is a multiset or multimap or unordered_multimap, and entries exist on different processors with the same key, these entries are duplicated in the gathered container.
Referenced by testBigUnion(), testLargeSetUnion(), testMapMap(), testMapSet(), testPackedSetUnion(), and testUnion().
|
inlineinherited |
Take a container of local variables on each processor, and replace it with their union over all processors, replacing the original on all processors.
If the data
is a multiset or multimap or unordered_multimap, and entries exist on different processors with the same key, these entries are duplicated in the gathered container.
|
inlineinherited |
Definition at line 211 of file communicator.h.
References TIMPI::Communicator::_size.
Referenced by TIMPI::Communicator::allgather(), TIMPI::Communicator::alltoall(), TIMPI::Communicator::barrier(), TIMPI::Communicator::broadcast(), TIMPI::Communicator::broadcast_packed_range(), TIMPI::Communicator::gather(), TIMPI::Communicator::map_broadcast(), TIMPI::Communicator::map_max(), TIMPI::Communicator::map_sum(), TIMPI::Communicator::max(), TIMPI::Communicator::maxloc(), TIMPI::Communicator::min(), TIMPI::Communicator::minloc(), TIMPI::Communicator::nonblocking_barrier(), TIMPI::Communicator::packed_range_probe(), TIMPI::Communicator::packed_size_of(), TIMPI::Communicator::possibly_receive(), TIMPI::Communicator::possibly_receive_packed_range(), TIMPI::Communicator::probe(), TIMPI::pull_parallel_vector_data(), TIMPI::detail::push_parallel_alltoall_helper(), TIMPI::detail::push_parallel_nbx_helper(), TIMPI::detail::push_parallel_roundrobin_helper(), TIMPI::Communicator::receive(), TIMPI::Communicator::scatter(), TIMPI::Communicator::semiverify(), TIMPI::Communicator::send(), TIMPI::Communicator::send_receive(), TIMPI::Communicator::sum(), testAllGatherString(), testAllGatherVectorVectorInPlace(), testArrayContainerAllGather(), testBigUnion(), testContainerAllGather(), testContainerSendReceive(), testEmptyEntry(), testGettableStringAllGather(), testIrecvSend(), testIsendRecv(), testLargeSetUnion(), testMapContainerAllGather(), testMapMax(), testMax(), testMaxloc(), testMaxlocBool(), testMaxlocDouble(), testMaxlocPair(), testMaxVecBool(), testMinloc(), testMinlocBool(), testMinlocDouble(), testMinlocPair(), testMinVecBool(), testNestingAllGather(), testNonblockingMax(), testNonblockingSum(), testNonFixedTypeMapMax(), testNonFixedTypeSum(), testNullSendReceive(), testPackedSetUnion(), testPairContainerAllGather(), testPull(), testPullImpl(), testPullOversized(), testPullPacked(), testPullVecVec(), testPullVecVecImpl(), testPullVecVecOversized(), testPush(), testPushImpl(), testPushMove(), testPushMultimap(), testPushMultimapImpl(), testPushMultimapOversized(), testPushMultimapVecVec(), testPushMultimapVecVecImpl(), testPushMultimapVecVecOversized(), testPushOversized(), testPushPacked(), testPushPackedImpl(), testPushPackedImplMove(), testPushPackedMove(), testPushPackedMoveOversized(), testPushPackedNestedImpl(), testPushPackedOversized(), testPushVecVec(), testPushVecVecImpl(), testPushVecVecOversized(), testRecvIsendSets(), testRecvIsendVecVecs(), testScatter(), testSendRecvVecVecs(), testSplit(), testSplitByType(), testSum(), testSumOpFunction(), testTupleContainerAllGather(), testTupleStringAllGather(), testUnion(), testVectorOfContainersAllGather(), testVectorOfContainersBroadcast(), and TIMPI::Communicator::verify().
|
inlineinherited |
Definition at line 214 of file communicator.h.
|
inherited |
Definition at line 97 of file communicator.C.
References TIMPI::Communicator::_I_duped_it, TIMPI::Communicator::assign(), TIMPI::Communicator::clear(), TIMPI::Communicator::send_mode(), and TIMPI::Communicator::sync_type().
Referenced by testSplit().
|
inherited |
Definition at line 111 of file communicator.C.
References TIMPI::Communicator::_I_duped_it, TIMPI::Communicator::assign(), TIMPI::Communicator::clear(), TIMPI::Communicator::send_mode(), and TIMPI::Communicator::sync_type().
Referenced by testSplitByType().
|
inlineinherited |
Take a local variable and replace it with the sum of it's values on all processors.
Containers are replaced element-wise.
Referenced by testNonblockingSum(), testNonFixedTypeSum(), testSum(), and testSumOpFunction().
|
inlineinherited |
Non-blocking sum of the local value r
into o
with the request req
.
Definition at line 2648 of file parallel_implementation.h.
References TIMPI::Request::get(), TIMPI::Request::null_request, and TIMPI::Communicator::size().
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Explicitly sets the SyncType
used for sync operations.
Definition at line 343 of file communicator.h.
References TIMPI::Communicator::_sync_type.
Referenced by TIMPI::Communicator::duplicate(), main(), TIMPI::pull_parallel_vector_data(), TIMPI::push_parallel_packed_range(), TIMPI::push_parallel_vector_data(), TIMPI::Communicator::split(), TIMPI::Communicator::split_by_type(), testPullImpl(), testPullVecVecImpl(), testPushMultimapImpl(), testPushMultimapVecVecImpl(), and testStringSyncType().
|
inherited |
Sets the sync type used for sync operations via a string.
Useful for changing the sync type via a CLI arg or parameter.
Definition at line 455 of file communicator.C.
References TIMPI::Communicator::ALLTOALL_COUNTS, TIMPI::Communicator::NBX, TIMPI::Communicator::SENDRECEIVE, and TIMPI::Communicator::sync_type().
|
inlineinherited |
Gets the user-requested SyncType.
Definition at line 355 of file communicator.h.
References TIMPI::Communicator::_sync_type.
Referenced by TIMPI::Communicator::duplicate(), TIMPI::Communicator::split(), TIMPI::Communicator::split_by_type(), and TIMPI::Communicator::sync_type().
|
inlineinherited |
Check whether a local variable has the same value on all processors, returning true if it does or false if not.
Useful in assertions and possibly in user error checking.
Containers must have the same value in every entry for this function to return true.
Referenced by TIMPI::Communicator::allgather(), TIMPI::Communicator::alltoall(), TIMPI::Communicator::broadcast(), TIMPI::Communicator::map_broadcast(), TIMPI::Communicator::max(), TIMPI::Communicator::maxloc(), TIMPI::Communicator::min(), and TIMPI::Communicator::minloc().
|
inlineinherited |
Definition at line 2088 of file parallel_implementation.h.
References TIMPI::Communicator::max(), TIMPI::Communicator::min(), and TIMPI::Communicator::size().