3D matrix-matrix multiplication. Modification history: - 2016-08 Code organization (Alfio Lazzaro). - 2017-02 Remove clusters (Alfio Lazzaro).
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
character(len=*), | private, | parameter | :: | moduleN | = | 'dbcsr_mm_3d' | |
logical, | private, | parameter | :: | debug_mod | = | .FALSE. | |
logical, | private, | parameter | :: | careful_mod | = | .FALSE. | |
type(dbcsr_buffers), | private, | TARGET, SAVE | :: | buffers_win | |||
type(dbcsr_buffers), | private, | TARGET, SAVE | :: | buffers_1 | |||
type(dbcsr_buffers), | private, | TARGET, SAVE | :: | buffers_2 | |||
integer, | private, | parameter | :: | idata | = | 1 | |
integer, | private, | parameter | :: | imeta | = | 2 | |
integer, | private, | parameter | :: | ilocal_proc | = | 1 | |
type(dbcsr_layers_3D_C_reduction), | private, | SAVE | :: | layers_3D_C_reduction | |||
logical, | private, | DIMENSION(2), TARGET, SAVE | :: | do_win_create_left | |||
logical, | private, | DIMENSION(2), TARGET, SAVE | :: | do_win_create_right | |||
integer, | private, | ALLOCATABLE, DIMENSION(:) | :: | left_total_row_counts | |||
integer, | private, | ALLOCATABLE, DIMENSION(:, :), TARGET | :: | left_local_images_size | |||
integer, | private, | ALLOCATABLE, DIMENSION(:, :), TARGET | :: | right_local_images_size | |||
integer, | private, | DIMENSION(:, :, :, :), POINTER, CONTIGUOUS | :: | left_images_size | => | Null() | |
integer, | private, | DIMENSION(:, :, :, :), POINTER, CONTIGUOUS | :: | right_images_size | => | Null() | |
integer, | private, | ALLOCATABLE, DIMENSION(:), TARGET | :: | g2l_map_cols | |||
integer, | private, | ALLOCATABLE, DIMENSION(:), TARGET | :: | g2l_map_rows | |||
type(mp_request_type), | private | :: | request_count_rows | ||||
type(mp_request_type), | private, | DIMENSION(2) | :: | requests | |||
type(mp_request_type), | private, | DIMENSION(2) | :: | requests_win_create | |||
type(mp_request_type), | public | :: | request_sync_mult | = | mp_request_null | ||
type(dbcsr_data_obj), | private, | TARGET, SAVE | :: | make_buffers_data_recv | |||
type(dbcsr_data_obj), | private, | TARGET, SAVE | :: | make_buffers_data_send | |||
integer, | private, | DIMENSION(:), POINTER, CONTIGUOUS | :: | make_buffers_meta_recv | => | Null() | |
integer, | private, | DIMENSION(:), POINTER, CONTIGUOUS | :: | make_buffers_meta_send | => | Null() |
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
type(dbcsr_data_obj), | public | :: | DATA | = | dbcsr_data_obj() | ||
type(dbcsr_data_obj), | public | :: | data_before_resize | = | dbcsr_data_obj() | ||
type(dbcsr_data_obj), | public | :: | trs_stackbuf | = | dbcsr_data_obj() | ||
integer, | public | :: | vprow | = | -1 | ||
integer, | public | :: | vpcol | = | -1 | ||
integer, | public | :: | myproc | = | -1 | ||
type(mp_comm_type), | public | :: | grp | = | mp_comm_null | ||
type(mp_comm_type), | public | :: | subgrp | = | mp_comm_null | ||
type(mp_win_type), | public | :: | data_win | = | mp_win_type() | ||
type(mp_win_type), | public | :: | meta_win | = | mp_win_type() | ||
integer, | public, | DIMENSION(:), POINTER, CONTIGUOUS | :: | meta | => | Null() | |
integer, | public, | DIMENSION(:), POINTER, CONTIGUOUS | :: | meta_before_resize | => | Null() | |
integer, | public, | DIMENSION(:), POINTER, CONTIGUOUS | :: | meta_red3D | => | Null() | |
type(mp_request_type), | public, | DIMENSION(2) | :: | get_requests | = | mp_request_null | |
integer, | public | :: | meta_size | = | -1 | ||
integer, | public | :: | num_layers_3D | = | 1 | ||
integer, | public | :: | coord3D | = | 1 | ||
type(dbcsr_type), | public | :: | matrix | = | dbcsr_type() | ||
logical, | public | :: | is_valid | = | .FALSE. | ||
logical, | public | :: | is_comm | = | .FALSE. | ||
logical, | public | :: | has_rma_win | = | .FALSE. |
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
type(dbcsr_buffer), | public | :: | left | = | dbcsr_buffer() | ||
type(dbcsr_buffer), | public | :: | right | = | dbcsr_buffer() |
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer, | public, | DIMENSION(:), POINTER, CONTIGUOUS | :: | sizes | => | Null() |
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
type(mp_comm_type), | public | :: | grp | = | mp_comm_null | ||
type(mp_comm_type), | public | :: | grp3D | = | mp_comm_null | ||
type(mp_comm_type), | public | :: | rowgrp3D | = | mp_comm_null | ||
integer, | public | :: | num_layers_3D | = | 1 | ||
integer, | public | :: | max_num_layers_3D | = | 1 | ||
integer, | public | :: | side3D | = | HUGE(1) | ||
type(dbcsr_data_obj), | public, | DIMENSION(:), ALLOCATABLE | :: | data_red3D | |||
integer, | public | :: | data_type | = | -1 |
Return the rank of the 3D layer (3D communicator for C), Column-major order
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | myprow | |||
integer, | intent(in) | :: | mypcol | |||
integer, | intent(in) | :: | nprows | |||
integer, | intent(in) | :: | side3D |
Prepare orig images for MPI windows
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(dbcsr_type), | intent(in) | :: | matrix | |||
type(dbcsr_imagedistribution_obj), | intent(in) | :: | imgdist | |||
logical, | intent(in) | :: | is_left | |||
integer, | intent(in) | :: | f_row | |||
integer, | intent(in) | :: | l_row | |||
integer, | intent(in) | :: | f_col | |||
integer, | intent(in) | :: | l_col | |||
logical, | intent(in) | :: | otf_filtering | |||
type(dbcsr_scalar_type), | intent(in), | optional | :: | alpha |
Prepare orig images for MPI windows
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(dbcsr_type), | intent(in) | :: | matrix | |||
type(dbcsr_imagedistribution_obj), | intent(in) | :: | imgdist | |||
logical, | intent(in) | :: | is_left | |||
integer, | intent(in) | :: | f_row | |||
integer, | intent(in) | :: | l_row | |||
integer, | intent(in) | :: | f_col | |||
integer, | intent(in) | :: | l_col | |||
logical, | intent(in) | :: | otf_filtering | |||
type(dbcsr_scalar_type), | intent(in), | optional | :: | scale_value |
Make communicators for A and B matrices
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | my_num_layers_3D | |||
integer, | intent(in) | :: | side3D | |||
type(dbcsr_mp_obj), | intent(in) | :: | mp_obj | |||
logical, | intent(in) | :: | is_left | |||
type(dbcsr_buffer), | intent(inout) | :: | buffer |
Make communicators for 3D layers for C-reduction
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | my_num_layers_3D | |||
type(dbcsr_mp_obj), | intent(inout) | :: | mp_obj |
Release communicators for 3D layers for C-reduction
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
logical, | optional | :: | release_buffers |
Multiplies two DBCSR matrices (experimental MPI algorithm). This algorithm is experimental and it should be not used in production runs.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(dbcsr_imagedistribution_obj), | intent(inout) | :: | imgdist_left | |||
type(dbcsr_imagedistribution_obj), | intent(inout) | :: | imgdist_right | |||
type(dbcsr_type), | intent(in) | :: | matrix_left | |||
type(dbcsr_type), | intent(in) | :: | matrix_right | |||
type(dbcsr_type), | intent(inout), | TARGET | :: | product_matrix |
DBCSR product matrix |
|
logical, | intent(in), | optional | :: | retain_sparsity |
retain the sparsity of the existing product matrix; default is no |
|
real(kind=real_8), | intent(in), | optional | :: | filter_eps | ||
integer(kind=int_8), | intent(out) | :: | flop |
effective flop |
||
logical, | intent(in) | :: | keep_product_data |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(dbcsr_buffer), | intent(inout) | :: | buffer | |||
logical, | intent(inout), | DIMENSION(:) | :: | do_win_create | ||
type(mp_request_type), | intent(inout) | :: | request |
Apply reflected order, i.e. row increasing value for odd col value, row decreasing value for even col value
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(inout) | :: | irow3D | |||
integer, | intent(inout) | :: | icol3D | |||
integer, | intent(in) | :: | nrows3D | |||
integer, | intent(in) | :: | ncols3D | |||
integer, | intent(in) | :: | shift3D |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(dbcsr_buffer), | intent(inout), | TARGET | :: | buffer_1 | ||
type(dbcsr_buffer), | intent(inout), | TARGET | :: | buffer_2 | ||
type(dbcsr_buffer), | intent(inout), | ALLOCATABLE, DIMENSION(:) | :: | buffers | ||
integer, | intent(in) | :: | nbuffers | |||
integer, | intent(in) | :: | data_size | |||
integer, | intent(in) | :: | meta_size | |||
type(dbcsr_type), | intent(in) | :: | matrix | |||
type(dbcsr_imagedistribution_obj), | intent(inout) | :: | imgdist |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(dbcsr_type), | intent(inout) | :: | matrix | |||
type(dbcsr_imagedistribution_obj), | intent(inout) | :: | imgdist | |||
type(dbcsr_type), | intent(in) | :: | template_matrix | |||
type(dbcsr_data_obj), | intent(inout) | :: | data_buffer | |||
integer, | intent(in), | DIMENSION(:), TARGET, CONTIGUOUS | :: | meta_buffer |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(dbcsr_buffer), | intent(inout) | :: | buffers_1 | |||
type(dbcsr_buffer), | intent(inout) | :: | buffers_2 |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | recv_vproc | |||
integer, | intent(in) | :: | nimages | |||
integer, | intent(in), | DIMENSION(:) | :: | size_layers3D | ||
integer, | intent(in), | DIMENSION(:) | :: | displ_layers3D | ||
type(dbcsr_buffer), | intent(inout) | :: | buffer | |||
type(mp_win_type), | intent(in) | :: | meta_win | |||
type(mp_win_type), | intent(in) | :: | data_win | |||
type(dbcsr_data_obj), | intent(inout) | :: | data_get | |||
integer, | intent(in) | :: | data_type_byte | |||
type(dbcsr_buffer), | intent(in) | :: | buffer_win | |||
integer, | intent(in) | :: | layer3D | |||
integer, | intent(in) | :: | nlayers3D |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(inout), | DIMENSION(:) | :: | meta_buffer | ||
integer, | intent(in), | DIMENSION(:) | :: | img_nblks_rows | ||
integer, | intent(in), | DIMENSION(:) | :: | img_nblks_cols | ||
integer, | intent(in), | DIMENSION(:) | :: | refs_size | ||
integer, | intent(in), | DIMENSION(:) | :: | refs_displ | ||
integer, | intent(in) | :: | size_index | |||
logical, | intent(in) | :: | has_threads |
Init buffer
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(dbcsr_buffer), | intent(inout) | :: | buffer | |||
integer, | intent(in) | :: | data_type | |||
integer, | intent(in) | :: | data_size | |||
integer, | intent(in) | :: | meta_size | |||
integer, | intent(in), | optional | :: | num_data | ||
type(dbcsr_memtype_type), | intent(in) | :: | data_memory_type | |||
type(dbcsr_memtype_type), | intent(in), | optional | :: | trs_memory_type |
Release all buffers
Release buffer
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(dbcsr_buffer), | intent(inout) | :: | buffer |
Create meta indices
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(dbcsr_buffer), | intent(inout) | :: | buffer | |||
integer, | intent(in) | :: | ntotal_images | |||
integer, | intent(in) | :: | vprow | |||
integer, | intent(in) | :: | vpcol | |||
type(dbcsr_imagedistribution_obj), | intent(inout) | :: | imgdist | |||
logical, | intent(in) | :: | do_merge_rows | |||
integer, | intent(in), | DIMENSION(:) | :: | global_indices | ||
integer, | intent(in), | optional | :: | nthreads |
Remap the 4-rank array in a 3-rank array by introducing the virtual coordinate
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in), | DIMENSION(:, :, :, :), CONTIGUOUS, POINTER | :: | refs_size | ||
integer, | intent(out), | DIMENSION(:, :, :), CONTIGUOUS, POINTER | :: | refs_size_layers3D | ||
integer, | intent(out), | DIMENSION(:, :, :), CONTIGUOUS, POINTER | :: | refs_displ_layers3D | ||
integer, | intent(out) | :: | data_size | |||
integer, | intent(out) | :: | meta_size |