(git:e7e05ae)
dbt_types.F File Reference

Go to the source code of this file.

Modules

module  dbt_types
 DBT tensor framework for block-sparse tensor contraction: Types and create/destroy routines.
 

Functions/Subroutines

recursive subroutine, public dbt_types::dbt_mp_dims_create (nodes, dims, tensor_dims, lb_ratio)
 Create process grid dimensions corresponding to one dimension of the matrix representation of a tensor, imposing that no process grid dimension is greater than the corresponding tensor dimension. More...
 
subroutine, public dbt_types::dbt_pgrid_create_expert (mp_comm, dims, pgrid, map1_2d, map2_2d, tensor_dims, nsplit, dimsplit)
 Create an n-dimensional process grid. We can not use a n-dimensional MPI cartesian grid for tensors since the mapping between n-dim. and 2-dim. index allows for an arbitrary reordering of tensor index. Therefore we can not use n-dim. MPI Cartesian grid because it may not be consistent with the respective 2d grid. The 2d Cartesian MPI grid is the reference grid (since tensor data is stored as DBM matrix) and this routine creates an object that is a n-dim. interface to this grid. map1_2d and map2_2d don't need to be specified (correctly), grid may be redefined in dbt_distribution_new. Note that pgrid is equivalent to a MPI cartesian grid only if map1_2d and map2_2d don't reorder indices (which is the case if [map1_2d, map2_2d] == [1, 2, ..., ndims]). Otherwise the mapping of grid coordinates to processes depends on the ordering of the indices and is not equivalent to a MPI cartesian grid. More...
 
type(dbt_pgrid_type) function, public dbt_types::dbt_nd_mp_comm (comm_2d, map1_2d, map2_2d, dims_nd, dims1_nd, dims2_nd, pdims_2d, tdims, nsplit, dimsplit)
 Create a default nd process topology that is consistent with a given 2d topology. Purpose: a nd tensor defined on the returned process grid can be represented as a DBM matrix with the given 2d topology. This is needed to enable contraction of 2 tensors (must have the same 2d process grid). More...
 
subroutine, public dbt_types::dbt_nd_mp_free (mp_comm)
 Release the MPI communicator. More...
 
subroutine, public dbt_types::mp_environ_pgrid (pgrid, dims, task_coor)
 as mp_environ but for special pgrid type More...
 
subroutine, public dbt_types::dbt_distribution_new_expert (dist, pgrid, map1_2d, map2_2d, nd_dist_1, nd_dist_2, nd_dist_3, nd_dist_4, own_comm)
 Create a tensor distribution. More...
 
subroutine, public dbt_types::dbt_distribution_new (dist, pgrid, nd_dist_1, nd_dist_2, nd_dist_3, nd_dist_4)
 Create a tensor distribution. More...
 
subroutine, public dbt_types::dbt_pgrid_destroy (pgrid, keep_comm)
 destroy process grid More...
 
subroutine, public dbt_types::dbt_distribution_destroy (dist)
 Destroy tensor distribution. More...
 
type(dbt_distribution_type) function, public dbt_types::dbt_distribution (tensor)
 get distribution from tensor More...
 
subroutine, public dbt_types::dbt_hold (tensor)
 reference counting for tensors (only needed for communicator handle that must be freed when no longer needed) More...
 
pure integer(int_8) function, public dbt_types::ndims_matrix_row (tensor)
 how many tensor dimensions are mapped to matrix row More...
 
pure integer(int_8) function, public dbt_types::ndims_matrix_column (tensor)
 how many tensor dimensions are mapped to matrix column More...
 
pure integer function, public dbt_types::ndims_tensor (tensor)
 tensor rank More...
 
subroutine, public dbt_types::dims_tensor (tensor, dims)
 tensor dimensions More...
 
subroutine, public dbt_types::dbt_destroy (tensor)
 Destroy a tensor. More...
 
subroutine, public dbt_types::blk_dims_tensor (tensor, dims)
 tensor block dimensions More...
 
subroutine, public dbt_types::dbt_blk_sizes (tensor, ind, blk_size)
 Size of tensor block. More...
 
subroutine, public dbt_types::dbt_blk_offsets (tensor, ind, blk_offset)
 offset of tensor block More...
 
subroutine, public dbt_types::dbt_get_stored_coordinates (tensor, ind_nd, processor)
 Generalization of block_get_stored_coordinates for tensors. More...
 
subroutine, public dbt_types::dbt_pgrid_create (mp_comm, dims, pgrid, tensor_dims)
 
subroutine, public dbt_types::dbt_pgrid_set_strict_split (pgrid)
 freeze current split factor such that it is never changed during contraction More...
 
subroutine, public dbt_types::dbt_pgrid_change_dims (pgrid, pdims)
 change dimensions of an existing process grid. More...
 
subroutine, public dbt_types::dbt_filter (tensor, eps)
 As block_filter. More...
 
pure integer function, public dbt_types::dbt_nblks_local (tensor, idim)
 local number of blocks along dimension idim More...
 
pure integer function, public dbt_types::dbt_nblks_total (tensor, idim)
 total numbers of blocks along dimension idim More...
 
subroutine, public dbt_types::dbt_get_info (tensor, nblks_total, nfull_total, nblks_local, nfull_local, pdims, my_ploc, blks_local_1, blks_local_2, blks_local_3, blks_local_4, proc_dist_1, proc_dist_2, proc_dist_3, proc_dist_4, blk_size_1, blk_size_2, blk_size_3, blk_size_4, blk_offset_1, blk_offset_2, blk_offset_3, blk_offset_4, distribution, name)
 As block_get_info but for tensors. More...
 
pure integer function, public dbt_types::dbt_get_num_blocks (tensor)
 As block_get_num_blocks: get number of local blocks. More...
 
integer(kind=int_8) function, public dbt_types::dbt_get_num_blocks_total (tensor)
 Get total number of blocks. More...
 
subroutine, public dbt_types::dbt_clear (tensor)
 Clear tensor (s.t. it does not contain any blocks) More...
 
subroutine, public dbt_types::dbt_finalize (tensor)
 Finalize tensor, as block_finalize. This should be taken care of internally in DBT tensors, there should not be any need to call this routine outside of DBT tensors. More...
 
subroutine, public dbt_types::dbt_scale (tensor, alpha)
 as block_scale More...
 
pure integer function, public dbt_types::dbt_get_nze (tensor)
 
integer(kind=int_8) function, public dbt_types::dbt_get_nze_total (tensor)
 
pure integer function, public dbt_types::dbt_blk_size (tensor, ind, idim)
 block size of block with index ind along dimension idim More...
 
pure integer function, public dbt_types::dbt_max_nblks_local (tensor)
 returns an estimate of maximum number of local blocks in tensor (irrespective of the actual number of currently present blocks) this estimate is based on the following assumption: tensor data is dense and load balancing is within a factor of 2 More...
 
subroutine, public dbt_types::dbt_default_distvec (nblk, nproc, blk_size, dist)
 get a load-balanced and randomized distribution along one tensor dimension More...
 
subroutine, public dbt_types::dbt_copy_contraction_storage (tensor_in, tensor_out)