Developer Reference

  • 2020.2
  • 07/15/2020
  • Public Content
Contents

p?trmr2d

Copies a submatrix from one trapezoidal matrix to another.

Syntax

call pstrmr2d
(
uplo
,
diag
,
m
,
n
,
a
,
ia
,
ja
,
desca
,
b
,
ib
,
jb
,
descb
,
ictxt
)
call pdtrmr2d
(
uplo
,
diag
,
m
,
n
,
a
,
ia
,
ja
,
desca
,
b
,
ib
,
jb
,
descb
,
ictxt
)
call pctrmr2d
(
uplo
,
diag
,
m
,
n
,
a
,
ia
,
ja
,
desca
,
b
,
ib
,
jb
,
descb
,
ictxt
)
call pztrmr2d
(
uplo
,
diag
,
m
,
n
,
a
,
ia
,
ja
,
desca
,
b
,
ib
,
jb
,
descb
,
ictxt
)
call pitrmr2d
(
uplo
,
diag
,
m
,
n
,
a
,
ia
,
ja
,
desca
,
b
,
ib
,
jb
,
descb
,
ictxt
)
Description
The
p?trmr2d
routine
copies the indicated matrix or submatrix of
A
to the indicated matrix or submatrix of
B
. It provides a truly general copy from any block cyclicly-distributed matrix or submatrix to any other block cyclicly-distributed matrix or submatrix. With
p?gemr2d
, these
routines
are the only ones in the ScaLAPACK library which provide inter-context operations: they can take a matrix or submatrix
A
in context
A
(distributed over process grid
A
) and copy it to a matrix or submatrix
B
in context
B
(distributed over process grid
B
).
The
p?trmr2d
routine
assumes the matrix or submatrix to be trapezoidal. Only the upper or lower part is copied, and the other part is unchanged.
There does not need to be a relationship between the two operand matrices or submatrices other than their global size and the fact that they are both legal block cyclicly-distributed matrices or submatrices. This means that they can, for example, be distributed across different process grids, have varying block sizes and differing matrix starting points, or be contained in different sized distributed matrices.
Take care when context
A
is disjoint from context
B
. The general rules for which parameters need to be set are:
  • All calling processes must have the correct
    m
    and
    n
    .
  • Processes in context
    A
    must correctly define all parameters describing
    A
    .
  • Processes in context
    B
    must correctly define all parameters describing
    B
    .
  • Processes which are not members of context
    A
    must pass
    ctxt_a
    = -1 and need not set other parameters describing
    A
    .
  • Processes which are not members of context
    B
    must pass
    ctxt_b
    = -1 and need not set other parameters describing
    B
    .
Because of its generality,
p?trmr2d
can be used for many operations not usually associated with copy
routines
. For instance, it can be used to a take a matrix on one process and distribute it across a process grid, or the reverse. If a supercomputer is grouped into a virtual parallel machine with a workstation, for instance, this
routine
can be used to move the matrix from the workstation to the supercomputer and back. In ScaLAPACK, it is called to copy matrices from a two-dimensional process grid to a one-dimensional process grid. It can be used to redistribute matrices so that distributions p