# FM_DIAG_SETTINGS

This section defines a set of heuristic rules which are used to calculate the optimal number of CPUs, M, needed to diagonalize a full matrix distributed on N processors (FM type). If M &lt N, the matrix is redistributed onto M processors before it is diagonalized. The optimal value is calculate according to M = ((K+ax-1)/(ax))*a, where K is the size of the matrix, and {a, x} are integers defined below. The default values have been selected based on timings on a Cray XE6. Supports diagonalization libraries SL and ELPA (see keyword ELPA_FORCE_REDISTRIBUTE). [Edit on GitHub]

## Keywords

- ELPA_FORCE_REDISTRIBUTE

- PARAMETER_A

- PARAMETER_X

- PRINT_FM_REDISTRIBUTE

## Keyword descriptions

ELPA_FORCE_REDISTRIBUTE: logical = T

  Lone keyword: `T`

  Usage: ELPA_FORCE_REDISTRIBUTE

  Controls how to perform redistribution when ELPA is used for diagonalization. By default, redistribution is always performed using the defined rules. By turning off this keyword, matrices are redistributed only to prevent crashes in the ELPA library which happens when the original matrix is distributed over too many processors. [Edit on GitHub]

PARAMETER_A: integer = 4

  Usage: PARAMETER_A 4

  Parameter used for defining the rule which determines the optimal number of CPUs needed to diagonalize a full distributed matrix. The optimal number of CPUs will be an integer multiple of this variable. [Edit on GitHub]

PARAMETER_X: integer = 60

  Usage: PARAMETER_X 60

  Parameter used for defining the rule which determines the optimal number of CPUs needed to diagonalize a full distributed matrix. The optimal number of CPUs will be roughly proportional to this value. [Edit on GitHub]

PRINT_FM_REDISTRIBUTE: logical = F

  Lone keyword: `T`

  Usage: PRINT_FM_REDISTRIBUTE

  Controls printing of information related to this section. For each diagonalized matrix, prints the size of the matrix, the optimal number of CPUs, as well as notifies if the matrix was redistributed. Useful for testing. [Edit on GitHub]