~ubuntu-branches/ubuntu/utopic/nwchem/utopic

« back to all changes in this revision

Viewing changes to src/lapack/single/spotf2.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 SPOTF2 computes the Cholesky factorization of a symmetric/Hermitian positive definite matrix (unblocked algorithm).
 
2
*
 
3
*  =========== DOCUMENTATION ===========
 
4
*
 
5
* Online html documentation available at 
 
6
*            http://www.netlib.org/lapack/explore-html/ 
 
7
*
 
8
*> \htmlonly
 
9
*> Download SPOTF2 + dependencies 
 
10
*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/spotf2.f"> 
 
11
*> [TGZ]</a> 
 
12
*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/spotf2.f"> 
 
13
*> [ZIP]</a> 
 
14
*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/spotf2.f"> 
 
15
*> [TXT]</a>
 
16
*> \endhtmlonly 
 
17
*
 
18
*  Definition:
 
19
*  ===========
 
20
*
 
21
*       SUBROUTINE SPOTF2( UPLO, N, A, LDA, INFO )
 
22
 
23
*       .. Scalar Arguments ..
 
24
*       CHARACTER          UPLO
 
25
*       INTEGER            INFO, LDA, N
 
26
*       ..
 
27
*       .. Array Arguments ..
 
28
*       REAL               A( LDA, * )
 
29
*       ..
 
30
*  
 
31
*
 
32
*> \par Purpose:
 
33
*  =============
 
34
*>
 
35
*> \verbatim
 
36
*>
 
37
*> SPOTF2 computes the Cholesky factorization of a real symmetric
 
38
*> positive definite matrix A.
 
39
*>
 
40
*> The factorization has the form
 
41
*>    A = U**T * U ,  if UPLO = 'U', or
 
42
*>    A = L  * L**T,  if UPLO = 'L',
 
43
*> where U is an upper triangular matrix and L is lower triangular.
 
44
*>
 
45
*> This is the unblocked version of the algorithm, calling Level 2 BLAS.
 
46
*> \endverbatim
 
47
*
 
48
*  Arguments:
 
49
*  ==========
 
50
*
 
51
*> \param[in] UPLO
 
52
*> \verbatim
 
53
*>          UPLO is CHARACTER*1
 
54
*>          Specifies whether the upper or lower triangular part of the
 
55
*>          symmetric matrix A is stored.
 
56
*>          = 'U':  Upper triangular
 
57
*>          = 'L':  Lower triangular
 
58
*> \endverbatim
 
59
*>
 
60
*> \param[in] N
 
61
*> \verbatim
 
62
*>          N is INTEGER
 
63
*>          The order of the matrix A.  N >= 0.
 
64
*> \endverbatim
 
65
*>
 
66
*> \param[in,out] A
 
67
*> \verbatim
 
68
*>          A is REAL array, dimension (LDA,N)
 
69
*>          On entry, the symmetric matrix A.  If UPLO = 'U', the leading
 
70
*>          n by n upper triangular part of A contains the upper
 
71
*>          triangular part of the matrix A, and the strictly lower
 
72
*>          triangular part of A is not referenced.  If UPLO = 'L', the
 
73
*>          leading n by n lower triangular part of A contains the lower
 
74
*>          triangular part of the matrix A, and the strictly upper
 
75
*>          triangular part of A is not referenced.
 
76
*>
 
77
*>          On exit, if INFO = 0, the factor U or L from the Cholesky
 
78
*>          factorization A = U**T *U  or A = L*L**T.
 
79
*> \endverbatim
 
80
*>
 
81
*> \param[in] LDA
 
82
*> \verbatim
 
83
*>          LDA is INTEGER
 
84
*>          The leading dimension of the array A.  LDA >= max(1,N).
 
85
*> \endverbatim
 
86
*>
 
87
*> \param[out] INFO
 
88
*> \verbatim
 
89
*>          INFO is INTEGER
 
90
*>          = 0: successful exit
 
91
*>          < 0: if INFO = -k, the k-th argument had an illegal value
 
92
*>          > 0: if INFO = k, the leading minor of order k is not
 
93
*>               positive definite, and the factorization could not be
 
94
*>               completed.
 
95
*> \endverbatim
 
96
*
 
97
*  Authors:
 
98
*  ========
 
99
*
 
100
*> \author Univ. of Tennessee 
 
101
*> \author Univ. of California Berkeley 
 
102
*> \author Univ. of Colorado Denver 
 
103
*> \author NAG Ltd. 
 
104
*
 
105
*> \date September 2012
 
106
*
 
107
*> \ingroup realPOcomputational
 
108
*
 
109
*  =====================================================================
1
110
      SUBROUTINE SPOTF2( UPLO, N, A, LDA, INFO )
2
111
*
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
 
