elpa2_compute.F90 6.04 KB
Newer Older
Andreas Marek's avatar
Andreas Marek committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
!    This file is part of ELPA.
!
!    The ELPA library was originally created by the ELPA consortium,
!    consisting of the following organizations:
!
!    - Max Planck Computing and Data Facility (MPCDF), fomerly known as
!      Rechenzentrum Garching der Max-Planck-Gesellschaft (RZG),
!    - Bergische Universität Wuppertal, Lehrstuhl für angewandte
!      Informatik,
!    - Technische Universität München, Lehrstuhl für Informatik mit
!      Schwerpunkt Wissenschaftliches Rechnen ,
!    - Fritz-Haber-Institut, Berlin, Abt. Theorie,
!    - Max-Plack-Institut für Mathematik in den Naturwissenschaftrn,
!      Leipzig, Abt. Komplexe Strukutren in Biologie und Kognition,
!      and
!    - IBM Deutschland GmbH
!
!    This particular source code file contains additions, changes and
!    enhancements authored by Intel Corporation which is not part of
!    the ELPA consortium.
!
!    More information can be found here:
!    http://elpa.mpcdf.mpg.de/
!
!    ELPA is free software: you can redistribute it and/or modify
!    it under the terms of the version 3 of the license of the
!    GNU Lesser General Public License as published by the Free
!    Software Foundation.
!
!    ELPA is distributed in the hope that it will be useful,
!    but WITHOUT ANY WARRANTY; without even the implied warranty of
!    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
!    GNU Lesser General Public License for more details.
!
!    You should have received a copy of the GNU Lesser General Public License
!    along with ELPA.  If not, see <http://www.gnu.org/licenses/>
!
!    ELPA reflects a substantial effort on the part of the original
!    ELPA consortium, and we ask you to respect the spirit of the
!    license that we chose: i.e., please contribute any changes you
!    may have back to the original ELPA library distribution, and keep
!    any derivatives of ELPA under the same license that we chose for
!    the original distribution, the GNU Lesser General Public License.
!
!
! ELPA1 -- Faster replacements for ScaLAPACK symmetric eigenvalue routines
!
! Copyright of the original code rests with the authors inside the ELPA
! consortium. The copyright of any additional modifications shall rest
! with their original authors, but shall adhere to the licensing terms
! distributed along with the original code in the file "COPYING".



! ELPA2 -- 2-stage solver for ELPA
!
! Copyright of the original code rests with the authors inside the ELPA
! consortium. The copyright of any additional modifications shall rest
! with their original authors, but shall adhere to the licensing terms
! distributed along with the original code in the file "COPYING".


#include "config-f90.h"

module ELPA2_compute

! Version 1.1.2, 2011-02-21

69
  use ELPA_utilities
Andreas Marek's avatar
Andreas Marek committed
70
71
72
73
  USE ELPA1_compute
  use elpa1, only : elpa_print_times, time_evp_back, time_evp_fwd, time_evp_solve
  use elpa2_utilities
  use elpa_pdgeqrf
74
  use precision
75
  use elpa_mpi
76
  use aligned_mem
Andreas Marek's avatar
Andreas Marek committed
77
78
79
80
81

  implicit none

  PRIVATE ! By default, all routines contained are private

82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
  public :: bandred_real_double
  public :: tridiag_band_real_double
  public :: trans_ev_tridi_to_band_real_double
  public :: trans_ev_band_to_full_real_double

#ifdef WANT_SINGLE_PRECISION_REAL
  public :: bandred_real_single
  public :: tridiag_band_real_single
  public :: trans_ev_tridi_to_band_real_single
  public :: trans_ev_band_to_full_real_single
#endif

  public :: bandred_complex_double
  public :: tridiag_band_complex_double
  public :: trans_ev_tridi_to_band_complex_double
  public :: trans_ev_band_to_full_complex_double

#ifdef WANT_SINGLE_PRECISION_COMPLEX
  public :: bandred_complex_single
  public :: tridiag_band_complex_single
  public :: trans_ev_tridi_to_band_complex_single
  public :: trans_ev_band_to_full_complex_single
#endif
  public :: band_band_real_double
  public :: divide_band
Andreas Marek's avatar
Andreas Marek committed
107

108
109
110
111
  integer(kind=ik), public :: which_qr_decomposition = 1     ! defines, which QR-decomposition algorithm will be used
                                                    ! 0 for unblocked
                                                    ! 1 for blocked (maxrank: nblk)
  contains
