MPI_CSR_SendRecv
Public Functions
Name | |
---|---|
MPI_CSR_SendRecv() Creates an empty object. |
|
void | PrepareBuffers(const iReg n) Prepares the buffers for communication. |
~MPI_CSR_SendRecv() Deletes the buffers. Buffers must be deallocated after communication end. |
|
void | ResetBuffers() Resets the buffers for communication. |
void | SendCSR(const CSRMAT< iReg > &restrict CSR, const iReg restrict iBlock, const type_MPI_iReg restrict dest, const type_MPI_iReg restrict tag1, const type_MPI_iReg restrict tag2, const bool SendSize, MPI_Request &restrict Request_size, MPI_Request &restrict Request_csr) Send asynchronously a CSR matrix size along with CSR matrix derived data type. |
void | InitReceiveCSR(CSRMAT< iReg > &restrict CSR, const type_MPI_iReg restrict source, const type_MPI_iReg restrict tag, MPI_Request &restrict Request) Initialize asynchronous reception for a CSR matrix of known size. |
Public Attributes
Name | |
---|---|
VEC< iReg > | vec_ReqListSize Buffer for sending number of blocks. |
Public Functions Documentation
function MPI_CSR_SendRecv
inline MPI_CSR_SendRecv()
Creates an empty object.
function PrepareBuffers
void PrepareBuffers(
const iReg n
)
Prepares the buffers for communication.
Parameters:
- n number of communicating blocks (not the diagonal block).
function ~MPI_CSR_SendRecv
~MPI_CSR_SendRecv()
Deletes the buffers. Buffers must be deallocated after communication end.
function ResetBuffers
void ResetBuffers()
Resets the buffers for communication.
function SendCSR
void SendCSR(
const CSRMAT< iReg > &__restrict__ CSR,
const iReg __restrict__ iBlock,
const type_MPI_iReg __restrict__ dest,
const type_MPI_iReg __restrict__ tag1,
const type_MPI_iReg __restrict__ tag2,
const bool SendSize,
MPI_Request &__restrict__ Request_size,
MPI_Request &__restrict__ Request_csr
)
Send asynchronously a CSR matrix size along with CSR matrix derived data type.
Parameters:
- CSR current matrix to send.
- iBlock current matrix to send.
- dest recipient rank.
- tag1 tag for the size communication.
- tag2 tag for the CSR communication.
- SendSize if true send nterms and nrows independently.
- Request_size Status request for the size communication.
- Request_csr Status request for the csr communication.
The sizes are sent first in a contigous array. Should the number of rows or terms of an already allocated CSRMAT type be zero, the actual CSR matrix is not sent. Optional arguments are provided to check when data have been sent. A runtime MPI derived data type is created by means of memory addresses for the each array component of the derived type. For this reason, all the dummy non zero-dimensional components have to be contiguous, at runtime, when calling this subroutine. iBlock ==-1 is used to mark a null block with nrows=ncols=nterm=0. iBlock ==-2 is used to mark a null block with nterm=0.
function InitReceiveCSR
void InitReceiveCSR(
CSRMAT< iReg > &__restrict__ CSR,
const type_MPI_iReg __restrict__ source,
const type_MPI_iReg __restrict__ tag,
MPI_Request &__restrict__ Request
)
Initialize asynchronous reception for a CSR matrix of known size.
Parameters:
- CSR current matrix to receive.
- source sender rank.
- tag communication tag.
- Request Status request for the communication.
Public Attributes Documentation
variable vec_ReqListSize
VEC< iReg > vec_ReqListSize;
Buffer for sending number of blocks.
Updated on 12 February 2021 at 11:59:50 CET