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

« back to all changes in this revision

Viewing changes to src/blas/single/isamax.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
 
      integer function isamax(n,sx,incx)
2
 
*
3
 
* $Id: isamax.f 19695 2010-10-29 16:51:02Z d3y133 $
4
 
*
5
 
c
6
 
c     finds the index of element having max. absolute value.
7
 
c     jack dongarra, linpack, 3/11/78.
8
 
c     modified 3/93 to return if incx .le. 0.
9
 
c     modified 12/3/93, array(1) declarations changed to array(*)
10
 
c
11
 
      real sx(*),smax
12
 
      integer i,incx,ix,n
13
 
c
14
 
      isamax = 0
15
 
      if( n.lt.1 .or. incx.le.0 ) return
16
 
      isamax = 1
17
 
      if(n.eq.1)return
18
 
      if(incx.eq.1)go to 20
19
 
c
20
 
c        code for increment not equal to 1
21
 
c
22
 
      ix = 1
23
 
      smax = abs(sx(1))
24
 
      ix = ix + incx
25
 
      do 10 i = 2,n
26
 
         if(abs(sx(ix)).le.smax) go to 5
27
 
         isamax = i
28
 
         smax = abs(sx(ix))
29
 
    5    ix = ix + incx
30
 
   10 continue
31
 
      return
32
 
c
33
 
c        code for increment equal to 1
34
 
c
35
 
   20 smax = abs(sx(1))
36
 
      do 30 i = 2,n
37
 
         if(abs(sx(i)).le.smax) go to 30
38
 
         isamax = i
39
 
         smax = abs(sx(i))
40
 
   30 continue
41
 
      return
42
 
      end
 
1
*> \brief \b ISAMAX
 
2
*
 
3
*  =========== DOCUMENTATION ===========
 
4
*
 
5
* Online html documentation available at 
 
6
*            http://www.netlib.org/lapack/explore-html/ 
 
7
*
 
8
*  Definition:
 
9
*  ===========
 
10
*
 
11
*       INTEGER FUNCTION ISAMAX(N,SX,INCX)
 
12
 
13
*       .. Scalar Arguments ..
 
14
*       INTEGER INCX,N
 
15
*       ..
 
16
*       .. Array Arguments ..
 
17
*       REAL SX(*)
 
18
*       ..
 
19
*  
 
20
*
 
21
*> \par Purpose:
 
22
*  =============
 
23
*>
 
24
*> \verbatim
 
25
*>
 
26
*>    ISAMAX finds the index of element having max. absolute value.
 
27
*> \endverbatim
 
28
*
 
29
*  Authors:
 
30
*  ========
 
31
*
 
32
*> \author Univ. of Tennessee 
 
33
*> \author Univ. of California Berkeley 
 
34
*> \author Univ. of Colorado Denver 
 
35
*> \author NAG Ltd. 
 
36
*
 
37
*> \date November 2011
 
38
*
 
39
*> \ingroup aux_blas
 
40
*
 
41
*> \par Further Details:
 
42
*  =====================
 
43
*>
 
44
*> \verbatim
 
45
*>
 
46
*>     jack dongarra, linpack, 3/11/78.
 
47
*>     modified 3/93 to return if incx .le. 0.
 
48
*>     modified 12/3/93, array(1) declarations changed to array(*)
 
49
*> \endverbatim
 
50
*>
 
51
*  =====================================================================
 
52
      INTEGER FUNCTION ISAMAX(N,SX,INCX)
 
53
*
 
54
*  -- Reference BLAS level1 routine (version 3.4.0) --
 
55
*  -- Reference BLAS is a software package provided by Univ. of Tennessee,    --
 
56
*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 
57
*     November 2011
 
58
*
 
59
*     .. Scalar Arguments ..
 
60
      INTEGER INCX,N
 
61
*     ..
 
62
*     .. Array Arguments ..
 
63
      REAL SX(*)
 
64
*     ..
 
65
*
 
66
*  =====================================================================
 
67
*
 
68
*     .. Local Scalars ..
 
69
      REAL SMAX
 
70
      INTEGER I,IX
 
71
*     ..
 
72
*     .. Intrinsic Functions ..
 
73
      INTRINSIC ABS
 
74
*     ..
 
75
      ISAMAX = 0
 
76
      IF (N.LT.1 .OR. INCX.LE.0) RETURN
 
77
      ISAMAX = 1
 
78
      IF (N.EQ.1) RETURN
 
79
      IF (INCX.EQ.1) THEN
 
80
*
 
81
*        code for increment equal to 1
 
82
*
 
83
         SMAX = ABS(SX(1))
 
84
         DO I = 2,N
 
85
            IF (ABS(SX(I)).GT.SMAX) THEN
 
86
               ISAMAX = I
 
87
               SMAX = ABS(SX(I))
 
88
            END IF
 
89
         END DO
 
90
      ELSE
 
91
*
 
92
*        code for increment not equal to 1
 
93
*
 
94
         IX = 1
 
95
         SMAX = ABS(SX(1))
 
96
         IX = IX + INCX
 
97
         DO I = 2,N
 
98
            IF (ABS(SX(IX)).GT.SMAX) THEN
 
99
               ISAMAX = I
 
100
               SMAX = ABS(SX(IX))
 
101
            END IF
 
102
            IX = IX + INCX
 
103
         END DO
 
104
      END IF
 
105
      RETURN
 
106
      END