MPI_DSMat_SendRecv

Public Functions

Name
MPI_DSMat_SendRecv()
Creates an empty object.
~MPI_DSMat_SendRecv()
Deletes the object. It must be deallocated after communication end.
iReg get_nSend()
Returns the number of outgoing communications.
MPI_Request * get_ptr_SendnBlocksReq_data()
Returns the pointer to the status of the outgoing communications of nBlocks.
MPI_Request * get_ptr_SendSizesReq_data()
Returns the pointer to the status of the outgoing communications of Sizes.
MPI_Request * get_ptr_SendCSRsReq_data()
Returns the pointer to the status of the outgoing communications of CSRs.
void Prepare(CommGraph &restrict Graph, CSRMAT< iReg > restrict matL, CSRMAT< iReg > restrict matC, CSRMAT< iReg > *restrict matR, const iReg nSend, const iReg nRecv)
Prepares the structures of the MPI messages.
void Send(const iReg restrict icom, const type_MPI_iReg restrict dest, const type_MPI_iReg restrict tag1, const type_MPI_iReg restrict tag2, const type_MPI_iReg restrict tag3)
Sends asynchronously the stripe of the DSMat memorized in the process.
void RecvnBlocks(const iReg restrict icom, const type_MPI_iReg restrict source, const type_MPI_iReg restrict tag1, iReg &restrict RecvnBlocks)
Starts to receive the number of CSR blocks of an incoming B stripe.
void TestnBlocks(const iReg restrict icom, type_MPI_iReg *restrict Completed)
Tests if it has ended to receive the number of CSR blocks of an incoming B stripe.
void RecvSizes(const iReg restrict icom, const type_MPI_iReg restrict source, const type_MPI_iReg restrict tag2, const iReg nBlocks, iExt *restrict RecvSizes)
Starts to receive the sizes of CSR blocks.
void TestSizes(const iReg restrict icom, type_MPI_iReg *restrict Completed)
Tests if it has ended to receive the sizes of CSR blocks.
void RecvCSRs(const iReg restrict icom, const type_MPI_iReg restrict source, const type_MPI_iReg restrict tag2, const iReg nBlocks, const iExt restrict RecvSizes, CSRMAT< iReg > restrict RecvCSRs)
Starts to receive CSR blocks.
void TestCSRs(const iReg restrict icom, type_MPI_iReg *restrict Completed)
Tests if it has ended to receive the CSR blocks.

Public Functions Documentation

function MPI_DSMat_SendRecv

inline MPI_DSMat_SendRecv()

Creates an empty object.

function ~MPI_DSMat_SendRecv

~MPI_DSMat_SendRecv()

Deletes the object. It must be deallocated after communication end.

function get_nSend

inline iReg get_nSend()

Returns the number of outgoing communications.

function get_ptr_SendnBlocksReq_data

inline MPI_Request * get_ptr_SendnBlocksReq_data()

Returns the pointer to the status of the outgoing communications of nBlocks.

function get_ptr_SendSizesReq_data

inline MPI_Request * get_ptr_SendSizesReq_data()

Returns the pointer to the status of the outgoing communications of Sizes.

function get_ptr_SendCSRsReq_data

inline MPI_Request * get_ptr_SendCSRsReq_data()

Returns the pointer to the status of the outgoing communications of CSRs.

function Prepare

void Prepare(
    CommGraph &__restrict__ Graph,
    CSRMAT< iReg > *__restrict__ matL,
    CSRMAT< iReg > *__restrict__ matC,
    CSRMAT< iReg > *__restrict__ matR,
    const iReg nSend,
    const iReg nRecv
)

Prepares the structures of the MPI messages.

Parameters:

  • Graph communication graph of the matrix stripe to send.
  • matL pointer to the lef CSR blocks of the matrix stripe to send.
  • matC pointer to the diagonal CSR block of the matrix stripe to send.
  • matR pointer to the right CSR blocks of the matrix stripe to send.
  • nSend number of outgoing communications.
  • nRecv number of incoming communications.

function Send

void Send(
    const iReg __restrict__ icom,
    const type_MPI_iReg __restrict__ dest,
    const type_MPI_iReg __restrict__ tag1,
    const type_MPI_iReg __restrict__ tag2,
    const type_MPI_iReg __restrict__ tag3
)

Sends asynchronously the stripe of the DSMat memorized in the process.

Parameters:

  • icom index of the outgoing communication.
  • dest recipient rank.
  • tag1 tag for the size communication.
  • tag2 tag for the CSR size communication.
  • tag3 tag for the CSR communication.

function RecvnBlocks

void RecvnBlocks(
    const iReg __restrict__ icom,
    const type_MPI_iReg __restrict__ source,
    const type_MPI_iReg __restrict__ tag1,
    iReg &__restrict__ RecvnBlocks
)

Starts to receive the number of CSR blocks of an incoming B stripe.

Parameters:

  • icom index of the incoming communication.
  • source source rank.
  • tag1 tag for the size communication.
  • RecvnBlocks incoming number of CSR blocks.

function TestnBlocks

void TestnBlocks(
    const iReg __restrict__ icom,
    type_MPI_iReg *__restrict__ Completed
)

Tests if it has ended to receive the number of CSR blocks of an incoming B stripe.

Parameters:

  • icom index of the incoming communication.
  • Completed flag equal to zero if the communication is not completed.

function RecvSizes

void RecvSizes(
    const iReg __restrict__ icom,
    const type_MPI_iReg __restrict__ source,
    const type_MPI_iReg __restrict__ tag2,
    const iReg nBlocks,
    iExt *__restrict__ RecvSizes
)

Starts to receive the sizes of CSR blocks.

Parameters:

  • icom index of the incoming communication.
  • source source rank.
  • tag2 tag for the size communication.
  • nBlocks number of incoming CSRs.
  • RecvSizes incoming Sizes of CSR.

function TestSizes

void TestSizes(
    const iReg __restrict__ icom,
    type_MPI_iReg *__restrict__ Completed
)

Tests if it has ended to receive the sizes of CSR blocks.

Parameters:

  • icom index of the incoming communication.
  • Completed flag equal to zero if the communication is not completed.

function RecvCSRs

void RecvCSRs(
    const iReg __restrict__ icom,
    const type_MPI_iReg __restrict__ source,
    const type_MPI_iReg __restrict__ tag2,
    const iReg nBlocks,
    const iExt *__restrict__ RecvSizes,
    CSRMAT< iReg > *__restrict__ RecvCSRs
)

Starts to receive CSR blocks.

Parameters:

  • icom index of the incoming communication.
  • source source rank.
  • tag3 tag for the CSRs communication.
  • nBlocks number of incoming CSRs.
  • Sizes sizes of incoming CSRs.
  • RecvCSRs incoming CSRs.

function TestCSRs

void TestCSRs(
    const iReg __restrict__ icom,
    type_MPI_iReg *__restrict__ Completed
)

Tests if it has ended to receive the CSR blocks.

Parameters:

  • icom index of the incoming communication.
  • Completed flag equal to zero if the communication is not completed.

Updated on 12 February 2021 at 11:59:50 CET