Documentation for module dbcsr_tensor_test

General methods for testing DBCSR tensors.

source: dbcsr_tensor_test.F
Loading...

public Subroutines/Functions:

test tensor contraction
Create test distribution
Allocate and fill test tensor - entries are enumerated by their index s.t. they only depend on global properties of the tensor but not on distribution, matrix representation, etc.
Test equivalence of all tensor formats, using a random distribution.

SUBROUTINEdbcsr_t_contract_test(tensor_1, tensor_2, tensor_3, contract_1, notcontract_1, contract_2, notcontract_2, map_1, map_2, unit_nr, write_int)

test tensor contraction

Arguments:
INTENT(inout)
:: tensor_1 ...
INTENT(inout)
:: tensor_2 ...
INTENT(inout)
:: tensor_3 ...
INTEGER,
INTENT(in)
:: contract_1(:) ...
INTEGER,
INTENT(in)
:: notcontract_1(:) ...
INTEGER,
INTENT(in)
:: contract_2(:) ...
INTEGER,
INTENT(in)
:: notcontract_2(:) ...
INTEGER,
INTENT(in)
:: map_1(:) ...
INTEGER,
INTENT(in)
:: map_2(:) ...
INTEGER,
INTENT(in)
:: unit_nr ...
LOGICAL,
INTENT(in),
OPTIONAL
:: write_int ...

SUBROUTINEdbcsr_t_random_dist(dist_array, dist_size, nbins, mp_comm)

Create test distribution

Arguments:
INTEGER,
INTENT(out),
ALLOCATABLE
:: dist_array(:) ...
INTEGER,
INTENT(in)
:: dist_size ...
INTEGER,
INTENT(in)
:: nbins ...
INTEGER,
INTENT(in)
:: mp_comm ...

SUBROUTINEdbcsr_t_setup_test_tensor(tensor, mp_comm, blk_ind_1, blk_ind_2, blk_ind_3, blk_ind_4)

Allocate and fill test tensor - entries are enumerated by their index s.t. they only depend on global properties of the tensor but not on distribution, matrix representation, etc.

Arguments:
INTENT(inout)
:: tensor ...
INTEGER,
INTENT(in)
:: mp_comm communicator
INTEGER,
INTENT(in),
OPTIONAL
:: blk_ind_1(:) index along dimension 1 of non-zero blocks
INTEGER,
INTENT(in),
OPTIONAL
:: blk_ind_2(:) ...
INTEGER,
INTENT(in),
OPTIONAL
:: blk_ind_3(:) ...
INTEGER,
INTENT(in),
OPTIONAL
:: blk_ind_4(:) ...

SUBROUTINEdbcsr_t_test_formats(ndims, mp_comm_2d, unit_nr, verbose, blk_size_1, blk_size_2, blk_size_3, blk_size_4, blk_ind_1, blk_ind_2, blk_ind_3, blk_ind_4)

Test equivalence of all tensor formats, using a random distribution.

Arguments:
INTEGER,
INTENT(in)
:: ndims tensor rank
INTEGER,
INTENT(in)
:: mp_comm_2d communicator
INTEGER,
INTENT(in)
:: unit_nr output unit, needs to be a valid unit number on all mpi ranks
LOGICAL,
INTENT(in)
:: verbose if .TRUE., print all tensor blocks
INTEGER,
INTENT(in),
OPTIONAL
:: blk_size_1(:) block sizes along dimension 1
INTEGER,
INTENT(in),
OPTIONAL
:: blk_size_2(:) ...
INTEGER,
INTENT(in),
OPTIONAL
:: blk_size_3(:) ...
INTEGER,
INTENT(in),
OPTIONAL
:: blk_size_4(:) ...
INTEGER,
INTENT(in),
OPTIONAL
:: blk_ind_1(:) index along dimension 1 of non-zero blocks
INTEGER,
INTENT(in),
OPTIONAL
:: blk_ind_2(:) ...
INTEGER,
INTENT(in),
OPTIONAL
:: blk_ind_3(:) ...
INTEGER,
INTENT(in),
OPTIONAL
:: blk_ind_4(:) ...