~ubuntu-branches/ubuntu/trusty/nwchem/trusty-proposed

« back to all changes in this revision

Viewing changes to src/lapack/double/dgelqf.f

  • Committer: Package Import Robot
  • Author(s): Michael Banck, Daniel Leidert, Andreas Tille, Michael Banck
  • Date: 2013-07-04 12:14:55 UTC
  • mfrom: (1.1.2)
  • Revision ID: package-import@ubuntu.com-20130704121455-5tvsx2qabor3nrui
Tags: 6.3-1
* New upstream release.
* Fixes anisotropic properties (Closes: #696361).
* New features include:
  + Multi-reference coupled cluster (MRCC) approaches
  + Hybrid DFT calculations with short-range HF 
  + New density-functionals including Minnesota (M08, M11) and HSE hybrid
    functionals
  + X-ray absorption spectroscopy (XAS) with TDDFT
  + Analytical gradients for the COSMO solvation model
  + Transition densities from TDDFT 
  + DFT+U and Electron-Transfer (ET) methods for plane wave calculations
  + Exploitation of space group symmetry in plane wave geometry optimizations
  + Local density of states (LDOS) collective variable added to Metadynamics
  + Various new XC functionals added for plane wave calculations, including
    hybrid and range-corrected ones
  + Electric field gradients with relativistic corrections 
  + Nudged Elastic Band optimization method
  + Updated basis sets and ECPs 

[ Daniel Leidert ]
* debian/watch: Fixed.

[ Andreas Tille ]
* debian/upstream: References

[ Michael Banck ]
* debian/upstream (Name): New field.
* debian/patches/02_makefile_flags.patch: Refreshed.
* debian/patches/06_statfs_kfreebsd.patch: Likewise.
* debian/patches/07_ga_target_force_linux.patch: Likewise.
* debian/patches/05_avoid_inline_assembler.patch: Removed, no longer needed.
* debian/patches/09_backported_6.1.1_fixes.patch: Likewise.
* debian/control (Build-Depends): Added gfortran-4.7 and gcc-4.7.
* debian/patches/10_force_gcc-4.7.patch: New patch, explicitly sets
  gfortran-4.7 and gcc-4.7, fixes test suite hang with gcc-4.8 (Closes:
  #701328, #713262).
* debian/testsuite: Added tests for COSMO analytical gradients and MRCC.
* debian/rules (MRCC_METHODS): New variable, required to enable MRCC methods.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
*> \brief \b DGELQF
 
2
*
 
3
*  =========== DOCUMENTATION ===========
 
4
*
 
5
* Online html documentation available at 
 
6
*            http://www.netlib.org/lapack/explore-html/ 
 
7
*
 
8
*> \htmlonly
 
9
*> Download DGELQF + dependencies 
 
10
*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgelqf.f"> 
 
11
*> [TGZ]</a> 
 
12
*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgelqf.f"> 
 
13
*> [ZIP]</a> 
 
14
*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgelqf.f"> 
 
15
*> [TXT]</a>
 
16
*> \endhtmlonly 
 
17
*
 
18
*  Definition:
 
19
*  ===========
 
20
*
 
21
*       SUBROUTINE DGELQF( M, N, A, LDA, TAU, WORK, LWORK, INFO )
 
22
 
23
*       .. Scalar Arguments ..
 
24
*       INTEGER            INFO, LDA, LWORK, M, N
 
25
*       ..
 
26
*       .. Array Arguments ..
 
27
*       DOUBLE PRECISION   A( LDA, * ), TAU( * ), WORK( * )
 
28
*       ..
 
29
*  
 
30
*
 
31
*> \par Purpose:
 
32
*  =============
 
33
*>
 
34
*> \verbatim
 
35
*>
 
36
*> DGELQF computes an LQ factorization of a real M-by-N matrix A:
 
37
*> A = L * Q.
 
38
*> \endverbatim
 
39
*
 
40
*  Arguments:
 
41
*  ==========
 
42
*
 
43
*> \param[in] M
 
44
*> \verbatim
 
45
*>          M is INTEGER
 
46
*>          The number of rows of the matrix A.  M >= 0.
 
47
*> \endverbatim
 
48
*>
 
49
*> \param[in] N
 
50
*> \verbatim
 
51
*>          N is INTEGER
 
52
*>          The number of columns of the matrix A.  N >= 0.
 
53
*> \endverbatim
 
54
*>
 
55
*> \param[in,out] A
 
56
*> \verbatim
 
57
*>          A is DOUBLE PRECISION array, dimension (LDA,N)
 
58
*>          On entry, the M-by-N matrix A.
 
59
*>          On exit, the elements on and below the diagonal of the array
 
60
*>          contain the m-by-min(m,n) lower trapezoidal matrix L (L is
 
61
*>          lower triangular if m <= n); the elements above the diagonal,
 
62
*>          with the array TAU, represent the orthogonal matrix Q as a
 
63
*>          product of elementary reflectors (see Further Details).
 
64
*> \endverbatim
 
65
*>
 
66
*> \param[in] LDA
 
67
*> \verbatim
 
68
*>          LDA is INTEGER
 
69
*>          The leading dimension of the array A.  LDA >= max(1,M).
 
70
*> \endverbatim
 
71
*>
 
72
*> \param[out] TAU
 
73
*> \verbatim
 
74
*>          TAU is DOUBLE PRECISION array, dimension (min(M,N))
 
75
*>          The scalar factors of the elementary reflectors (see Further
 
76
*>          Details).
 
77
*> \endverbatim
 
78
*>
 
79
*> \param[out] WORK
 
80
*> \verbatim
 
81
*>          WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK))
 
