DBCSR operations on distributions
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
character(len=*), | private, | parameter | :: | moduleN | = | 'dbcsr_dist_operations' | |
logical, | private, | parameter | :: | careful_mod | = | .FALSE. | |
logical, | private, | parameter | :: | debug_mod | = | .FALSE. |
Determines whether a transpose must be applied
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | row |
The absolute matrix row. The absolute matrix column. |
||
integer, | intent(in) | :: | column |
The absolute matrix row. The absolute matrix column. |
Determines the home process for a given logical matrix element.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | row |
logical row logical column |
||
integer, | intent(in) | :: | col |
logical row logical column |
||
integer, | intent(in), | DIMENSION(0:, 0:) | :: | pgrid |
process grid |
|
integer, | intent(in), | DIMENSION(:) | :: | row_dist |
row distribution column distribution |
|
integer, | intent(in), | DIMENSION(:) | :: | col_dist |
row distribution column distribution |
home process of the given element
Determines whether most blocks are stored transposed in normally.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in), | DIMENSION(:) | :: | blk_p |
Pointers to blocks |
Sets the correct source matrix, row, column and possible data transposition for a given matrix and matrix logical row and column.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(dbcsr_type), | intent(in) | :: | matrix |
DBCSR matrix |
||
integer, | intent(in) | :: | row |
input is logical row input is logical column |
||
integer, | intent(in) | :: | column |
input is logical row input is logical column |
||
integer, | intent(out), | optional | :: | processor |
returns the processor on which this block resides |
Canonical logic
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(dbcsr_type), | intent(in) | :: | matrix | |||
integer, | intent(inout) | :: | row | |||
integer, | intent(inout) | :: | column | |||
logical, | intent(inout) | :: | transpose | |||
integer, | intent(out), | optional | :: | processor |
Looks up a block's index given logical coordinates.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(dbcsr_type), | intent(in) | :: | matrix |
DBCSR matrix |
||
integer, | intent(in) | :: | row |
logical row logical column |
||
integer, | intent(in) | :: | column |
logical row logical column |
||
integer, | intent(out) | :: | stored_row |
row where block is actually stored column where block is actually stored |
||
integer, | intent(out) | :: | stored_column |
row where block is actually stored column where block is actually stored |
||
logical, | intent(out) | :: | transpose |
whether the data must be transposed whether the block was found |
||
logical, | intent(out) | :: | found |
whether the data must be transposed whether the block was found |
||
integer, | intent(out) | :: | block_number |
returns the block number of the row and column |
||
integer, | intent(out), | optional | :: | data_offset |
data offset for the block; 0 if nonexistent |
Returns the index to a queried block, given a real (stored) row and column
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(dbcsr_type), | intent(in) | :: | matrix |
bcsr matrix |
||
integer, | intent(in) | :: | row |
input is logical row, output is lookup row input is logical column, output is lookup column |
||
integer, | intent(in) | :: | column |
input is logical row, output is lookup row input is logical column, output is lookup column |
||
logical, | intent(out) | :: | found |
whether the block was found |
||
integer, | intent(out) | :: | block_number |
returns the block number of the row and column |
||
integer, | intent(inout), | optional, | DIMENSION(2) | :: | lb_row_col | |
integer, | intent(out), | optional | :: | data_offset |
data offset for the block; 0 if nonexistent |
|
logical, | intent(out), | optional | :: | transposed |
whether the block is stored transposed according to its position |
Transposes a distribution
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(dbcsr_distribution_obj), | intent(out) | :: | dist_tr |
transposed distribution |
||
type(dbcsr_distribution_obj), | intent(in) | :: | dist_normal |
current distribution |
Transposes a distribution but keeps the same mp_env
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(dbcsr_distribution_obj), | intent(out) | :: | dist_tr |
transposed distribution |
||
type(dbcsr_distribution_obj), | intent(in) | :: | dist_normal |
current distribution |
Makes new distribution with decimation and multiplicity
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(out), | DIMENSION(:) | :: | new_bins |
new real distribution new image distribution |
|
integer, | intent(out), | DIMENSION(:) | :: | images |
new real distribution new image distribution |
|
integer, | intent(in), | DIMENSION(:), CONTIGUOUS | :: | source_bins |
Basis for the new distribution and images |
|
integer, | intent(in) | :: | nbins |
number of bins in the new real distribution multiplicity number of images in the new distribution |
||
integer, | intent(in) | :: | multiplicity |
number of bins in the new real distribution multiplicity number of images in the new distribution |
||
integer, | intent(in) | :: | nimages |
number of bins in the new real distribution multiplicity number of images in the new distribution |
Calculates the intersections of blocks
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(out), | DIMENSION(4, numints) | :: | ints |
intersections of blocks |
|
integer, | intent(inout) | :: | numints |
maximum number of expected intersections |
||
integer, | intent(out), | DIMENSION(:, :) | :: | n_src_dsts |
offset and number intersections belonging to source blocks |
|
integer, | intent(in), | DIMENSION(:) | :: | src_sizes |
sizes of source blocks sizes of target blocks |
|
integer, | intent(in), | DIMENSION(:) | :: | dst_sizes |
sizes of source blocks sizes of target blocks |
Finds the block that has the given column. If the block having the queried column is found, the blk parameter is set to this block number and the found parameter is true. Otherwise found is false and the block number is invalid.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | find_col |
column to find first block number in row last block number in row |
||
integer, | intent(in) | :: | frst_blk |
column to find first block number in row last block number in row |
||
integer, | intent(in) | :: | last_blk |
column to find first block number in row last block number in row |
||
integer, | intent(in), | DIMENSION(:) | :: | col_i |
col indices block pointers |
|
integer, | intent(in), | DIMENSION(:) | :: | blk_p |
col indices block pointers |
|
integer, | intent(out) | :: | blk |
block number with searched-for column |
||
logical, | intent(out) | :: | found |
flag specified whether a block that has the correct column was found |
Finds the local virtual elements All elements are mapped at once. Therefore an entry in the resulting array can be used as a lookup index for any of the local element arrays. The distribution itself tells into which array to look.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(array_i1d_obj), | intent(inout), | DIMENSION(0:nbins - 1) | :: | local_elements |
local virtual elements |
|
integer, | intent(in), | DIMENSION(:) | :: | bin_distribution |
distribution of elements to bins |
|
integer, | intent(in) | :: | nbins |
number of bins |
Determines mapping from local to global rows
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(dbcsr_distribution_obj), | intent(inout) | :: | dist |
mapping for this distribution |
||
type(array_i1d_obj), | intent(out) | :: | local_rows |
local elements for specified row |
||
integer, | intent(in) | :: | local_prow |
find local elements for this local row |
Determines mapping from local to global columns
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(dbcsr_distribution_obj), | intent(inout) | :: | dist |
mapping for this distribution |
||
type(array_i1d_obj), | intent(out) | :: | local_cols |
local elements for specified column |
||
integer, | intent(in) | :: | local_pcol |
find local elements for this local column |
Creates a sane 1-D distribution
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(out), | DIMENSION(:), POINTER | :: | bin_dist |
Distribution of elements to bins |
|
integer, | intent(in) | :: | nelements |
Number of elements Number of bins |
||
integer, | intent(in) | :: | nbins |
Number of elements Number of bins |
||
integer, | intent(in), | optional, | DIMENSION(:) | :: | element_sizes |
sizes of elements |