26namespace shamalgs::collective {
36 shamcomm::mpi::Exscan(
37 &byte_count, &scan_val, 1, get_mpi_type<u64>(), MPI_SUM, MPI_COMM_WORLD);
44 shamcomm::mpi::Allreduce(
45 &byte_count, &sum_val, 1, get_mpi_type<u64>(), MPI_SUM, MPI_COMM_WORLD);
47 shamlog_debug_mpi_ln(
"fetch view", byte_count,
"->", scan_val,
"sum:", sum_val);
49 return {sum_val, scan_val};
52 inline ViewInfo fetch_view_known_total(
u64 byte_count,
u64 total_byte) {
56 &byte_count, &scan_val, 1, get_mpi_type<u64>(), MPI_SUM, MPI_COMM_WORLD);
62 shamlog_debug_mpi_ln(
"fetch view", byte_count,
"->", scan_val,
"sum:", total_byte);
64 return {total_byte, scan_val};
std::uint64_t u64
64 bit unsigned integer
Utility functions for MPI error checking.
i32 world_rank()
Gives the rank of the current process in the MPI communicator.
Functions related to the MPI communicator.
void Exscan(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm)
MPI wrapper for MPI_Exscan.