Metall  v0.29
A persistent memory allocator for data-centric analytics
metall::utility::mpi Namespace Reference

Namespace for MPI utilities. More...

Functions

int comm_rank (const MPI_Comm &comm)
 
int comm_size (const MPI_Comm &comm)
 
bool barrier (const MPI_Comm &comm)
 
std::pair< bool, bool > global_logical_and (const bool local_value, const MPI_Comm &comm)
 Performs the logical 'and' operation. More...
 
std::pair< bool, bool > global_logical_or (const bool local_value, const MPI_Comm &comm)
 Performs the logical 'or' operation. More...
 
int determine_local_root (const MPI_Comm &comm)
 Determines a local root rank. More...
 

Detailed Description

Namespace for MPI utilities.

Function Documentation

◆ comm_rank()

int metall::utility::mpi::comm_rank ( const MPI_Comm &  comm)
inline

◆ comm_size()

int metall::utility::mpi::comm_size ( const MPI_Comm &  comm)
inline

◆ barrier()

bool metall::utility::mpi::barrier ( const MPI_Comm &  comm)
inline

◆ global_logical_and()

std::pair<bool, bool> metall::utility::mpi::global_logical_and ( const bool  local_value,
const MPI_Comm &  comm 
)
inline

Performs the logical 'and' operation.

Parameters
local_valueLocal bool value.
commMPI communicator.
Returns
A pair of bools (error, global value). 'error' is set to false if there is an error.

◆ global_logical_or()

std::pair<bool, bool> metall::utility::mpi::global_logical_or ( const bool  local_value,
const MPI_Comm &  comm 
)
inline

Performs the logical 'or' operation.

Parameters
local_valueLocal bool value.
commMPI communicator.
Returns
A pair of bools (error, global value). 'error' is set to false if there is an error.

◆ determine_local_root()

int metall::utility::mpi::determine_local_root ( const MPI_Comm &  comm)
inline

Determines a local root rank.

Parameters
commMPI communicator.
Returns
Returns a local rank number. On error, returns -1.