Module for reducing matrices across processes.
The first routine to call, gathers the sizes of the data to be sent.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(Matrix_lsr), | intent(in) | :: | matrix |
The matrix to send. |
||
integer, | intent(inout) | :: | comm |
The communicator to send along. |
||
type(Matrix_lsr), | intent(inout) | :: | gathered_matrix |
The matrix we are gathering. |
||
type(ReduceHelper_t), | intent(inout) | :: | helper |
The helper associated with this gather. |
The first routine to call, gathers the sizes of the data to be sent.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(Matrix_lsc), | intent(in) | :: | matrix | |||
integer, | intent(inout) | :: | comm | |||
type(Matrix_lsc), | intent(inout) | :: | gathered_matrix |
The matrix we are gathering. |
||
type(ReduceHelper_t), | intent(inout) | :: | helper |
Second function to call, will gather the data and align one matrix next to another.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(Matrix_lsr), | intent(in) | :: | matrix |
The matrix to send. |
||
integer, | intent(inout) | :: | comm |
The communicator to send along. |
||
type(Matrix_lsr), | intent(inout) | :: | gathered_matrix |
The matrix we are gathering. |
||
type(ReduceHelper_t), | intent(inout) | :: | helper |
The helper associated with this gather. |
Second function to call, will gather the data and align one matrix next to another.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(Matrix_lsc), | intent(in) | :: | matrix |
The matrix to send. |
||
integer, | intent(inout) | :: | comm |
The communicator to send along. |
||
type(Matrix_lsc), | intent(inout) | :: | gathered_matrix |
The matrix we are gathering. |
||
type(ReduceHelper_t), | intent(inout) | :: | helper |
The helper associated with this gather. |
Third function to call, finishes setting up the matrices.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(Matrix_lsr), | intent(in) | :: | matrix |
The matrix to send. |
||
type(Matrix_lsr), | intent(inout) | :: | gathered_matrix |
The matrix we are gathering. |
||
type(ReduceHelper_t), | intent(inout) | :: | helper |
The helper associated with this gather. |
Third function to call, finishes setting up the matrices.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(Matrix_lsc), | intent(in) | :: | matrix |
The matrix to send. |
||
type(Matrix_lsc), | intent(inout) | :: | gathered_matrix |
The matrix we are gathering. |
||
type(ReduceHelper_t), | intent(inout) | :: | helper |
The helper associated with this gather. |
Reduce and sum the matrices in one step. If you use this method, you lose the opportunity for overlapping communication.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(Matrix_lsr), | intent(in) | :: | matrix |
The matrix to send. |
||
integer, | intent(inout) | :: | comm |
The communicator to send along. |
||
type(Matrix_lsr), | intent(inout) | :: | gathered_matrix |
The matrix we are gathering. |
Reduce and sum the matrices in one step. If you use this method, you lose the opportunity for overlapping communication.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(Matrix_lsc), | intent(in) | :: | matrix |
The matrix to send. |
||
integer, | intent(inout) | :: | comm |
The communicator to send along. |
||
type(Matrix_lsc), | intent(inout) | :: | gathered_matrix |
The matrix we are gathering. |
The first routine to call, gathers the sizes of the data to be sent.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(Matrix_lsr), | intent(in) | :: | matrix |
The matrix to send. |
||
integer, | intent(inout) | :: | comm |
The communicator to send along. |
||
type(Matrix_lsr), | intent(inout) | :: | gathered_matrix |
The matrix we are gathering. |
||
type(ReduceHelper_t), | intent(inout) | :: | helper |
The helper associated with this gather. |
The first routine to call, gathers the sizes of the data to be sent.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(Matrix_lsc), | intent(in) | :: | matrix |
The matrix to send. |
||
integer, | intent(inout) | :: | comm |
The communicator to send along. |
||
type(Matrix_lsc), | intent(inout) | :: | gathered_matrix |
The matrix we are gathering. |
||
type(ReduceHelper_t), | intent(inout) | :: | helper |
The helper associated with this gather. |
Second routine to call for gathering and summing up the data.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(Matrix_lsr), | intent(in) | :: | matrix |
The matrix to send. |
||
integer, | intent(inout) | :: | comm |
The communicator to send along. |
||
type(Matrix_lsr), | intent(inout) | :: | gathered_matrix |
The matrix we are gathering. |
||
type(ReduceHelper_t), | intent(inout) | :: | helper |
The helper associated with this gather. |
Second routine to call for gathering and summing up the data.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(Matrix_lsc), | intent(in) | :: | matrix |
The matrix to send. |
||
integer, | intent(inout) | :: | comm |
The communicator to send along. |
||
type(Matrix_lsc), | intent(inout) | :: | gathered_matrix |
The matrix we are gathering. |
||
type(ReduceHelper_t), | intent(inout) | :: | helper |
The helper associated with this gather. |
Finally routine to sum up the matrices.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(Matrix_lsr), | intent(in) | :: | matrix |
The matrix to send. |
||
type(Matrix_lsr), | intent(inout) | :: | gathered_matrix |
The gathered_matrix the matrix being gathered. |
||
real(kind=NTREAL), | intent(in) | :: | threshold |
The threshold the threshold for flushing values. |
||
type(ReduceHelper_t), | intent(inout) | :: | helper |
The helper associated with this gather. |
Finally routine to sum up the matrices.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(Matrix_lsc), | intent(in) | :: | matrix |
The matrix to send. |
||
type(Matrix_lsc), | intent(inout) | :: | gathered_matrix |
The threshold the threshold for flushing values. |
||
real(kind=NTREAL), | intent(in) | :: | threshold |
The threshold the threshold for flushing values. |
||
type(ReduceHelper_t), | intent(inout) | :: | helper |
The helper associated with this gather. |
Reduce and sum the matrices in one step. If you use this method, you lose the opportunity for overlapping communication.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(Matrix_lsr), | intent(in) | :: | matrix |
The matrix to send. |
||
integer, | intent(inout) | :: | comm |
The communicator to send along. |
||
type(Matrix_lsr), | intent(inout) | :: | gathered_matrix |
The gathered_matrix the matrix being gathered. |
||
real(kind=NTREAL), | intent(in) | :: | threshold |
The threshold the threshold for flushing values. |
Reduce and sum the matrices in one step. If you use this method, you lose the opportunity for overlapping communication.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(Matrix_lsc), | intent(in) | :: | matrix |
The matrix to send. |
||
integer, | intent(inout) | :: | comm |
The communicator to send along. |
||
type(Matrix_lsc), | intent(inout) | :: | gathered_matrix |
The threshold the threshold for flushing values. |
||
real(kind=NTREAL), | intent(in) | :: | threshold |
The threshold the threshold for flushing values. |
A data structure to stores internal information about a reduce call.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer, | public | :: | comm_size |
Number of processors involved in this gather. |
|||
integer, | public | :: | outer_request |
A request object for gathering outer indices. |
|||
integer, | public | :: | inner_request |
A request object for gathering inner indices. |
|||
integer, | public | :: | data_request |
A request object for gathering data. |
|||
integer, | public | :: | error_code |
The error code after an MPI call. |
|||
integer, | public, | DIMENSION(:), ALLOCATABLE | :: | values_per_process |
Number of values to gather from each process. |
||
integer, | public, | DIMENSION(:), ALLOCATABLE | :: | displacement |
The displacements for where those gathered values should go. |
Test if a request for the size of the matrices is complete.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(ReduceHelper_t), | intent(inout) | :: | helper |
The gatherer helper structure. |
True if the request is finished.
Test if a request for the inner indices of the matrices is complete.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(ReduceHelper_t), | intent(inout) | :: | helper |
The gatherer helper structure. |
True if the request is finished.
Test if a request for the data of the matrices is complete.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(ReduceHelper_t), | intent(inout) | :: | helper |
The gatherer helper structure. |
True if the request is finished.