CholeskyModule Module

Helper Routines for Computing The Cholesky Decomposition



Contents


Interfaces

public interface AppendToVector

  • private pure subroutine AppendToVector_r(values_per, indices, values, insert_row, insert_value)

    A helper routine to insert a value into a sparse vector.

    Arguments

    Type IntentOptional 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.

public interface BroadcastVector

  • private subroutine BroadcastVector_r(num_values, indices, values, root, comm)

    A helper routine to broadcast a sparse vector

    Arguments

    Type IntentOptional 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.

public interface ConstructDiag

  • private subroutine ConstructDiag_r(AMat, process_grid, dense_a, diag)

    Construct the vector holding the accumulated diagonal values

    Arguments

    Type IntentOptional Attributes Name
    type(Matrix_ps), intent(in) :: AMat

    AMat the matrix we are working on (for meta data).

    type(ProcessGrid_t), intent(inout) :: process_grid

    The process grid we are 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.

public interface DotAllHelper

  • private subroutine DotAllHelper_r(num_values_i, indices_i, values_i, num_values_j, indices_j, values_j, out_values, comm)

    Helper routine which computes sparse dot products across processors. Computes the dot product of one vector with several others.

    Arguments

    Type IntentOptional 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.

public interface DotAllPivoted

  • private subroutine DotAllPivoted_r(num_values_i, indices_i, values_i, num_values_j, indices_j, values_j, pivot_vector, num_local_pivots, out_values, comm)

    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.

    Arguments

    Type IntentOptional 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.

public interface GatherMatrixColumn

  • private subroutine GatherMatrixColumn_r(local_matrix, column_matrix, process_grid)

    A helper routine that gathers the matrices in the same column into one.

    Arguments

    Type IntentOptional 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.

public interface GetPivot

  • private subroutine GetPivot_r(AMat, process_grid, start_index, pivot_vector, diag, index, VALUE, local_pivots, num_local_pivots)

    Compute the pivot vector.

    Arguments

    Type IntentOptional Attributes Name
    type(Matrix_ps), intent(in) :: AMat

    The matrix we are 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.

public interface UnpackCholesky

  • private subroutine UnpackCholesky_r(values_per_column, index, values, LMat)

    Unpack to a global matrix.

    Arguments

    Type IntentOptional 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.


Subroutines

public subroutine ConstructRankLookup(AMat, process_grid, col_root_lookup)

Construct a lookup for columns

Arguments

Type IntentOptional Attributes Name
type(Matrix_ps), intent(in) :: AMat

Matrix we are computing.

type(ProcessGrid_t), intent(inout) :: process_grid

Grid we are computing along.

integer, intent(inout), DIMENSION(:) :: col_root_lookup

The lookup we are computing.