82
*>          On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
 
83
*> \endverbatim
 
84
*>
 
85
*> \param[in] LWORK
 
86
*> \verbatim
 
87
*>          LWORK is INTEGER
 
88
*>          The dimension of the array WORK.  LWORK >= max(1,M).
 
89
*>          For optimum performance LWORK >= M*NB, where NB is the
 
90
*>          optimal blocksize.
 
91
*>
 
92
*>          If LWORK = -1, then a workspace query is assumed; the routine
 
93
*>          only calculates the optimal size of the WORK array, returns
 
94
*>          this value as the first entry of the WORK array, and no error
 
95
*>          message related to LWORK is issued by XERBLA.
 
96
*> \endverbatim
 
97
*>
 
98
*> \param[out] INFO
 
99
*> \verbatim
 
100
*>          INFO is INTEGER
 
101
*>          = 0:  successful exit
 
102
*>          < 0:  if INFO = -i, the i-th argument had an illegal value
 
103
*> \endverbatim
 
104
*
 
105
*  Authors:
 
106
*  ========
 
107
*
 
108
*> \author Univ. of Tennessee 
 
109
*> \author Univ. of California Berkeley 
 
110
*> \author Univ. of Colorado Denver 
 
111
*> \author NAG Ltd. 
 
112
*
 
113
*> \date November 2011
 
114
*
 
115
*> \ingroup doubleGEcomputational
 
116
*
 
117
*> \par Further Details:
 
118
*  =====================
 
119
*>
 
120
*> \verbatim
 
121
*>
 
122
*>  The matrix Q is represented as a product of elementary reflectors
 
123
*>
 
124
*>     Q = H(k) . . . H(2) H(1), where k = min(m,n).
 
125
*>
 
126
*>  Each H(i) has the form
 
127
*>
 
128
*>     H(i) = I - tau * v * v**T
 
129
*>
 
130
*>  where tau is a real scalar, and v is a real vector with
 
131
*>  v(1:i-1) = 0 and v(i) = 1; v(i+1:n) is stored on exit in A(i,i+1:n),
 
132
*>  and tau in TAU(i).
 
133
*> \endverbatim
 
134
*>
 
135
*  =====================================================================
1
136
      SUBROUTINE DGELQF( M, N, A, LDA, TAU, WORK, LWORK, INFO )
2
137
*
3
 
*  -- LAPACK routine (version 2.0) --
4
 
*     Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
5
 
*     Courant Institute, Argonne National Lab, and Rice University
6
 
*     September 30, 1994
 
138
*  -- LAPACK computational routine (version 3.4.0) --
 
139
*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 
140
*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 
141
*     November 2011
7
142
*
8
143
*     .. Scalar Arguments ..
9
144
      INTEGER            INFO, LDA, LWORK, M, N
10
145
*     ..
11
146
*     .. Array Arguments ..
12
 
      DOUBLE PRECISION   A( LDA, * ), TAU( * ), WORK( LWORK )
 
147
      DOUBLE PRECISION   A( LDA, * ), TAU( * ), WORK( * )
13
148
*     ..
14
149
*
15
 
c
16
 
* $Id: dgelqf.f 19697 2010-10-29 16:57:34Z d3y133 $
17
 
c
18
 
*  Purpose
19
 
*  =======
20
 
*
21
 
*  DGELQF computes an LQ factorization of a real M-by-N matrix A:
22
 
