Skip to content

P?TRTRS returns misleading info for non-square blocking factors #44

@Sideboard

Description

@Sideboard

While solving a linear least squares problem of a skinny matrix using PDGEQRF, PDORMQR, and PDTRTRS, the latter returned info = -904, which denotes that the 4th entry of the 9th argument had an illegal value.

Excerpts from pdtrtrs.f:

!        1     2      3     4  5     6  7   8   9      10 11  12  13     14
PDTRTRS( UPLO, TRANS, DIAG, N, NRHS, A, IA, JA, DESCA, B, IB, JB, DESCB, INFO )
      PARAMETER          ( BLOCK_CYCLIC_2D = 1, DLEN_ = 9, DTYPE_ = 1,
     $                     CTXT_ = 2, M_ = 3, N_ = 4, MB_ = 5, NB_ = 6,
     $                     RSRC_ = 7, CSRC_ = 8, LLD_ = 9 )
*  M_A    (global) DESCA( M_ )    The number of rows in the global
*                                 array A.
*  N_A    (global) DESCA( N_ )    The number of columns in the global
*                                 array A.
*  MB_A   (global) DESCA( MB_ )   The blocking factor used to distribute
*                                 the rows of the array.
*  NB_A   (global) DESCA( NB_ )   The blocking factor used to distribute
*                                 the columns of the array.

But the check for this error involves the 5th (MB_) and 6th (NB_) entry of the the 9th (DESCA) argument instead of the 4th (N_).

            ELSE IF( DESCA( MB_ ).NE.DESCA( NB_ ) ) THEN
               INFO = -904
  • Is this on purpose?
  • Why do the blocking factors for rows and columns have to be equal? Is this documented?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions