Documentation for module cp_fm_diag_utils

Auxiliary tools to redistribute cp_fm_type matrices before and after diagonalization. Heuristics are used to determine the optimal number of CPUs for diagonalization and the input matrices are redistributed if necessary

source: cp_fm_diag_utils.F
Loading...

public Subroutines/Functions:

Redistributes eigenvectors and eigenvalues back to the original communicator group
Initializes the parameters that determine how to calculate the optimal number of CPUs for diagonalizing a matrix. The parameters are read from the GLOBAL input section.
Determines the optimal number of CPUs for matrix diagonalization and redistributes the input matrices if necessary

SUBROUTINEcp_fm_redistribute_end(matrix, eigenvectors, eig, matrix_new, eigenvectors_new)

Redistributes eigenvectors and eigenvalues back to the original communicator group

Arguments:
TYPE(cp_fm_type),
POINTER
:: matrix the input cp_fm_type matrix to be diagonalized
TYPE(cp_fm_type),
POINTER
:: eigenvectors the cp_fm_type matrix that will hold the eigenvectors of the input matrix
REAL(dp)
:: eig(:) global array holding the eigenvalues of the input matrixmatrix
TYPE(cp_fm_type),
INTENT(out),
POINTER
:: matrix_new the redistributed input matrix which will subsequently be diagonalized, or a pointer to the original matrix if no redistribution is required
TYPE(cp_fm_type),
INTENT(out),
POINTER
:: eigenvectors_new the redistributed eigenvectors matrix, or a pointer to the original matrix if no redistribution is required

SUBROUTINEcp_fm_redistribute_init(a, x, should_print, elpa_force_redistribute)

Initializes the parameters that determine how to calculate the optimal number of CPUs for diagonalizing a matrix. The parameters are read from the GLOBAL input section.

Arguments:
INTEGER
:: a integer parameter used to define the rule for determining the optimal number of CPUs for diagonalization
INTEGER
:: x integer parameter used to define the rule for determining the optimal number of CPUs for diagonalization
LOGICAL
:: should_print flag that determines if information about the redistribution process should be printed
LOGICAL
:: elpa_force_redistribute flag that if redistribution should always be perfomed when the ELPA diagonalization library is in use

SUBROUTINEcp_fm_redistribute_start(matrix, eigenvectors, matrix_new, eigenvectors_new, caller_is_elpa)

Determines the optimal number of CPUs for matrix diagonalization and redistributes the input matrices if necessary

Arguments:
TYPE(cp_fm_type),
POINTER
:: matrix the input cp_fm_type matrix to be diagonalized
TYPE(cp_fm_type),
POINTER
:: eigenvectors the cp_fm_type matrix that will hold the eigenvectors of the input matrix
TYPE(cp_fm_type),
INTENT(out),
POINTER
:: matrix_new the redistributed input matrix which will subsequently be diagonalized, or a pointer to the original matrix if no redistribution is required
TYPE(cp_fm_type),
INTENT(out),
POINTER
:: eigenvectors_new the redistributed eigenvectors matrix, or a pointer to the original matrix if no redistribution is required
LOGICAL,
INTENT(in),
OPTIONAL
:: caller_is_elpa flag that determines if ELPA is used for diagonalization