dbcsr_tests Module

Tests for CP2K DBCSR operations



Variables

Type Visibility Attributes Name Initial
character(len=*), private, parameter :: moduleN = 'dbcsr_tests'
integer, public, parameter :: dbcsr_test_mm = 1
integer, public, parameter :: dbcsr_test_binary_io = 2

Subroutines

public subroutine dbcsr_run_tests(mp_group, io_unit, nproc, matrix_sizes, trs, bs_m, bs_n, bs_k, sparsities, alpha, beta, data_type, test_type, n_loops, eps, retain_sparsity, always_checksum)

Performs a variety of matrix multiplies of same matrices on different processor grids

Arguments

Type IntentOptional Attributes Name
type(mp_comm_type), intent(in) :: mp_group
integer, intent(in) :: io_unit

MPI communicator which unit to write to, if not negative

integer, DIMENSION(:), POINTER :: nproc

number of processors to test on

integer, intent(in), DIMENSION(:) :: matrix_sizes

size of matrices to test

logical, intent(in), DIMENSION(2) :: trs

transposes of the two matrices

integer, DIMENSION(:), POINTER :: bs_m

block sizes of the 3 dimensions block sizes of the 3 dimensions block sizes of the 3 dimensions

integer, DIMENSION(:), POINTER :: bs_n

block sizes of the 3 dimensions block sizes of the 3 dimensions block sizes of the 3 dimensions

integer, DIMENSION(:), POINTER :: bs_k

block sizes of the 3 dimensions block sizes of the 3 dimensions block sizes of the 3 dimensions

real(kind=dp), intent(in), DIMENSION(3) :: sparsities

sparsities of matrices to create

real(kind=dp), intent(in) :: alpha

alpha value to use in multiply beta value to use in multiply

real(kind=dp), intent(in) :: beta

alpha value to use in multiply beta value to use in multiply

integer, intent(in) :: data_type

matrix data type number of repetition for each multiplication

integer, intent(in) :: test_type

matrix data type number of repetition for each multiplication

integer, intent(in) :: n_loops

matrix data type number of repetition for each multiplication

real(kind=dp), intent(in) :: eps

eps value for filtering

logical, intent(in) :: retain_sparsity

checksum after each multiplication

logical, intent(in) :: always_checksum

checksum after each multiplication

private subroutine test_binary_io(matrix_a, io_unit)

dumps and retrieves a dbcsr matrix, and checks a checksum

Arguments

Type IntentOptional Attributes Name
type(dbcsr_type) :: matrix_a

matrix to be written

integer :: io_unit

unit for status updates

private subroutine test_multiplies_multiproc(group_sizes, matrix_a, matrix_b, matrix_c, transa, transb, alpha, beta, limits, retain_sparsity, n_loops, eps, io_unit, always_checksum)

Performs a variety of matrix multiplies of same matrices on different processor grids

Arguments

Type IntentOptional Attributes Name
integer, DIMENSION(:, :) :: group_sizes

array of (sub) communicator sizes to test (2-D)

type(dbcsr_type), intent(in) :: matrix_a

matrices to multiply matrices to multiply matrices to multiply

type(dbcsr_type), intent(in) :: matrix_b

matrices to multiply matrices to multiply matrices to multiply

type(dbcsr_type), intent(in) :: matrix_c

matrices to multiply matrices to multiply matrices to multiply

character(len=1), intent(in) :: transa
character(len=1), intent(in) :: transb
type(dbcsr_scalar_type), intent(in) :: alpha
type(dbcsr_scalar_type), intent(in) :: beta
integer, intent(in), optional, DIMENSION(6) :: limits
logical, intent(in), optional :: retain_sparsity
integer, intent(in) :: n_loops
real(kind=dp), intent(in) :: eps
integer, intent(in) :: io_unit

which unit to write to, if not negative

logical :: always_checksum