*     February 29, 1992
 
112
*  -- LAPACK computational routine (version 3.4.2) --
 
113
*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 
114
*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 
115
*     September 2012
7
116
*
8
117
*     .. Scalar Arguments ..
9
118
      CHARACTER          UPLO
13
122
      REAL               A( LDA, * )
14
123
*     ..
15
124
*
16
 
c
17
 
* $Id: spotf2.f 19697 2010-10-29 16:57:34Z d3y133 $
18
 
c
19
 
*  Purpose
20
 
*  =======
21
 
*
22
 
*  SPOTF2 computes the Cholesky factorization of a real symmetric
23
 
*  positive definite matrix A.
24
 
*
25
 
*  The factorization has the form
26
 
*     A = U' * U ,  if UPLO = 'U', or
27
 
*     A = L  * L',  if UPLO = 'L',
28
 
*  where U is an upper triangular matrix and L is lower triangular.
29
 
*
30
 
*  This is the unblocked version of the algorithm, calling Level 2 BLAS.
31
 
*
32
 
*  Arguments
33
 
*  =========
34
 
*
35
 
*  UPLO    (input) CHARACTER*1
36
 
*          Specifies whether the upper or lower triangular part of the
37
 
*          symmetric matrix A is stored.
38
 
*          = 'U':  Upper triangular
39
 
*          = 'L':  Lower triangular
40
 
*
41
 
*  N       (input) INTEGER
42
 
*          The order of the matrix A.  N >= 0.
43
 
*
44
 
*  A       (input/output) REAL array, dimension (LDA,N)
45
 
*          On entry, the symmetric matrix A.  If UPLO = 'U', the leading
46
 
*          n by n upper triangular part of A contains the upper
47
 
*          triangular part of the matrix A, and the strictly lower
48
 
*          triangular part of A is not referenced.  If UPLO = 'L', the
49
 
*          leading n by n lower triangular part of A contains the lower
50
 
*          triangular part of the matrix A, and the strictly upper
51
 
*          triangular part of A is not referenced.
52
 
*
53
 
*          On exit, if INFO = 0, the factor U or L from the Cholesky
54
 
*          factorization A = U'*U  or A = L*L'.
55
 
*
56
 
*  LDA     (input) INTEGER
57
 
*          The leading dimension of the array A.  LDA >= max(1,N).
58
 
*
59
 
*  INFO    (output) INTEGER
60
 
*          = 0: successful exit
61
 
*          < 0: if INFO = -k, the k-th argument had an illegal value
62
 
*          > 0: if INFO = k, the leading minor of order k is not
63
 
*               positive definite, and the factorization could not be
64
 
*               completed.
65
 
*
66
125
*  =====================================================================
67
126
*
68
127
*     .. Parameters ..
75
134
      REAL               AJJ
76
135
*     ..
77
136
*     .. External Functions ..
78
 
      LOGICAL            LSAME
 
137
      LOGICAL            LSAME, SISNAN
79
138
      REAL               SDOT
80
 
      EXTERNAL           LSAME, SDOT
 
139
      EXTERNAL           LSAME, SDOT, SISNAN
81
140
*     ..
82
141
*     .. External Subroutines ..
83
142
      EXTERNAL           SGEMV, SSCAL, XERBLA
110
169
*
111
170
      IF( UPPER ) THEN
112
171
*
113
 
*        Compute the Cholesky factorization A = U'*U.
 
172
*        Compute the Cholesky factorization A = U**T *U.
114
173
*
115
174
         DO 10 J = 1, N
116
175
*
117
176
*           Compute U(J,J) and test for non-positive-definiteness.
118
177
*
119
178
            AJJ = A( J, J ) - SDOT( J-1, A( 1, J ), 1, A( 1, J ), 1 )
120
 
            IF( AJJ.LE.ZERO ) THEN
 
179
            IF( AJJ.LE.ZERO.OR.SISNAN( AJJ ) ) THEN
121
180
               A( J, J ) = AJJ
122
181
               GO TO 30
123
182
            END IF
134
193
   10    CONTINUE
135
194
      ELSE
136
195
*
137
 
*        Compute the Cholesky factorization A = L*L'.
 
196
*        Compute the Cholesky factorization A = L*L**T.
138
197
*
139
198
         DO 20 J = 1, N
140
199
*
142
201
*
143
202
            AJJ = A( J, J ) - SDOT( J-1, A( J, 1 ), LDA, A( J, 1 ),
144
203
     $            LDA )
145
 
            IF( AJJ.LE.ZERO ) THEN
 
204
            IF( AJJ.LE.ZERO.OR.SISNAN( AJJ ) ) THEN
146
205
               A( J, J ) = AJJ
147
206
               GO TO 30
148
207
            END IF