Developer Reference for Intel® oneAPI Math Kernel Library for Fortran

ID 766686
Date 12/16/2022
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

p?unmr3

Applies an orthogonal distributed matrix to a general m-by-n distributed matrix.

Syntax

call pcunmr3 (side, trans, m, n, k, l, a, ia, ja, desca, tau, c, ic, jc, descc, work, lwork, info )

call pzunmr3 (side, trans, m, n, k, l, a, ia, ja, desca, tau, c, ic, jc, descc, work, lwork, info )

Description

p?unmr3 overwrites the general complex m-by-n distributed matrix sub( C ) = C(ic:ic+m-1,jc:jc+n-1) with

                      side = 'L'             side = 'R'

trans = 'N': Q * sub( C )         sub( C ) * Q

trans = 'C': QH * sub( C )       sub( C ) * QH

where Q is a complex unitary distributed matrix defined as the product of k elementary reflectors

Q = H(1)' H(2)' . . . H(k)'

as returned by p?tzrzf. Q is of order m if side = 'L' and of order n if side = 'R'.

Input Parameters
side

(global)

CHARACTER.

= 'L': apply Q or QH from the Left;

= 'R': apply Q or QH from the Right.

trans

(global)

CHARACTER.

= 'N': No transpose, apply Q;

= 'C': Conjugate transpose, apply QH.

m

(global)

INTEGER.

The number of rows to be operated on i.e the number of rows of the distributed submatrix sub( C ). m >= 0.

n

(global)

INTEGER.

The number of columns to be operated on i.e the number of columns of the distributed submatrix sub( C ). n >= 0.

k

(global)

INTEGER.

The number of elementary reflectors whose product defines the matrix Q.

If side = 'L', m >= k >= 0, if side = 'R', n >= k >= 0.

l

(global)

INTEGER.

The columns of the distributed submatrix sub( A ) containing the meaningful part of the Householder reflectors.

If side = 'L', m >= l >= 0, if side = 'R', n >= l >= 0.

a

(local)

COMPLEX for pcunmr3

DOUBLE COMPLEX for pzunmr3

Pointer into the local memory to an array of size (lld_a,LOCc(ja+m-1)) if side='L', and (lld_a,LOCc(ja+n-1)) if side='R', where lld_a >= MAX(1,LOCr(ia+k-1));

On entry, the i-th row must contain the vector which defines the elementary reflector H(i), ia <= i <= ia+k-1, as returned by p?tzrzf in the k rows of its distributed matrix argument A(ia:ia+k-1,ja:*).

A(ia:ia+k-1,ja:*) is modified by the routine but restored on exit.

ia

(global)

INTEGER.

The row index in the global array a indicating the first row of sub( A ).

ja

(global)

INTEGER.

The column index in the global array a indicating the first column of sub( A ).

desca

(global and local)

INTEGER.

Array of size dlen_.

The array descriptor for the distributed matrix A.

tau

(local)

COMPLEX for pcunmr3

DOUBLE COMPLEX for pzunmr3

Array, size LOCc(ia+k-1).

This array contains the scalar factors tau(i) of the elementary reflectors H(i) as returned by p?tzrzf. tau is tied to the distributed matrix A.

c

(local)

COMPLEX for pcunmr3

DOUBLE COMPLEX for pzunmr3

Pointer into the local memory to an array of size (lld_c,LOCc(jc+n-1)) .

On entry, the local pieces of the distributed matrix sub( C ).

ic

(global)

INTEGER.

The row index in the global array c indicating the first row of sub( C ).

jc

(global)

INTEGER.

The column index in the global array c indicating the first column of sub( C ).

descc

(global and local)

INTEGER.

Array of size dlen_.

The array descriptor for the distributed matrix C.

work

(local)

COMPLEX for pcunmr3

DOUBLE COMPLEX for pzunmr3

Array, size (lwork)

On exit, work(1) returns the minimal and optimal lwork.

lwork

(local or global)

INTEGER.

The size of the array work.

lwork is local input and must be at least

If side = 'L', lwork >= MpC0 + MAX( MAX( 1, NqC0 ), numroc( numroc( m+IROFFC,mb_a,0,0,NPROW ),mb_a,0,0,LCMP ) );

if side = 'R', lwork >= NqC0 + MAX( 1, MpC0 );

where LCMP = LCM / NPROW with LCM = ICLM( NPROW, NPCOL ),

IROFFC = MOD( ic-1, MB_C ), ICOFFC = MOD( jc-1, nb_c ),

ICROW = indxg2p( ic, MB_C, MYROW, rsrc_c, NPROW ),

ICCOL = indxg2p( jc, nb_c, MYCOL, csrc_c, NPCOL ),

MpC0 = numroc( m+IROFFC, MB_C, MYROW, ICROW, NPROW ),

NqC0 = numroc( n+ICOFFC, nb_c, MYCOL, ICCOL, NPCOL ),

ilcm, indxg2p, and numroc are ScaLAPACK tool functions;

MYROW, MYCOL, NPROW and NPCOL can be determined by calling the subroutine blacs_gridinfo.

If lwork = -1, then lwork is global input and a workspace query is assumed; the routine only calculates the minimum and optimal size for all work arrays. Each of these values is returned in the first entry of the corresponding work array, and no error message is issued by pxerbla.

Output Parameters

c

On exit, sub( C ) is overwritten by Q*sub( C ) or Q'*sub( C ) or sub( C )*Q' or sub( C )*Q.

work

(local)

COMPLEX for pcunmr3

DOUBLE COMPLEX for pzunmr3

Array, size (lwork)

On exit, work(1) returns the minimal and optimal lwork.

info

(local)

INTEGER.

= 0: successful exit

< 0: If the i-th argument is an array and the j-th entry had an illegal value, then info = -(i*100+j), if the i-th argument is a scalar and had an illegal value, then info = -i.

Application Notes

Alignment requirements

The distributed submatrices A(ia:*, ja:*) and C(ic:ic+m-1,jc:jc+n-1) must verify some alignment properties, namely the following expressions should be true:

If side = 'L', ( nb_a = MB_C and ICOFFA = IROFFC )

If side = 'R', ( nb_a = nb_c and ICOFFA = ICOFFC and IACOL = ICCOL )