*  A = L * Q.
23
 
*
24
 
*  Arguments
25
 
*  =========
26
 
*
27
 
*  M       (input) INTEGER
28
 
*          The number of rows of the matrix A.  M >= 0.
29
 
*
30
 
*  N       (input) INTEGER
31
 
*          The number of columns of the matrix A.  N >= 0.
32
 
*
33
 
*  A       (input/output) DOUBLE PRECISION array, dimension (LDA,N)
34
 
*          On entry, the M-by-N matrix A.
35
 
*          On exit, the elements on and below the diagonal of the array
36
 
*          contain the m-by-min(m,n) lower trapezoidal matrix L (L is
37
 
*          lower triangular if m <= n); the elements above the diagonal,
38
 
*          with the array TAU, represent the orthogonal matrix Q as a
39
 
*          product of elementary reflectors (see Further Details).
40
 
*
41
 
*  LDA     (input) INTEGER
42
 
*          The leading dimension of the array A.  LDA >= max(1,M).
43
 
*
44
 
*  TAU     (output) DOUBLE PRECISION array, dimension (min(M,N))
45
 
*          The scalar factors of the elementary reflectors (see Further
46
 
*          Details).
47
 
*
48
 
*  WORK    (workspace/output) DOUBLE PRECISION array, dimension (LWORK)
49
 
*          On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
50
 
*
51
 
*  LWORK   (input) INTEGER
52
 
*          The dimension of the array WORK.  LWORK >= max(1,M).
53
 
*          For optimum performance LWORK >= M*NB, where NB is the
54
 
*          optimal blocksize.
55
 
*
56
 
*  INFO    (output) INTEGER
57
 
*          = 0:  successful exit
58
 
*          < 0:  if INFO = -i, the i-th argument had an illegal value
59
 
*
60
 
*  Further Details
61
 
*  ===============
62
 
*
63
 
*  The matrix Q is represented as a product of elementary reflectors
64
 
*
65
 
*     Q = H(k) . . . H(2) H(1), where k = min(m,n).
66
 
*
67
 
*  Each H(i) has the form
68
 
*
69
 
*     H(i) = I - tau * v * v'
70
 
*
71
 
*  where tau is a real scalar, and v is a real vector with
72
 
*  v(1:i-1) = 0 and v(i) = 1; v(i+1:n) is stored on exit in A(i,i+1:n),
73
 
*  and tau in TAU(i).
74
 
*
75
150
*  =====================================================================
76
151
*
77
152
*     .. Local Scalars ..
78
 
      INTEGER            I, IB, IINFO, IWS, K, LDWORK, NB, NBMIN, NX
 
153
      LOGICAL            LQUERY
 
154
      INTEGER            I, IB, IINFO, IWS, K, LDWORK, LWKOPT, NB,
 
155
     $                   NBMIN, NX
79
156
*     ..
80
157
*     .. External Subroutines ..
81
158
      EXTERNAL           DGELQ2, DLARFB, DLARFT, XERBLA
92
169
*     Test the input arguments
93
170
*
94
171
      INFO = 0
 
172
      NB = ILAENV( 1, 'DGELQF', ' ', M, N, -1, -1 )
 
173
      LWKOPT = M*NB
 
174
      WORK( 1 ) = LWKOPT
 
175
      LQUERY = ( LWORK.EQ.-1 )
95
176
      IF( M.LT.0 ) THEN
96
177
         INFO = -1
97
178
      ELSE IF( N.LT.0 ) THEN
98
179
         INFO = -2
99
180
      ELSE IF( LDA.LT.MAX( 1, M ) ) THEN
100
181
         INFO = -4
101
 
      ELSE IF( LWORK.LT.MAX( 1, M ) ) THEN
 
182
      ELSE IF( LWORK.LT.MAX( 1, M ) .AND. .NOT.LQUERY ) THEN
102
183
         INFO = -7
103
184
      END IF
104
185
      IF( INFO.NE.0 ) THEN
105
186
         CALL XERBLA( 'DGELQF', -INFO )
106
187
         RETURN
 
188
      ELSE IF( LQUERY ) THEN
 
189
         RETURN
107
190
      END IF
108
191
*
109
192
*     Quick return if possible
114
197
         RETURN
115
198
      END IF
116
199
*
117
 
*     Determine the block size.
118
 
*
119
 
      NB = ILAENV( 1, 'DGELQF', ' ', M, N, -1, -1 )
120
200
      NBMIN = 2
121
201
      NX = 0
122
202
      IWS = M