Skip to content

Class Comm

ClassList > Comm

Class representing communication operations.

  • #include <Comm.hpp>

Public Functions

Type Name
Comm (MPI_Comm comm, int proc_rows, int proc_cols, cudaStream_t stream=0)
Constructor for the Comm class.
Comm (Comm & comm)
Copy constructor for the Comm class.
int get_col_color ()
Get the color of the current process in the column communicator.
MPI_Comm get_col_comm ()
Get the MPI communicator for column communication.
cublasHandle_t get_cublasHandle ()
Get the cuBLAS handle.
int get_device ()
Get the GPU device ID.
cudaEvent_t get_event ()
Get the CUDA event.
MPI_Comm get_global_comm ()
Get the global MPI communicator.
ncclComm_t get_gpu_col_comm ()
Get the NCCL communicator for GPU column communication.
ncclComm_t get_gpu_row_comm ()
Get the NCCL communicator for GPU row communication.
int get_proc_cols ()
Get the number of process columns.
int get_proc_rows ()
Get the number of process rows.
int get_row_color ()
Get the color of the current process in the row communicator.
MPI_Comm get_row_comm ()
Get the MPI communicator for row communication.
cudaStream_t get_stream ()
Get the CUDA stream.
int get_world_rank ()
Get the rank of the current process in the global communicator.
int get_world_size ()
Get the total number of processes in the global communicator.
bool has_external_stream ()
Check if an external stream was provided.
~Comm ()
Destructor for the Comm class. Destroys cuBLAS handle and NCCL/MPI communicators.

Public Functions Documentation

function Comm [1/2]

Constructor for the Comm class.

Comm::Comm (
    MPI_Comm comm,
    int proc_rows,
    int proc_cols,
    cudaStream_t stream=0
) 

Parameters:

  • comm The MPI global communicator.
  • proc_rows Number of process rows.
  • proc_cols Number of process columns.
  • stream CUDA stream (default is 0 - will create a new stream).

function Comm [2/2]

Copy constructor for the Comm class.

inline Comm::Comm (
    Comm & comm
) 

Parameters:

  • comm The Comm object to be copied.

function get_col_color

Get the color of the current process in the column communicator.

inline int Comm::get_col_color () 

Returns:

The color of the current process in the column communicator.


function get_col_comm

Get the MPI communicator for column communication.

inline MPI_Comm Comm::get_col_comm () 

Returns:

The MPI communicator for column communication.


function get_cublasHandle

Get the cuBLAS handle.

inline cublasHandle_t Comm::get_cublasHandle () 

Returns:

The cuBLAS handle.


function get_device

Get the GPU device ID.

inline int Comm::get_device () 

Returns:

The GPU device ID.


function get_event

Get the CUDA event.

inline cudaEvent_t Comm::get_event () 

Returns:

The CUDA event.


function get_global_comm

Get the global MPI communicator.

inline MPI_Comm Comm::get_global_comm () 

Returns:

The global MPI communicator.


function get_gpu_col_comm

Get the NCCL communicator for GPU column communication.

inline ncclComm_t Comm::get_gpu_col_comm () 

Returns:

The NCCL communicator for GPU column communication.


function get_gpu_row_comm

Get the NCCL communicator for GPU row communication.

inline ncclComm_t Comm::get_gpu_row_comm () 

Returns:

The NCCL communicator for GPU row communication.


function get_proc_cols

Get the number of process columns.

inline int Comm::get_proc_cols () 

Returns:

The number of process columns.


function get_proc_rows

Get the number of process rows.

inline int Comm::get_proc_rows () 

Returns:

The number of process rows.


function get_row_color

Get the color of the current process in the row communicator.

inline int Comm::get_row_color () 

Returns:

The color of the current process in the row communicator.


function get_row_comm

Get the MPI communicator for row communication.

inline MPI_Comm Comm::get_row_comm () 

Returns:

The MPI communicator for row communication.


function get_stream

Get the CUDA stream.

inline cudaStream_t Comm::get_stream () 

Returns:

The CUDA stream.


function get_world_rank

Get the rank of the current process in the global communicator.

inline int Comm::get_world_rank () 

Returns:

The rank of the current process in the global communicator.


function get_world_size

Get the total number of processes in the global communicator.

inline int Comm::get_world_size () 

Returns:

The total number of processes in the global communicator.


function has_external_stream

Check if an external stream was provided.

inline bool Comm::has_external_stream () 

Returns:

True if an external stream was provided, false otherwise.


function ~Comm

Destructor for the Comm class. Destroys cuBLAS handle and NCCL/MPI communicators.

Comm::~Comm () 



The documentation for this class was generated from the following file src/Comm.hpp