Documentation for module cp_fm_struct

represent the structure of a full matrix

source: cp_fm_struct.F
Loading...

public Types:

cp_fm_struct_type
keeps the information about the structure of a full matrix
cp_fm_struct_p_type
...

public Subroutines/Functions:

allows to modify the default settings for matrix creation
allocates and initializes a full matrix structure
creates a struct with twice the number of blocks on each core. If matrix A has to be multiplied with B anc C, a significant speedup of pdgemm can be acchieved by joining the matrices in a new one with this structure (see arnoldi in rt_matrix_exp)
returns true if the two matrix structures are equivalent, false otherwise.
returns the values of various attributes of the matrix structure
FUNCTION
INTEGER
cp_fm_struct_get_ncol_block
...
FUNCTION
INTEGER
cp_fm_struct_get_nrow_block
...
releases a full matrix structure
retains a full matrix structure

public Types:

TYPE :: cp_fm_struct_p_type

...


POINTER :: struct ...

TYPE :: cp_fm_struct_type

keeps the information about the structure of a full matrix


POINTER :: para_env the parallel environment of the matrices with this structure
POINTER :: context the blacs context (parallel environment for scalapack), should be compatible with para_env
INTEGER,
DIMENSION(9) :: descriptor the scalapack descriptor of the matrices, when using scalapack (ncol_block=descriptor(6), ncol_global=descriptor(4), nrow_block=descriptor(5), nrow_global=descriptor(3))
INTEGER
:: nrow_block number of rows of a scalapack block
INTEGER
:: ncol_block number of columns of a scalapack block
INTEGER
:: nrow_global number of rows of the matrix
INTEGER
:: ncol_global number of rows
INTEGER,
DIMENSION(2) :: first_p_pos position of the first processor (for scalapack)
INTEGER,
DIMENSION(:), POINTER :: row_indices real (global) indices of the rows (defined only for the local rows really used)
INTEGER,
DIMENSION(:), POINTER :: col_indices real (global) indices of the cols (defined only for the local cols really used)
INTEGER,
DIMENSION(:), POINTER :: nrow_locals nrow_locals(i) number of local rows of the matrix really used on the processors with context%mepos(1)==i
INTEGER,
DIMENSION(:), POINTER :: ncol_locals ncol_locals(i) number of local rows of the matrix really used on the processors with context%mepos(2)==i
INTEGER
:: id_nr an identification number (guaranteed to be unique)
INTEGER
:: ref_count reference count (see doc/ReferenceCounting.html)
INTEGER
:: local_leading_dimension leading dimension of the data that is stored on this processor

SUBROUTINEcp_fm_struct_config(nrow_block, ncol_block, force_block)

allows to modify the default settings for matrix creation

Arguments:
INTEGER,
OPTIONAL
:: nrow_block ...
INTEGER,
OPTIONAL
:: ncol_block ...
LOGICAL,
OPTIONAL
:: force_block ...

SUBROUTINEcp_fm_struct_create(fmstruct, para_env, context, nrow_global, ncol_global, nrow_block, ncol_block, descriptor, first_p_pos, local_leading_dimension, template_fmstruct, square_blocks, force_block)

allocates and initializes a full matrix structure

Arguments:
POINTER
:: fmstruct the pointer that will point to the new structure
POINTER, OPTIONAL
:: para_env the parallel environment
POINTER, OPTIONAL
:: context the blacs context of this matrix
INTEGER,
INTENT(in),
OPTIONAL
:: nrow_global the number of row of the full matrix
INTEGER,
INTENT(in),
OPTIONAL
:: ncol_global the number of colums of the full matrix
INTEGER,
INTENT(in),
OPTIONAL
:: nrow_block the number of rows of a block of the matrix ! useful defaults are in, do not specify
INTEGER,
INTENT(in),
OPTIONAL
:: ncol_block the number of colums of a block of the matrix ! useful defaults are in, do not specify
INTEGER,
INTENT(in),
OPTIONAL
:: descriptor(9) the scalapack descriptor of the matrix (if not given a new one is allocated
INTEGER,
OPTIONAL
:: first_p_pos(2) ...
INTEGER,
INTENT(in),
OPTIONAL
:: local_leading_dimension the leading dimension of the locally stored data block
POINTER, OPTIONAL
:: template_fmstruct a matrix structure where to take the default values
LOGICAL,
INTENT(in),
OPTIONAL
:: square_blocks ...
LOGICAL,
INTENT(in),
OPTIONAL
:: force_block ...

SUBROUTINEcp_fm_struct_double(fmstruct, struct, context, col, row)

creates a struct with twice the number of blocks on each core. If matrix A has to be multiplied with B anc C, a significant speedup of pdgemm can be acchieved by joining the matrices in a new one with this structure (see arnoldi in rt_matrix_exp)

Arguments:
POINTER
:: fmstruct the struct to create
POINTER
:: struct struct of either A or B
POINTER
:: context ...
LOGICAL
:: col in which direction the matrix should be enlarged
LOGICAL
:: row in which direction the matrix should be enlarged

FUNCTIONcp_fm_struct_equivalent(fmstruct1, fmstruct2)

returns true if the two matrix structures are equivalent, false otherwise.

Return Value ::
LOGICAL
Arguments:
POINTER
:: fmstruct1 one of the full matrix structures to compare
POINTER
:: fmstruct2 the second of the full matrix structures to compare

SUBROUTINEcp_fm_struct_get(fmstruct, para_env, context, descriptor, ncol_block, nrow_block, nrow_global, ncol_global, id_nr, ref_count, first_p_pos, row_indices, col_indices, nrow_local, ncol_local, nrow_locals, ncol_locals, local_leading_dimension)

returns the values of various attributes of the matrix structure

Arguments:
POINTER
:: fmstruct the structure you whant info about
POINTER, OPTIONAL
:: para_env ...
POINTER, OPTIONAL
:: context ...
INTEGER,
INTENT(out),
OPTIONAL
:: descriptor(9) ...
INTEGER,
INTENT(out),
OPTIONAL
:: ncol_block ...
INTEGER,
INTENT(out),
OPTIONAL
:: nrow_block ...
INTEGER,
INTENT(out),
OPTIONAL
:: nrow_global ...
INTEGER,
INTENT(out),
OPTIONAL
:: ncol_global ...
INTEGER,
INTENT(out),
OPTIONAL
:: id_nr ...
INTEGER,
INTENT(out),
OPTIONAL
:: ref_count ...
INTEGER,
INTENT(out),
OPTIONAL
:: first_p_pos(2) ...
INTEGER,
POINTER, OPTIONAL
:: row_indices(:) ...
INTEGER,
POINTER, OPTIONAL
:: col_indices(:) ...
INTEGER,
INTENT(out),
OPTIONAL
:: nrow_local ...
INTEGER,
INTENT(out),
OPTIONAL
:: ncol_local ...
INTEGER,
POINTER, OPTIONAL
:: nrow_locals(:) ...
INTEGER,
POINTER, OPTIONAL
:: ncol_locals(:) ...
INTEGER,
INTENT(out),
OPTIONAL
:: local_leading_dimension ...

FUNCTIONcp_fm_struct_get_ncol_block()

...

Return Value ::
INTEGER

FUNCTIONcp_fm_struct_get_nrow_block()

...

Return Value ::
INTEGER

SUBROUTINEcp_fm_struct_release(fmstruct)

releases a full matrix structure

Arguments:
POINTER
:: fmstruct the structure to release

SUBROUTINEcp_fm_struct_retain(fmstruct)

retains a full matrix structure

Arguments:
POINTER
:: fmstruct the structure to retain