(git:6a2e663)
cp_fm_diag_utils Module Reference

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. More...

Data Types

type  cp_fm_redistribute_info
 

Functions/Subroutines

subroutine, public cp_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. More...
 
subroutine, public cp_fm_redistribute_start (matrix, eigenvectors, matrix_new, eigenvectors_new, caller_is_elpa, redist_info)
 Determines the optimal number of CPUs for matrix diagonalization and redistributes the input matrices if necessary. More...
 
subroutine, public cp_fm_redistribute_end (matrix, eigenvectors, eig, matrix_new, eigenvectors_new)
 Redistributes eigenvectors and eigenvalues back to the original communicator group. More...
 

Detailed Description

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.

History
  • [01.2018] moved redistribution related code from cp_fm_syevd here
Author
Nico Holmberg [01.2018]

Function/Subroutine Documentation

◆ cp_fm_redistribute_init()

subroutine, public cp_fm_diag_utils::cp_fm_redistribute_init ( integer, intent(in)  a,
integer, intent(in)  x,
logical, intent(in)  should_print,
logical, intent(in)  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.

Parameters
ainteger parameter used to define the rule for determining the optimal number of CPUs for diagonalization
xinteger parameter used to define the rule for determining the optimal number of CPUs for diagonalization
should_printflag that determines if information about the redistribution process should be printed
elpa_force_redistributeflag that if redistribution should always be performed when the ELPA diagonalization library is in use
Author
Nico Holmberg [01.2018]

Definition at line 147 of file cp_fm_diag_utils.F.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cp_fm_redistribute_start()

subroutine, public cp_fm_diag_utils::cp_fm_redistribute_start ( type(cp_fm_type), intent(in)  matrix,
type(cp_fm_type), intent(in)  eigenvectors,
type(cp_fm_type), intent(out)  matrix_new,
type(cp_fm_type), intent(out)  eigenvectors_new,
logical, intent(in), optional  caller_is_elpa,
type(cp_fm_redistribute_info), intent(out), optional  redist_info 
)

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

Parameters
matrixthe input cp_fm_type matrix to be diagonalized
eigenvectorsthe cp_fm_type matrix that will hold the eigenvectors of the input matrix
matrix_newthe redistributed input matrix which will subsequently be diagonalized, or a pointer to the original matrix if no redistribution is required
eigenvectors_newthe redistributed eigenvectors matrix, or a pointer to the original matrix if no redistribution is required
caller_is_elpaflag that determines if ELPA is used for diagonalization
redist_infoget info about the redistribution
History
  • [01.2018] created by moving redistribution related code from cp_fm_syevd here
Author
Nico Holmberg [01.2018]

Definition at line 262 of file cp_fm_diag_utils.F.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cp_fm_redistribute_end()

subroutine, public cp_fm_diag_utils::cp_fm_redistribute_end ( type(cp_fm_type), intent(in)  matrix,
type(cp_fm_type), intent(in)  eigenvectors,
real(kind=dp), dimension(:), intent(inout)  eig,
type(cp_fm_type), intent(inout)  matrix_new,
type(cp_fm_type), intent(inout)  eigenvectors_new 
)

Redistributes eigenvectors and eigenvalues back to the original communicator group.

Parameters
matrixthe input cp_fm_type matrix to be diagonalized
eigenvectorsthe cp_fm_type matrix that will hold the eigenvectors of the input matrix
eigglobal array holding the eigenvalues of the input matrixmatrix
matrix_newthe redistributed input matrix which will subsequently be diagonalized, or a pointer to the original matrix if no redistribution is required
eigenvectors_newthe redistributed eigenvectors matrix, or a pointer to the original matrix if no redistribution is required
History
  • [01.2018] created by moving redistribution related code from cp_fm_syevd here
Author
Nico Holmberg [01.2018]

Definition at line 455 of file cp_fm_diag_utils.F.

Here is the caller graph for this function: