FleCSI User API Version: 2.3.0
 
Loading...
Searching...
No Matches

These require MPI tasks, not the MPI backend. More...

Functions

template<typename T >
std::vector< T > all_gatherv (const T &t, MPI_Comm comm=MPI_COMM_WORLD)
 All gather communication pattern implemented using MPI_Allgather.
 
template<typename R >
auto all_to_allv (R &&r, MPI_Comm comm=MPI_COMM_WORLD)
 All-to-All (variable) communication pattern.
 
template<class R >
auto one_to_alli (R &&r, std::size_t mem=1<< 20, MPI_Comm comm=MPI_COMM_WORLD)
 Send data from rank 0 to all others, controlling memory usage.
 
template<typename R >
auto one_to_allv (R &&r, MPI_Comm comm=MPI_COMM_WORLD)
 One-to-All (variable) communication pattern.
 
int size (MPI_Comm comm=MPI_COMM_WORLD)
 Convenience function to get basic MPI communicator information.
 

Detailed Description

These require MPI tasks, not the MPI backend.

Function Documentation

◆ size()

int size ( MPI_Comm  comm = MPI_COMM_WORLD)

Convenience function to get basic MPI communicator information.

◆ one_to_allv()

template<typename R >
auto one_to_allv ( R &&  r,
MPI_Comm  comm = MPI_COMM_WORLD 
)

One-to-All (variable) communication pattern.

This function uses the FleCSI serialization interface to communicate data from the root rank (0) to all other ranks.

Parameters
rrange or functor with signature (rank) or (deprecated) (rank, size), read/invoked only on rank 0 and in recipient order
commAn MPI communicator.
Returns
the value from r for the current rank

◆ one_to_alli()

template<class R >
auto one_to_alli ( R &&  r,
std::size_t  mem = 1 << 20,
MPI_Comm  comm = MPI_COMM_WORLD 
)

Send data from rank 0 to all others, controlling memory usage.

No messages are constructed while data in transit exceeds mem (transmission occurs, at least serially, even if it is 0).

Parameters
rrange or functor with signature (rank) or (deprecated) (rank, size), read/invoked only on rank 0 and in recipient order
membytes of memory to use before waiting

◆ all_to_allv()

template<typename R >
auto all_to_allv ( R &&  r,
MPI_Comm  comm = MPI_COMM_WORLD 
)

All-to-All (variable) communication pattern.

This function uses the FleCSI serialization interface with a packing callable object to communicate data from all ranks to all other ranks.

Parameters
rrange or functor with signature (rank) or (deprecated) (rank, size), read/invoked in recipient order
commAn MPI communicator.
Returns
a std::vector of the values for the current rank from each rank's r

◆ all_gatherv()

template<typename T >
std::vector< T > all_gatherv ( const T &  t,
MPI_Comm  comm = MPI_COMM_WORLD 
)

All gather communication pattern implemented using MPI_Allgather.

This function is convenient for passing more complicated types. Otherwise, it may make more sense to use MPI_Allgather directly.

This function uses the FleCSI serialization interface to copy data from all ranks to all other ranks.

Template Parameters
Tserializable data type
Parameters
tobject to send
commAn MPI communicator.
Returns
the values from each rank