Helper Routines for Computing The Cholesky Decomposition
A helper routine to insert a value into a sparse vector.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(inout) | :: | values_per | Values per row. |
||
integer, | intent(inout), | DIMENSION(:) | :: | indices | Indices associated with each value. |
|
real(kind=NTREAL), | intent(inout), | DIMENSION(:) | :: | values | Values. |
|
integer, | intent(in) | :: | insert_row | Row to insert into. |
||
real(kind=NTREAL), | intent(in) | :: | insert_value | Value to insert. |
A helper routine to broadcast a sparse vector
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(inout) | :: | num_values | Number of values we are broadcasting. |
||
integer, | intent(inout), | DIMENSION(:) | :: | indices | Indices to broadcast. |
|
real(kind=NTREAL), | intent(inout), | DIMENSION(:) | :: | values | Values to broadcast. |
|
integer, | intent(in) | :: | root | Root from which we broadcast. |
||
integer, | intent(inout) | :: | comm | Communicator to broadcast along. |
Construct the vector holding the accumulated diagonal values
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(Matrix_ps), | intent(in) | :: | AMat | AMat the matrix we're working on (for meta data). |
||
type(ProcessGrid_t), | intent(inout) | :: | process_grid | The process grid we're operating on. |
||
type(Matrix_ldr), | intent(in) | :: | dense_a | A dense representation of the values. |
||
real(kind=NTREAL), | intent(inout), | DIMENSION(:) | :: | diag | Diagonal values computed. |
Helper routine which computes sparse dot products across processors. Computes the dot product of one vector with several others.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | num_values_i | The length of vector i. |
||
integer, | intent(in), | DIMENSION(:) | :: | indices_i | The index value of the sparse vector i. |
|
real(kind=NTREAL), | intent(in), | DIMENSION(:) | :: | values_i | The values of the sparse vector i. |
|
integer, | intent(in), | DIMENSION(:) | :: | num_values_j | Tn array with the length of vectors j. |
|
integer, | intent(in), | DIMENSION(:,:) | :: | indices_j | The indices of the vectors j. |
|
real(kind=NTREAL), | intent(in), | DIMENSION(:,:) | :: | values_j | The values of the vectors j. |
|
real(kind=NTREAL), | intent(out), | DIMENSION(:) | :: | out_values | The dot product values for each vector j. |
|
integer, | intent(inout) | :: | comm | The communicator to reduce along. |
Helper routine which computes sparse dot products across processors. Computes the dot product of one vector with several others. The pivoted version has the number of local pivots to work on as a parameter.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | num_values_i | The length of vector i. |
||
integer, | intent(in), | DIMENSION(:) | :: | indices_i | The index value of the sparse vector i. |
|
real(kind=NTREAL), | intent(in), | DIMENSION(:) | :: | values_i | The values of the sparse vector i. |
|
integer, | intent(in), | DIMENSION(:) | :: | num_values_j | Tn array with the length of vectors j. |
|
integer, | intent(in), | DIMENSION(:,:) | :: | indices_j | The indices of the vectors j. |
|
real(kind=NTREAL), | intent(in), | DIMENSION(:,:) | :: | values_j | The values of the vectors j. |
|
integer, | intent(in), | DIMENSION(:) | :: | pivot_vector | Vector storing the pivot values. |
|
integer, | intent(in) | :: | num_local_pivots | Number of pivots. |
||
real(kind=NTREAL), | intent(out), | DIMENSION(:) | :: | out_values | The dot product values for each vector j. |
|
integer, | intent(inout) | :: | comm | The communicator to reduce along. |
A helper routine that gathers the matrices in the same column into one.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(Matrix_lsr), | intent(in) | :: | local_matrix | The local matrix on each process. |
||
type(Matrix_lsr), | intent(inout) | :: | column_matrix | The final result. |
||
type(ProcessGrid_t), | intent(inout) | :: | process_grid | The process grid to operate on. |
Compute the pivot vector.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(Matrix_ps), | intent(in) | :: | AMat | The matrix we're working on. |
||
type(ProcessGrid_t), | intent(inout) | :: | process_grid | The process grid to compute on. |
||
integer, | intent(in) | :: | start_index | The start index to look |
||
integer, | intent(inout), | DIMENSION(:) | :: | pivot_vector | The current pivot vector. |
|
real(kind=NTREAL), | intent(in), | DIMENSION(:) | :: | diag | The diagonal values. |
|
integer, | intent(out) | :: | index | The pivot index selected. |
||
real(kind=NTREAL), | intent(out) | :: | VALUE | The pivot value. |
||
integer, | intent(inout), | DIMENSION(:) | :: | local_pivots | The local pivot values to modify. |
|
integer, | intent(out) | :: | num_local_pivots | Number of pivots stored locally. |
Unpack to a global matrix.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in), | DIMENSION(:) | :: | values_per_column | The number of values in a column. |
|
integer, | intent(in), | DIMENSION(:,:) | :: | index | Index values. |
|
real(kind=NTREAL), | intent(in), | DIMENSION(:,:) | :: | values | Actual values. |
|
type(Matrix_ps), | intent(inout) | :: | LMat | Matrix to unpack into. |
Construct a lookup for columns
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(Matrix_ps), | intent(in) | :: | AMat | Matrix we're computing. |
||
type(ProcessGrid_t), | intent(inout) | :: | process_grid | Grid we're computing along. |
||
integer, | intent(inout), | DIMENSION(:) | :: | col_root_lookup | The lookup we're computing. |