Andreas Marek's avatar
Andreas Marek committed
112

113
114
! real double precision first
#define DOUBLE_PRECISION_REAL 1
115

116
#define REAL_DATATYPE rk8
Andreas Marek's avatar
Andreas Marek committed
117
118
119
#define BYTESIZE 8
#define REALCASE 1
#include "redist_band.X90"
120
121
#undef DOUBLE_PRECISION_REAL
#undef REAL_DATATYPE
Andreas Marek's avatar
Andreas Marek committed
122
123
124
#undef BYTESIZE
#undef REALCASE

125
126
! single precision
#ifdef WANT_SINGLE_PRECISION_REAL
127

128
129
#undef DOUBLE_PRECISION_REAL
#define REAL_DATATYPE rk4
130
131
132
#define BYTESIZE 4
#define REALCASE 1
#include "redist_band.X90"
133
#undef REAL_DATATYPE
134
135
136
#undef BYTESIZE
#undef REALCASE

137
#endif
138

139
140
! double precision
#define DOUBLE_PRECISION_COMPLEX 1
141

142
#define COMPLEX_DATATYPE ck8
Andreas Marek's avatar
Andreas Marek committed
143
144
145
#define BYTESIZE 16
#define COMPLEXCASE 1
#include "redist_band.X90"
146
#undef COMPLEX_DATATYPE
Andreas Marek's avatar
Andreas Marek committed
147
148
#undef BYTESIZE
#undef COMPLEXCASE
149
#undef DOUBLE_PRECISION_COMPLEX
Andreas Marek's avatar
Andreas Marek committed
150

151
#ifdef WANT_SINGLE_PRECISION_COMPLEX
152

153
154
155
#undef DOUBLE_PRECISION_COMPLEX
#undef DOUBLE_PRECISION_REAL
#define COMPLEX_DATATYPE ck4
156
157
#define COMPLEXCASE 1
#include "redist_band.X90"
158
#undef COMPLEX_DATATYPE
159
160
161
#undef BYTESIZE
#undef COMPLEXCASE

162
#endif /* WANT_SINGLE_PRECISION_COMPLEX */
Andreas Marek's avatar
Andreas Marek committed
163

164

165

166
167
168
! real double precision
#define DOUBLE_PRECISION_REAL 1
#define REAL_DATATYPE rk8
169

170
#include "elpa2_compute_real_template.X90"
171

172
173
#undef DOUBLE_PRECISION_REAL
#undef REAL_DATATYPE
174

175
176
! real single precision
#if defined(WANT_SINGLE_PRECISION_REAL)
177

178
179
#undef DOUBLE_PRECISION_REAL
#define REAL_DATATYPE rk4
180

181
#include "elpa2_compute_real_template.X90"
182

183
184
#undef DOUBLE_PRECISION_REAL
#undef REAL_DATATYPE
185

186
#endif /* WANT_SINGLE_PRECISION_REAL */
187

188
189
190
191
192
! complex double precision
#define DOUBLE_PRECISION_COMPLEX 1
#define REAL_DATATYPE rk8
#define COMPLEX_DATATYPE ck8
#include "elpa2_compute_complex_template.X90"
193

194
195
196
#undef DOUBLE_PRECISION_COMPLEX
#undef REAL_DATATYPE
#undef COMPLEX_DATATYPE
Andreas Marek's avatar
Andreas Marek committed
197
198


199
200
! complex single precision
#if defined(WANT_SINGLE_PRECISION_COMPLEX)
Andreas Marek's avatar
Andreas Marek committed
201

202
203
204
#undef DOUBLE_PRECISION_COMPLEX
#define REAL_DATATYPE rk4
#define COMPLEX_DATATYPE ck4
Andreas Marek's avatar
Andreas Marek committed
205

206
#include "elpa2_compute_complex_template.X90"
Andreas Marek's avatar
Andreas Marek committed
207

208
209
210
#undef DOUBLE_PRECISION_COMPLEX
#undef COMPLEX_DATATYPE
#undef REAL_DATATYPE
Andreas Marek's avatar
Andreas Marek committed
211

212
#endif /* WANT_SINGLE_PRECISION_COMPLEX */
Andreas Marek's avatar
Andreas Marek committed
213

214
end module ELPA2_compute