Documentation for module dbcsr_mm_common

Common variables and routines for the dbcsr matrix-matrix multiplication algorithms.

source: dbcsr_mm_common.F
Loading...

public Types:

dbcsr_mm_multrec_type_p
...

public Subroutines/Functions:

write out a stack for transposing the blocks
Calculates per-block norms.
...
Enumerate all occuring blocksizes
Gathers the local elements from all data (full_data)
Guess the size of the product matrix from the A and B sparsities
SUBROUTINE RECURSIVE
rec_sort_index (mi, mf, ni, nf, nele, a, d)
Sorts index for recursing.
...

Parameters:

REAL
:: huge_norm = huge(1.0)**(1.0/3.0)

Module variables:

:: dbcsr_mpi_statistics
REAL
:: max_memory = 0
:: memtype_abpanel_1
:: memtype_abpanel_2
:: memtype_mpi_buffer
:: memtype_mpi_product
POINTER :: memtype_product_wm(:) = >null()
:: memtype_trsbuffer_1
:: memtype_trsbuffer_2
INTEGER
:: num_multiplications = 0
:: stream_1
:: stream_2

public Types:

TYPE :: dbcsr_mm_multrec_type_p

...


POINTER :: p => NULL() ...
INTEGER(int_4),
DIMENSION(64) :: padding ...

SUBROUTINEacc_transpose_blocks(matrix, trs_stackbuf, row_blk_sizes, col_blk_sizes, row_blk_sizes2enum, enum2row_blk_sizes, col_blk_sizes2enum, enum2col_blk_sizes, noresize)

write out a stack for transposing the blocks

Arguments:
TYPE(dbcsr_type),
INTENT(in)
:: matrix ...
INTENT(inout)
:: trs_stackbuf ...
INTEGER,
INTENT(in),
POINTER
:: row_blk_sizes(:) ...
INTEGER,
INTENT(in),
POINTER
:: col_blk_sizes(:) ...
INTEGER,
INTENT(in),
POINTER
:: row_blk_sizes2enum(:) ...
INTEGER,
INTENT(in),
POINTER
:: enum2row_blk_sizes(:) ...
INTEGER,
INTENT(in),
POINTER
:: col_blk_sizes2enum(:) ...
INTEGER,
INTENT(in),
POINTER
:: enum2col_blk_sizes(:) ...
LOGICAL,
INTENT(in),
OPTIONAL
:: noresize ...

SUBROUTINEcalculate_norms(matrix, norms, row_blk_sizes, col_blk_sizes)

Calculates per-block norms.

Arguments:
TYPE(dbcsr_type),
INTENT(in)
:: matrix DBCSR matrix for which to calculate norms
REAL(sp),
INTENT(out)
:: norms(:) Block norms
INTEGER,
INTENT(in),
POINTER
:: row_blk_sizes(:) ...
INTEGER,
INTENT(in),
POINTER
:: col_blk_sizes(:) ...

SUBROUTINEcount_mpi_statistics(mpi_statistics, data_size, size_breakdown, element_size_bytes)

...

Arguments:
REAL,
INTENT(inout)
:: mpi_statistics(:) ...
INTEGER,
INTENT(in)
:: data_size ...
INTEGER(int_8),
INTENT(inout),
OPTIONAL
:: size_breakdown(:,:) ...
INTEGER,
INTENT(in),
OPTIONAL
:: element_size_bytes ...

SUBROUTINEenumerate_blk_sizes(blk_sizes, max_size, enum, rev_enum)

Enumerate all occuring blocksizes

Arguments:
INTEGER,
POINTER
:: blk_sizes(:) ...
INTEGER,
INTENT(in)
:: max_size ...
INTEGER,
POINTER
:: enum(:) ...
INTEGER,
POINTER
:: rev_enum(:) ...

PURE SUBROUTINElocal_filter(full_data, nle, local_elements, local_data)

Gathers the local elements from all data (full_data)

Arguments:
INTEGER,
INTENT(in)
:: full_data(:) All elements
INTEGER,
INTENT(in)
:: nle Number of local elements
INTEGER,
INTENT(in)
:: local_elements(1:nle) List of local elements
INTEGER,
INTENT(out)
:: local_data(1:nle) Local elements obtained from all elements

FUNCTIONproduct_matrix_size_guess(matrix_left, matrix_right, product_matrix, left_data_size, right_data_size, left_col_nimages, right_row_nimages, nthreads)

Guess the size of the product matrix from the A and B sparsities

Return Value ::
INTEGER
Arguments:
TYPE(dbcsr_type),
INTENT(in)
:: matrix_left ...
TYPE(dbcsr_type),
INTENT(in)
:: matrix_right ...
TYPE(dbcsr_type),
INTENT(in)
:: product_matrix ...
INTEGER,
INTENT(in)
:: left_data_size ...
INTEGER,
INTENT(in)
:: right_data_size ...
INTEGER,
INTENT(in)
:: left_col_nimages ...
INTEGER,
INTENT(in)
:: right_row_nimages ...
INTEGER,
INTENT(in)
:: nthreads ...

RECURSIVE SUBROUTINErec_sort_index(mi, mf, ni, nf, nele, a, d)

Sorts index for recursing.

Arguments:
INTEGER,
INTENT(in)
:: mi ...
INTEGER,
INTENT(in)
:: mf ...
INTEGER,
INTENT(in)
:: ni ...
INTEGER,
INTENT(in)
:: nf ...
INTEGER,
INTENT(in)
:: nele ...
INTEGER,
INTENT(inout)
:: a(3,1:nele) ...
INTEGER,
INTENT(in)
:: d ...

SUBROUTINEsetup_buffer_matrix(matrix, source_matrix, index_size, data_size, data_buffer, data_memory_type)

...

Arguments:
TYPE(dbcsr_type),
INTENT(inout)
:: matrix ...
TYPE(dbcsr_type),
INTENT(in)
:: source_matrix ...
INTEGER,
INTENT(in),
OPTIONAL
:: index_size ...
INTEGER,
INTENT(in),
OPTIONAL
:: data_size ...
INTENT(in),
OPTIONAL
:: data_buffer ...
INTENT(in),
OPTIONAL
:: data_memory_type ...

private Parameters/Types:

private Types:

TYPE :: dbcsr_memtype_type_p

...


POINTER :: p => NULL() ...
INTEGER(int_4),
DIMENSION(64) :: padding ...