109 SUBROUTINE dgetf2( M, N, A, LDA, IPIV, INFO )
117 INTEGER info, lda, m, n
121 DOUBLE PRECISION a( lda, * )
127 DOUBLE PRECISION one, zero
128 parameter( one = 1.0d+0, zero = 0.0d+0 )
131 DOUBLE PRECISION sfmin
152 ELSE IF( n.LT.0 )
THEN
154 ELSE IF( lda.LT.max( 1, m ) )
THEN
158 CALL
xerbla(
'DGETF2', -info )
164 IF( m.EQ.0 .OR. n.EQ.0 )
171 DO 10 j = 1, min( m, n )
175 jp = j - 1 +
idamax( m-j+1, a( j, j ), 1 )
177 IF( a( jp, j ).NE.zero )
THEN
182 $ CALL
dswap( n, a( j, 1 ), lda, a( jp, 1 ), lda )
187 IF( abs(a( j, j )) .GE. sfmin )
THEN
188 CALL
dscal( m-j, one / a( j, j ), a( j+1, j ), 1 )
191 a( j+i, j ) = a( j+i, j ) / a( j, j )
196 ELSE IF( info.EQ.0 )
THEN
201 IF( j.LT.min( m, n ) )
THEN
205 CALL
dger( m-j, n-j, -one, a( j+1, j ), 1, a( j, j+1 ), lda,
206 $ a( j+1, j+1 ), lda )