(git:6344619)
Loading...
Searching...
No Matches
cp_fm_redistribution Module Reference

Redistribution of full matrices and distributed arrays. More...

Functions/Subroutines

subroutine, public cp_fm_permute (fm_out, fm_in, beta, nrow_secidx_in, ncol_secidx_in, nrow_secidx_out, ncol_secidx_out, reordering, row_offset, col_offset, first_index, last_index)
 Add a permuted or restricted four-index tensor stored as a full matrix.
subroutine, public cp_array_to_fm (mat2d, fm_struct, my_start_row, my_end_row, my_start_col, my_end_col, fm_mat, do_release_mat)
 Assemble a full matrix from distributed rectangular array tiles.
subroutine, public cp_fm_to_array (mat2d, my_start_row, my_end_row, my_start_col, my_end_col, fm_mat)
 Extract distributed rectangular array tiles from a full matrix.
subroutine, public cp_fm_to_replicated_array (fm_s, array_s, weight, add)
 ...
subroutine, public cp_array_columns_to_fm (matrix, array, para_env, first_col, last_col, nrows)
 Redistribute a column-distributed array into an existing full matrix.

Detailed Description

Redistribution of full matrices and distributed arrays.

Function/Subroutine Documentation

◆ cp_fm_permute()

subroutine, public cp_fm_redistribution::cp_fm_permute ( type(cp_fm_type), intent(inout) fm_out,
type(cp_fm_type), intent(in) fm_in,
real(kind=dp), intent(in) beta,
integer, intent(in) nrow_secidx_in,
integer, intent(in) ncol_secidx_in,
integer, intent(in) nrow_secidx_out,
integer, intent(in) ncol_secidx_out,
integer, dimension(4), intent(in) reordering,
integer, intent(in), optional row_offset,
integer, intent(in), optional col_offset,
integer, dimension(4), intent(in), optional first_index,
integer, dimension(4), intent(in), optional last_index )

Add a permuted or restricted four-index tensor stored as a full matrix.

Parameters
fm_outdestination; entries outside the mapped region remain unchanged
fm_insource; each matrix coordinate encodes two tensor indices
betafactor multiplying the source contribution
nrow_secidx_insize of the second tensor index in source rows
ncol_secidx_insize of the second tensor index in source columns
nrow_secidx_outstride of the first tensor index in destination rows
ncol_secidx_outstride of the first tensor index in destination columns
reorderingpermutation of the four source indices
row_offsetzero-based destination row offset
col_offsetzero-based destination column offset
first_indexfirst retained value of each source index (default: one)
last_indexlast retained value of each source index (default: full extent)
Note
The index map must be one-to-one and fit within the destination.

Definition at line 48 of file cp_fm_redistribution.F.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cp_array_to_fm()

subroutine, public cp_fm_redistribution::cp_array_to_fm ( real(kind=dp), dimension(:, :), intent(inout), allocatable mat2d,
type(cp_fm_struct_type), pointer fm_struct,
integer, intent(in) my_start_row,
integer, intent(in) my_end_row,
integer, intent(in) my_start_col,
integer, intent(in) my_end_col,
type(cp_fm_type), intent(out) fm_mat,
logical, intent(in), optional do_release_mat )

Assemble a full matrix from distributed rectangular array tiles.

Parameters
mat2Dlocal tile; tiles on the FM communicator must not overlap
fm_structstructure defining the destination layout and communicator
my_start_rowfirst global row of the tile
my_end_rowlast global row of the tile
my_start_colfirst global column of the tile
my_end_collast global column of the tile
fm_matdestination; entries outside the supplied tiles are zero
do_release_matwhether to deallocate the input tile (default: true)

Definition at line 151 of file cp_fm_redistribution.F.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cp_fm_to_array()

subroutine, public cp_fm_redistribution::cp_fm_to_array ( real(kind=dp), dimension(:, :), intent(out), allocatable mat2d,
integer, intent(in) my_start_row,
integer, intent(in) my_end_row,
integer, intent(in) my_start_col,
integer, intent(in) my_end_col,
type(cp_fm_type), intent(inout) fm_mat )

Extract distributed rectangular array tiles from a full matrix.

Parameters
mat2Doutput tile, allocated here
my_start_rowfirst global row requested by this rank
my_end_rowlast global row requested by this rank
my_start_colfirst global column requested by this rank
my_end_collast global column requested by this rank
fm_matsource, released on return

Definition at line 217 of file cp_fm_redistribution.F.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cp_fm_to_replicated_array()

subroutine, public cp_fm_redistribution::cp_fm_to_replicated_array ( type(cp_fm_type), dimension(:) fm_s,
real(kind=dp), dimension(:, :, :), allocatable array_s,
real(kind=dp), optional weight,
logical, optional add )

...

Parameters
fm_S...
array_S...
weight...
add...

Definition at line 281 of file cp_fm_redistribution.F.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cp_array_columns_to_fm()

subroutine, public cp_fm_redistribution::cp_array_columns_to_fm ( type(cp_fm_type), intent(in) matrix,
real(kind=dp), dimension(:, :), intent(in), allocatable array,
type(mp_para_env_type), intent(in) para_env,
integer, intent(in) first_col,
integer, intent(in) last_col,
integer, intent(in) nrows )

Redistribute a column-distributed array into an existing full matrix.

Parameters
matrixdestination; cleared before filling the received entries
arraylocal columns, with global rows and a one-based local column index
para_envcommunicator covering all source and destination ranks
first_colfirst global column held locally
last_collast global column held locally
nrowsnumber of source rows to copy

Definition at line 353 of file cp_fm_redistribution.F.

Here is the call graph for this function:
Here is the caller graph for this function: