mpi Namespace Reference

mpi Namespace Reference#

Reference API: gko::experimental::mpi Namespace Reference
Reference API
gko::experimental::mpi Namespace Reference

The mpi namespace, contains wrapper for many MPI functions. More...

Classes

class  CollectiveCommunicator
 
class  communicator
 
class  contiguous_type
 
class  DenseCommunicator
 
class  environment
 
class  NeighborhoodCommunicator
 
class  request
 
struct  status
 
struct  type_impl
 
struct  type_impl< char >
 
struct  type_impl< double >
 
struct  type_impl< float >
 
struct  type_impl< half >
 
struct  type_impl< int >
 
struct  type_impl< long >
 
struct  type_impl< long double >
 
struct  type_impl< long long >
 
struct  type_impl< std::complex< double > >
 
struct  type_impl< std::complex< float > >
 
struct  type_impl< std::complex< half > >
 
struct  type_impl< unsigned >
 
struct  type_impl< unsigned char >
 
struct  type_impl< unsigned long >
 
struct  type_impl< unsigned long long >
 
struct  type_impl< unsigned short >
 
class  window
 

Enumerations

enum class  thread_type { serialized = MPI_THREAD_SERIALIZED , funneled = MPI_THREAD_FUNNELED , single = MPI_THREAD_SINGLE , multiple = MPI_THREAD_MULTIPLE }
 

Functions

constexpr bool is_gpu_aware ()
 
int map_rank_to_device_id (MPI_Comm comm, int num_devices)
 
std::vector< statuswait_all (std::vector< request > &req)
 
bool requires_host_buffer (const std::shared_ptr< const Executor > &exec, const communicator &comm)
 
double get_walltime ()
 

Detailed Description

The mpi namespace, contains wrapper for many MPI functions.

Enumeration Type Documentation

◆ thread_type

This enum specifies the threading type to be used when creating an MPI environment.

Function Documentation

◆ get_walltime()

double gko::experimental::mpi::get_walltime ( )
inline

Get the rank in the communicator of the calling process.

Parameters
commthe communicator

◆ is_gpu_aware()

constexpr bool gko::experimental::mpi::is_gpu_aware ( )
inlineconstexpr

Return if GPU aware functionality is available

◆ map_rank_to_device_id()

int gko::experimental::mpi::map_rank_to_device_id ( MPI_Comm  comm,
int  num_devices 
)

Maps each MPI rank to a single device id in a round robin manner.

Parameters
commused to determine the node-local rank, if no suitable environment variable is available.
num_devicesthe number of devices per node.
Returns
device id that this rank should use.

◆ requires_host_buffer()

bool gko::experimental::mpi::requires_host_buffer ( const std::shared_ptr< const Executor > &  exec,
const communicator comm 
)

Checks if the combination of Executor and communicator requires passing MPI buffers from the host memory.

◆ wait_all()

std::vector< status > gko::experimental::mpi::wait_all ( std::vector< request > &  req)
inline

Allows a rank to wait on multiple request handles.

Parameters
reqThe vector of request handles to be waited on.
Returns
status The vector of status objects that can be queried.