74template <
typename T, std::
size_t N>
85std::vector<std::vector<T>>
alltoallv(
const std::vector<std::vector<T>> & send);
113#ifdef Mallard_HAS_MPI
Initializes MPI on construction (unless it already is) and finalizes it on destruction if this sessio...
Definition comm.h:34
~Session()
Definition comm.cpp:179
Session & operator=(const Session &)=delete
Session(const Session &)=delete
KOKKOS_INLINE_FUNCTION rtype dot(const rtype *a, const rtype *b)
Compute the dot product of two arrays.
Definition common_math.h:32
void allreduce(std::span< T >, Op)
In-place all-reduce over all ranks of the values in data.
Definition comm.cpp:188
bool is_root()
Whether this is rank 0, which does all logging.
Definition comm.h:52
int rank()
Rank of this process in the world communicator.
Definition comm.cpp:181
std::vector< std::vector< T > > alltoallv(const std::vector< std::vector< T > > &send)
Personalized all-to-all: send[r] goes to rank r; returns what each rank sent to this one,...
Definition comm.cpp:196
Received< T > exchange(std::vector< std::vector< T > > &&send)
Personalized all-to-all like alltoallv, for large setup-time messages: frees each send list once pack...
Definition comm.cpp:202
int size()
Number of processes in the world communicator.
Definition comm.cpp:182
void abort(int code)
Ends every rank with the given exit code (MPI_Abort in parallel runs).
Definition comm.cpp:185
std::vector< T > allgatherv(const std::vector< T > &local)
Concatenation of every rank's local vector, in rank order.
Definition comm.cpp:191
void barrier()
Block until all ranks arrive.
Definition comm.cpp:183
What an exchange() received: the part from rank r is data[offsets[r], offsets[r + 1]).
Definition comm.h:92
std::vector< T > data
Definition comm.h:93
std::vector< uint64_t > offsets
Definition comm.h:94
std::span< const T > from(size_t r) const
Definition comm.h:96
uint8_t r
Definition teno_setup.cpp:687