Skip to content

Commit

Permalink
Merge pull request #166 from iyamazaki/master
Browse files Browse the repository at this point in the history
fixing the definition of "info" in Aasen's
  • Loading branch information
langou authored Jun 12, 2017
2 parents 5c39268 + fd5cae5 commit a26a82f
Show file tree
Hide file tree
Showing 18 changed files with 283 additions and 564 deletions.
24 changes: 5 additions & 19 deletions SRC/chetrf_aa.f
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,7 @@
*> \verbatim
*> INFO is INTEGER
*> = 0: successful exit
*> < 0: if INFO = -i, the i-th argument had an illegal value
*> > 0: if INFO = i, D(i,i) is exactly zero. The factorization
*> has been completed, but the block diagonal matrix D is
*> exactly singular, and division by zero will occur if it
*> is used to solve a system of equations.
*> < 0: if INFO = -i, the i-th argument had an illegal value.
*> \endverbatim
*
* Authors:
Expand Down Expand Up @@ -159,7 +155,7 @@ SUBROUTINE CHETRF_AA( UPLO, N, A, LDA, IPIV, WORK, LWORK, INFO)
*
* .. Local Scalars ..
LOGICAL LQUERY, UPPER
INTEGER J, LWKOPT, IINFO
INTEGER J, LWKOPT
INTEGER NB, MJ, NJ, K1, K2, J1, J2, J3, JB
COMPLEX ALPHA
* ..
Expand Down Expand Up @@ -215,13 +211,10 @@ SUBROUTINE CHETRF_AA( UPLO, N, A, LDA, IPIV, WORK, LWORK, INFO)
IPIV( 1 ) = 1
IF ( N.EQ.1 ) THEN
A( 1, 1 ) = REAL( A( 1, 1 ) )
IF ( A( 1, 1 ).EQ.ZERO ) THEN
INFO = 1
END IF
RETURN
END IF
*
* Adjubst block size based on the workspace size
* Adjust block size based on the workspace size
*
IF( LWORK.LT.((1+NB)*N) ) THEN
NB = ( LWORK-N ) / N
Expand Down Expand Up @@ -261,11 +254,7 @@ SUBROUTINE CHETRF_AA( UPLO, N, A, LDA, IPIV, WORK, LWORK, INFO)
*
CALL CLAHEF_AA( UPLO, 2-K1, N-J, JB,
$ A( MAX(1, J), J+1 ), LDA,
$ IPIV( J+1 ), WORK, N, WORK( N*NB+1 ),
$ IINFO )
IF( (IINFO.GT.0) .AND. (INFO.EQ.0) ) THEN
INFO = IINFO+J
ENDIF
$ IPIV( J+1 ), WORK, N, WORK( N*NB+1 ) )
*
* Ajust IPIV and apply it back (J-th step picks (J+1)-th pivot)
*
Expand Down Expand Up @@ -385,10 +374,7 @@ SUBROUTINE CHETRF_AA( UPLO, N, A, LDA, IPIV, WORK, LWORK, INFO)
*
CALL CLAHEF_AA( UPLO, 2-K1, N-J, JB,
$ A( J+1, MAX(1, J) ), LDA,
$ IPIV( J+1 ), WORK, N, WORK( N*NB+1 ), IINFO)
IF( (IINFO.GT.0) .AND. (INFO.EQ.0) ) THEN
INFO = IINFO+J
ENDIF
$ IPIV( J+1 ), WORK, N, WORK( N*NB+1 ) )
*
* Ajust IPIV and apply it back (J-th step picks (J+1)-th pivot)
*
Expand Down
44 changes: 4 additions & 40 deletions SRC/clahef_aa.f
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
* ===========
*
* SUBROUTINE CLAHEF_AA( UPLO, J1, M, NB, A, LDA, IPIV,
* H, LDH, WORK, INFO )
* H, LDH, WORK )
*
* .. Scalar Arguments ..
* CHARACTER UPLO
* INTEGER J1, M, NB, LDA, LDH, INFO
* INTEGER J1, M, NB, LDA, LDH
* ..
* .. Array Arguments ..
* INTEGER IPIV( * )
Expand Down Expand Up @@ -127,16 +127,6 @@
*> WORK is COMPLEX workspace, dimension (M).
*> \endverbatim
*>
*> \param[out] INFO
*> \verbatim
*> INFO is INTEGER
*> = 0: successful exit
*> < 0: if INFO = -i, the i-th argument had an illegal value
*> > 0: if INFO = i, D(i,i) is exactly zero. The factorization
*> has been completed, but the block diagonal matrix D is
*> exactly singular, and division by zero will occur if it
*> is used to solve a system of equations.
*> \endverbatim
*
* Authors:
* ========
Expand All @@ -152,7 +142,7 @@
*
* =====================================================================
SUBROUTINE CLAHEF_AA( UPLO, J1, M, NB, A, LDA, IPIV,
$ H, LDH, WORK, INFO )
$ H, LDH, WORK )
*
* -- LAPACK computational routine (version 3.7.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
Expand All @@ -163,7 +153,7 @@ SUBROUTINE CLAHEF_AA( UPLO, J1, M, NB, A, LDA, IPIV,
*
* .. Scalar Arguments ..
CHARACTER UPLO
INTEGER M, NB, J1, LDA, LDH, INFO
INTEGER M, NB, J1, LDA, LDH
* ..
* .. Array Arguments ..
INTEGER IPIV( * )
Expand Down Expand Up @@ -192,7 +182,6 @@ SUBROUTINE CLAHEF_AA( UPLO, J1, M, NB, A, LDA, IPIV,
* ..
* .. Executable Statements ..
*
INFO = 0
J = 1
*
* K1 is the first column of the panel to be factorized
Expand Down Expand Up @@ -319,12 +308,6 @@ SUBROUTINE CLAHEF_AA( UPLO, J1, M, NB, A, LDA, IPIV,
* Set A(J, J+1) = T(J, J+1)
*
A( K, J+1 ) = WORK( 2 )
IF( (A( K, J ).EQ.ZERO ) .AND. (A( K, J+1 ).EQ.ZERO) .AND.
$ ((K.EQ.1) .OR. (A( K-1, J ).EQ.ZERO)) ) THEN
IF(INFO .EQ. 0) THEN
INFO = J
END IF
END IF
*
IF( J.LT.NB ) THEN
*
Expand All @@ -345,13 +328,6 @@ SUBROUTINE CLAHEF_AA( UPLO, J1, M, NB, A, LDA, IPIV,
CALL CLASET( 'Full', 1, M-J-1, ZERO, ZERO,
$ A( K, J+2 ), LDA)
END IF
ELSE
IF( (A( K, J ).EQ.ZERO) .AND.
$ ((K.EQ.1) .OR. (A( J-1, J ).EQ.ZERO)) ) THEN
IF (INFO.EQ.0) THEN
INFO = J
END IF
END IF
END IF
J = J + 1
GO TO 10
Expand Down Expand Up @@ -476,11 +452,6 @@ SUBROUTINE CLAHEF_AA( UPLO, J1, M, NB, A, LDA, IPIV,
* Set A(J+1, J) = T(J+1, J)
*
A( J+1, K ) = WORK( 2 )
IF( (A( J, K ).EQ.ZERO) .AND. (A( J+1, K ).EQ.ZERO) .AND.
$ ((K.EQ.1) .OR. (A( J, K-1 ).EQ.ZERO)) ) THEN
IF (INFO .EQ. 0)
$ INFO = J
END IF
*
IF( J.LT.NB ) THEN
*
Expand All @@ -501,13 +472,6 @@ SUBROUTINE CLAHEF_AA( UPLO, J1, M, NB, A, LDA, IPIV,
CALL CLASET( 'Full', M-J-1, 1, ZERO, ZERO,
$ A( J+2, K ), LDA )
END IF
ELSE
IF( (A( J, K ).EQ.ZERO) .AND.
$ ((K.EQ.1) .OR. (A( J, K-1 ).EQ.ZERO)) ) THEN
IF (INFO.EQ.0) THEN
INFO = J
END IF
END IF
END IF
J = J + 1
GO TO 30
Expand Down
44 changes: 4 additions & 40 deletions SRC/clasyf_aa.f
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
* ===========
*
* SUBROUTINE CLASYF_AA( UPLO, J1, M, NB, A, LDA, IPIV,
* H, LDH, WORK, INFO )
* H, LDH, WORK )
*
* .. Scalar Arguments ..
* CHARACTER UPLO
* INTEGER J1, M, NB, LDA, LDH, INFO
* INTEGER J1, M, NB, LDA, LDH
* ..
* .. Array Arguments ..
* INTEGER IPIV( * )
Expand Down Expand Up @@ -127,16 +127,6 @@
*> WORK is REAL workspace, dimension (M).
*> \endverbatim
*>
*> \param[out] INFO
*> \verbatim
*> INFO is INTEGER
*> = 0: successful exit
*> < 0: if INFO = -i, the i-th argument had an illegal value
*> > 0: if INFO = i, D(i,i) is exactly zero. The factorization
*> has been completed, but the block diagonal matrix D is
*> exactly singular, and division by zero will occur if it
*> is used to solve a system of equations.
*> \endverbatim
*
* Authors:
* ========
Expand All @@ -152,7 +142,7 @@
*
* =====================================================================
SUBROUTINE CLASYF_AA( UPLO, J1, M, NB, A, LDA, IPIV,
$ H, LDH, WORK, INFO )
$ H, LDH, WORK )
*
* -- LAPACK computational routine (version 3.7.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
Expand All @@ -163,7 +153,7 @@ SUBROUTINE CLASYF_AA( UPLO, J1, M, NB, A, LDA, IPIV,
*
* .. Scalar Arguments ..
CHARACTER UPLO
INTEGER M, NB, J1, LDA, LDH, INFO
INTEGER M, NB, J1, LDA, LDH
* ..
* .. Array Arguments ..
INTEGER IPIV( * )
Expand Down Expand Up @@ -192,7 +182,6 @@ SUBROUTINE CLASYF_AA( UPLO, J1, M, NB, A, LDA, IPIV,
* ..
* .. Executable Statements ..
*
INFO = 0
J = 1
*
* K1 is the first column of the panel to be factorized
Expand Down Expand Up @@ -315,12 +304,6 @@ SUBROUTINE CLASYF_AA( UPLO, J1, M, NB, A, LDA, IPIV,
* Set A(J, J+1) = T(J, J+1)
*
A( K, J+1 ) = WORK( 2 )
IF( (A( K, J ).EQ.ZERO ) .AND. (A( K, J+1 ).EQ.ZERO) .AND.
$ ((K.EQ.1) .OR. (A( K-1, J ).EQ.ZERO)) ) THEN
IF(INFO .EQ. 0) THEN
INFO = J
ENDIF
END IF
*
IF( J.LT.NB ) THEN
*
Expand All @@ -341,13 +324,6 @@ SUBROUTINE CLASYF_AA( UPLO, J1, M, NB, A, LDA, IPIV,
CALL CLASET( 'Full', 1, M-J-1, ZERO, ZERO,
$ A( K, J+2 ), LDA)
END IF
ELSE
IF( (A( K, J ).EQ.ZERO) .AND.
$ ((K.EQ.1) .OR. (A( J-1, J ).EQ.ZERO)) ) THEN
IF (INFO.EQ.0) THEN
INFO = J
END IF
END IF
END IF
J = J + 1
GO TO 10
Expand Down Expand Up @@ -468,11 +444,6 @@ SUBROUTINE CLASYF_AA( UPLO, J1, M, NB, A, LDA, IPIV,
* Set A(J+1, J) = T(J+1, J)
*
A( J+1, K ) = WORK( 2 )
IF( (A( J, K ).EQ.ZERO) .AND. (A( J+1, K ).EQ.ZERO) .AND.
$ ((K.EQ.1) .OR. (A( J, K-1 ).EQ.ZERO)) ) THEN
IF (INFO .EQ. 0)
$ INFO = J
END IF
*
IF( J.LT.NB ) THEN
*
Expand All @@ -493,13 +464,6 @@ SUBROUTINE CLASYF_AA( UPLO, J1, M, NB, A, LDA, IPIV,
CALL CLASET( 'Full', M-J-1, 1, ZERO, ZERO,
$ A( J+2, K ), LDA )
END IF
ELSE
IF( (A( J, K ).EQ.ZERO) .AND.
$ ((K.EQ.1) .OR. (A( J, K-1 ).EQ.ZERO)) ) THEN
IF (INFO.EQ.0) THEN
INFO = J
END IF
END IF
END IF
J = J + 1
GO TO 30
Expand Down
24 changes: 5 additions & 19 deletions SRC/csytrf_aa.f
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,7 @@
*> \verbatim
*> INFO is INTEGER
*> = 0: successful exit
*> < 0: if INFO = -i, the i-th argument had an illegal value
*> > 0: if INFO = i, D(i,i) is exactly zero. The factorization
*> has been completed, but the block diagonal matrix D is
*> exactly singular, and division by zero will occur if it
*> is used to solve a system of equations.
*> < 0: if INFO = -i, the i-th argument had an illegal value.
*> \endverbatim
*
* Authors:
Expand Down Expand Up @@ -159,7 +155,7 @@ SUBROUTINE CSYTRF_AA( UPLO, N, A, LDA, IPIV, WORK, LWORK, INFO)
*
* .. Local Scalars ..
LOGICAL LQUERY, UPPER
INTEGER J, LWKOPT, IINFO
INTEGER J, LWKOPT
INTEGER NB, MJ, NJ, K1, K2, J1, J2, J3, JB
COMPLEX ALPHA
* ..
Expand Down Expand Up @@ -214,13 +210,10 @@ SUBROUTINE CSYTRF_AA( UPLO, N, A, LDA, IPIV, WORK, LWORK, INFO)
ENDIF
IPIV( 1 ) = 1
IF ( N.EQ.1 ) THEN
IF ( A( 1, 1 ).EQ.ZERO ) THEN
INFO = 1
END IF
RETURN
END IF
*
* Adjubst block size based on the workspace size
* Adjust block size based on the workspace size
*
IF( LWORK.LT.((1+NB)*N) ) THEN
NB = ( LWORK-N ) / N
Expand Down Expand Up @@ -260,11 +253,7 @@ SUBROUTINE CSYTRF_AA( UPLO, N, A, LDA, IPIV, WORK, LWORK, INFO)
*
CALL CLASYF_AA( UPLO, 2-K1, N-J, JB,
$ A( MAX(1, J), J+1 ), LDA,
$ IPIV( J+1 ), WORK, N, WORK( N*NB+1 ),
$ IINFO )
IF( (IINFO.GT.0) .AND. (INFO.EQ.0) ) THEN
INFO = IINFO+J
ENDIF
$ IPIV( J+1 ), WORK, N, WORK( N*NB+1 ) )
*
* Ajust IPIV and apply it back (J-th step picks (J+1)-th pivot)
*
Expand Down Expand Up @@ -383,10 +372,7 @@ SUBROUTINE CSYTRF_AA( UPLO, N, A, LDA, IPIV, WORK, LWORK, INFO)
*
CALL CLASYF_AA( UPLO, 2-K1, N-J, JB,
$ A( J+1, MAX(1, J) ), LDA,
$ IPIV( J+1 ), WORK, N, WORK( N*NB+1 ), IINFO)
IF( (IINFO.GT.0) .AND. (INFO.EQ.0) ) THEN
INFO = IINFO+J
ENDIF
$ IPIV( J+1 ), WORK, N, WORK( N*NB+1 ) )
*
* Ajust IPIV and apply it back (J-th step picks (J+1)-th pivot)
*
Expand Down
Loading

0 comments on commit a26a82f

Please sign in to comment.