Eigenvalue SoLvers for Petaflop-Applications (ELPA) 2024.05.001.rc1
Loading...
Searching...
No Matches
elpa_api_math_template.F90
Go to the documentation of this file.
1#if 0
2!
3! Copyright 2017, L. Hüdepohl and A. Marek, MPCDF
4!
5! This file is part of ELPA.
6!
7! The ELPA library was originally created by the ELPA consortium,
8! consisting of the following organizations:
9!
10! - Max Planck Computing and Data Facility (MPCDF), formerly known as
11! Rechenzentrum Garching der Max-Planck-Gesellschaft (RZG),
12! - Bergische Universität Wuppertal, Lehrstuhl für angewandte
13! Informatik,
14! - Technische Universität München, Lehrstuhl für Informatik mit
15! Schwerpunkt Wissenschaftliches Rechnen ,
16! - Fritz-Haber-Institut, Berlin, Abt. Theorie,
17! - Max-Plack-Institut für Mathematik in den Naturwissenschaften,
18! Leipzig, Abt. Komplexe Strukutren in Biologie und Kognition,
19! and
20! - IBM Deutschland GmbH
21!
22! This particular source code file contains additions, changes and
23! enhancements authored by Intel Corporation which is not part of
24! the ELPA consortium.
25!
26! More information can be found here:
27! http://elpa.mpcdf.mpg.de/
28!
29! ELPA is free software: you can redistribute it and/or modify
30! it under the terms of the version 3 of the license of the
31! GNU Lesser General Public License as published by the Free
32! Software Foundation.
33!
34! ELPA is distributed in the hope that it will be useful,
35! but WITHOUT ANY WARRANTY; without even the implied warranty of
36! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
37! GNU Lesser General Public License for more details.
38!
39! You should have received a copy of the GNU Lesser General Public License
40! along with ELPA. If not, see <http://www.gnu.org/licenses/>
41!
42! ELPA reflects a substantial effort on the part of the original
43! ELPA consortium, and we ask you to respect the spirit of the
44! license that we chose: i.e., please contribute any changes you
45! may have back to the original ELPA library distribution, and keep
46! any derivatives of ELPA under the same license that we chose for
47! the original distribution, the GNU Lesser General Public License.
48!
49#endif
50
62#if ELPA_IMPL_SUFFIX == d
63
66#endif
67#if ELPA_IMPL_SUFFIX == f
68
71#endif
72#if ELPA_IMPL_SUFFIX == dc
73
76#endif
77#if ELPA_IMPL_SUFFIX == fc
78
81#endif
82
83 abstract interface
84 subroutine elpa_eigenvectors_a_h_a_&
85 &elpa_impl_suffix&
86 &_i(self, a, ev, q, error)
87 use, intrinsic :: iso_c_binding
88 import elpa_t
89 implicit none
90 class(elpa_t) :: self
91
92#ifdef USE_ASSUMED_SIZE
93 math_datatype(kind=c_datatype_kind) :: a(self%local_nrows, *), q(self%local_nrows,*)
94#else
95 math_datatype(kind=c_datatype_kind) :: a(self%local_nrows, self%local_ncols), q(self%local_nrows, self%local_ncols)
96#endif
97 real(kind=c_real_datatype) :: ev(self%na)
98
99#ifdef USE_FORTRAN2008
100 integer, optional :: error
101#else
102 integer :: error
103#endif
104 end subroutine
105 end interface
106
119#if ELPA_IMPL_SUFFIX == d
120
123#endif
124#if ELPA_IMPL_SUFFIX == f
125
128#endif
129#if ELPA_IMPL_SUFFIX == dc
130
133#endif
134#if ELPA_IMPL_SUFFIX == fc
135
138#endif
139
140 abstract interface
141 subroutine elpa_eigenvectors_d_ptr_&
142 &elpa_impl_suffix&
143 &_i(self, a, ev, q, error)
144 use, intrinsic :: iso_c_binding
145 import elpa_t
146 implicit none
147 class(elpa_t) :: self
148
149 type(c_ptr) :: a, q, ev
150
151#ifdef USE_FORTRAN2008
152 integer, optional :: error
153#else
154 integer :: error
155#endif
156 end subroutine
157 end interface
158
159#ifdef HAVE_SKEWSYMMETRIC
160
172#if ELPA_IMPL_SUFFIX == d
173
176#endif
177#if ELPA_IMPL_SUFFIX == f
178
181#endif
182
183 abstract interface
184 subroutine elpa_skew_eigenvectors_a_h_a_&
185 &elpa_impl_suffix&
186 &_i(self, a, ev, q, error)
187 use, intrinsic :: iso_c_binding
188 import elpa_t
189 implicit none
190 class(elpa_t) :: self
191
192#ifdef USE_ASSUMED_SIZE
193 math_datatype(kind=c_datatype_kind) :: a(self%local_nrows, *), q(self%local_nrows,*)
194#else
195 math_datatype(kind=c_datatype_kind) :: a(self%local_nrows, self%local_ncols), q(self%local_nrows, 2*self%local_ncols)
196#endif
197 real(kind=c_real_datatype) :: ev(self%na)
198
199#ifdef USE_FORTRAN2008
200 integer, optional :: error
201#else
202 integer :: error
203#endif
204 end subroutine
205 end interface
206
219#if ELPA_IMPL_SUFFIX == d
220
223#endif
224#if ELPA_IMPL_SUFFIX == f
225
228#endif
229
230 abstract interface
231 subroutine elpa_skew_eigenvectors_d_ptr_&
232 &elpa_impl_suffix&
233 &_i(self, a, ev, q, error)
234 use, intrinsic :: iso_c_binding
235 import elpa_t
236 implicit none
237 class(elpa_t) :: self
238
239 type(c_ptr) :: a, q, ev
240
241#ifdef USE_FORTRAN2008
242 integer, optional :: error
243#else
244 integer :: error
245#endif
246 end subroutine
247 end interface
248
249#endif /* HAVE_SKEWSYMMETRIC */
250
263#if ELPA_IMPL_SUFFIX == d
264
266#endif
267#if ELPA_IMPL_SUFFIX == f
268
270#endif
271#if ELPA_IMPL_SUFFIX == dc
272
274#endif
275#if ELPA_IMPL_SUFFIX ==fc
276
278#endif
279
280 abstract interface
281 subroutine elpa_eigenvalues_a_h_a_&
282 &elpa_impl_suffix&
283 &_i(self, a, ev, error)
284 use, intrinsic :: iso_c_binding
285 import elpa_t
286 implicit none
287 class(elpa_t) :: self
288#ifdef USE_ASSUMED_SIZE
289 math_datatype(kind=c_datatype_kind) :: a(self%local_nrows, *)
290#else
291 math_datatype(kind=c_datatype_kind) :: a(self%local_nrows, self%local_ncols)
292#endif
293 real(kind=c_real_datatype) :: ev(self%na)
294
295#ifdef USE_FORTRAN2008
296 integer, optional :: error
297#else
298 integer :: error
299#endif
300 end subroutine
301 end interface
302
315#if ELPA_IMPL_SUFFIX == d
316
318#endif
319#if ELPA_IMPL_SUFFIX == f
320
322#endif
323#if ELPA_IMPL_SUFFIX == dc
324
326#endif
327#if ELPA_IMPL_SUFFIX ==fc
328
330#endif
331
332 abstract interface
333 subroutine elpa_eigenvalues_d_ptr_&
334 &elpa_impl_suffix&
335 &_i(self, a, ev, error)
336 use, intrinsic :: iso_c_binding
337 import elpa_t
338 implicit none
339 class(elpa_t) :: self
340 type(c_ptr) :: a, ev
341
342#ifdef USE_FORTRAN2008
343 integer, optional :: error
344#else
345 integer :: error
346#endif
347 end subroutine
348 end interface
349
350#ifdef HAVE_SKEWSYMMETRIC
351
363#if ELPA_IMPL_SUFFIX == d
364
366#endif
367#if ELPA_IMPL_SUFFIX == f
368
370#endif
371
372 abstract interface
373 subroutine elpa_skew_eigenvalues_a_h_a_&
374 &elpa_impl_suffix&
375 &_i(self, a, ev, error)
376 use, intrinsic :: iso_c_binding
377 import elpa_t
378 implicit none
379 class(elpa_t) :: self
380#ifdef USE_ASSUMED_SIZE
381 math_datatype(kind=c_datatype_kind) :: a(self%local_nrows, *)
382#else
383 math_datatype(kind=c_datatype_kind) :: a(self%local_nrows, self%local_ncols)
384#endif
385 real(kind=c_real_datatype) :: ev(self%na)
386
387#ifdef USE_FORTRAN2008
388 integer, optional :: error
389#else
390 integer :: error
391#endif
392 end subroutine
393 end interface
394
407#if ELPA_IMPL_SUFFIX == d
408
410#endif
411#if ELPA_IMPL_SUFFIX == f
412
414#endif
415
416 abstract interface
417 subroutine elpa_skew_eigenvalues_d_ptr_&
418 &elpa_impl_suffix&
419 &_i(self, a, ev, error)
420 use, intrinsic :: iso_c_binding
421 import elpa_t
422 implicit none
423 class(elpa_t) :: self
424 type(c_ptr) :: a, ev
425
426#ifdef USE_FORTRAN2008
427 integer, optional :: error
428#else
429 integer :: error
430#endif
431 end subroutine
432 end interface
433#endif /* HAVE_SKEWSYMMETRIC */
434
447#if ELPA_IMPL_SUFFIX == d
448
452#endif
453#if ELPA_IMPL_SUFFIX == f
454
458#endif
459#if ELPA_IMPL_SUFFIX == dc
460
464#endif
465#if ELPA_IMPL_SUFFIX == fc
466
470#endif
471
474 abstract interface
475 subroutine elpa_generalized_eigenvectors_&
476 &elpa_impl_suffix&
477 &_i(self, a, b, ev, q, is_already_decomposed, error)
478 use, intrinsic :: iso_c_binding
479 use elpa_constants
480 import elpa_t
481 implicit none
482 class(elpa_t) :: self
483#ifdef USE_ASSUMED_SIZE
484 math_datatype(kind=c_datatype_kind) :: a(self%local_nrows, *), b(self%local_nrows, *), q(self%local_nrows, *)
485#else
486 math_datatype(kind=c_datatype_kind) :: a(self%local_nrows, self%local_ncols), b(self%local_nrows, self%local_ncols), &
487 q(self%local_nrows, self%local_ncols)
488#endif
489 real(kind=c_real_datatype) :: ev(self%na)
490
491 logical :: is_already_decomposed
492 integer, optional :: error
493 end subroutine
494 end interface
495
508#if ELPA_IMPL_SUFFIX == d
509
512#endif
513#if ELPA_IMPL_SUFFIX == f
514
517#endif
518#if ELPA_IMPL_SUFFIX == dc
519
522#endif
523#if ELPA_IMPL_SUFFIX == fc
524
527#endif
528
531 abstract interface
532 subroutine elpa_generalized_eigenvalues_&
533 &elpa_impl_suffix&
534 &_i(self, a, b, ev, is_already_decomposed, error)
535 use, intrinsic :: iso_c_binding
536 use elpa_constants
537 import elpa_t
538 implicit none
539 class(elpa_t) :: self
540#ifdef USE_ASSUMED_SIZE
541 math_datatype(kind=c_datatype_kind) :: a(self%local_nrows, *), b(self%local_nrows, *)
542#else
543 math_datatype(kind=c_datatype_kind) :: a(self%local_nrows, self%local_ncols), b(self%local_nrows, self%local_ncols)
544#endif
545 real(kind=c_real_datatype) :: ev(self%na)
546
547 logical :: is_already_decomposed
548 integer, optional :: error
549 end subroutine
550 end interface
551
552
588 abstract interface
589 subroutine elpa_hermitian_multiply_a_h_a_&
590 &elpa_impl_suffix&
591 &_i(self,uplo_a, uplo_c, ncb, a, b, nrows_b, ncols_b, &
592 c, nrows_c, ncols_c, error)
593 use, intrinsic :: iso_c_binding
594 import elpa_t
595 implicit none
596 class(elpa_t) :: self
597 character*1 :: uplo_a, uplo_c
598 integer(kind=c_int), intent(in) :: nrows_b, ncols_b, nrows_c, ncols_c, ncb
599#ifdef USE_ASSUMED_SIZE
600 math_datatype(kind=c_datatype_kind) :: a(self%local_nrows,*), b(nrows_b,*), c(nrows_c,*)
601#else
602 math_datatype(kind=c_datatype_kind) :: a(self%local_nrows,self%local_ncols), b(nrows_b,ncols_b), c(nrows_c,ncols_c)
603#endif
604
605#ifdef USE_FORTRAN2008
606 integer, optional :: error
607#else
608 integer :: error
609#endif
610 end subroutine
611 end interface
612
613
649 abstract interface
650 subroutine elpa_hermitian_multiply_d_ptr_&
651 &elpa_impl_suffix&
652 &_i(self,uplo_a, uplo_c, ncb, a, b, nrows_b, ncols_b, &
653 c, nrows_c, ncols_c, error)
654 use, intrinsic :: iso_c_binding
655 import elpa_t
656 implicit none
657 class(elpa_t) :: self
658 character*1 :: uplo_a, uplo_c
659 integer(kind=c_int), intent(in) :: nrows_b, ncols_b, nrows_c, ncols_c, ncb
660 type(c_ptr) :: a, b, c
661!#ifdef USE_ASSUMED_SIZE
662! MATH_DATATYPE(kind=C_DATATYPE_KIND) :: a(self%local_nrows,*), b(nrows_b,*), c(nrows_c,*)
663!#else
664! MATH_DATATYPE(kind=C_DATATYPE_KIND) :: a(self%local_nrows,self%local_ncols), b(nrows_b,ncols_b), c(nrows_c,ncols_c)
665!#endif
666
667#ifdef USE_FORTRAN2008
668 integer, optional :: error
669#else
670 integer :: error
671#endif
672 end subroutine
673 end interface
674
675
684#if ELPA_IMPL_SUFFIX == d
685
686#endif
687#if ELPA_IMPL_SUFFIX == f
688
689#endif
690#if ELPA_IMPL_SUFFIX == dc
691
692#endif
693#if ELPA_IMPL_SUFFIX == fc
694
695#endif
696
697 abstract interface
698 subroutine elpa_cholesky_a_h_a_&
699 &elpa_impl_suffix&
700 &_i(self, a, error)
701 use, intrinsic :: iso_c_binding
702 import elpa_t
703 implicit none
704 class(elpa_t) :: self
705#ifdef USE_ASSUMED_SIZE
706 math_datatype(kind=c_datatype_kind) :: a(self%local_nrows,*)
707#else
708 math_datatype(kind=c_datatype_kind) :: a(self%local_nrows,self%local_ncols)
709#endif
710
711#ifdef USE_FORTRAN2008
712 integer, optional :: error
713#else
714 integer :: error
715#endif
716 end subroutine
717 end interface
718
719
728#if ELPA_IMPL_SUFFIX == d
729
730#endif
731#if ELPA_IMPL_SUFFIX == f
732
733#endif
734#if ELPA_IMPL_SUFFIX == dc
735
736#endif
737#if ELPA_IMPL_SUFFIX == fc
738
739#endif
740
741 abstract interface
742 subroutine elpa_cholesky_d_ptr_&
743 &elpa_impl_suffix&
744 &_i(self, a, error)
745 use, intrinsic :: iso_c_binding
746 import elpa_t
747 implicit none
748 class(elpa_t) :: self
749 type(c_ptr) :: a
750
751#ifdef USE_FORTRAN2008
752 integer, optional :: error
753#else
754 integer :: error
755#endif
756 end subroutine
757 end interface
758
759
760
769#if ELPA_IMPL_SUFFIX == d
770
771#endif
772#if ELPA_IMPL_SUFFIX == f
773
774#endif
775#if ELPA_IMPL_SUFFIX == dc
776
777#endif
778#if ELPA_IMPL_SUFFIX == fc
779
780#endif
781
783 abstract interface
784 subroutine elpa_invert_trm_a_h_a_&
785 &elpa_impl_suffix&
786 &_i(self, a, error)
787 use, intrinsic :: iso_c_binding
788 import elpa_t
789 implicit none
790 class(elpa_t) :: self
791#ifdef USE_ASSUMED_SIZE
792 math_datatype(kind=c_datatype_kind) :: a(self%local_nrows,*)
793#else
794 math_datatype(kind=c_datatype_kind) :: a(self%local_nrows,self%local_ncols)
795#endif
796
797#ifdef USE_FORTRAN2008
798 integer, optional :: error
799#else
800 integer :: error
801#endif
802 end subroutine
803 end interface
804
813#if ELPA_IMPL_SUFFIX == d
814
815#endif
816#if ELPA_IMPL_SUFFIX == f
817
818#endif
819#if ELPA_IMPL_SUFFIX == dc
820
821#endif
822#if ELPA_IMPL_SUFFIX == fc
823
824#endif
825
827 abstract interface
828 subroutine elpa_invert_trm_d_ptr_&
829 &elpa_impl_suffix&
830 &_i(self, a, error)
831 use, intrinsic :: iso_c_binding
832 import elpa_t
833 implicit none
834 class(elpa_t) :: self
835 type(c_ptr) :: a
836
837#ifdef USE_FORTRAN2008
838 integer, optional :: error
839#else
840 integer :: error
841#endif
842 end subroutine
843 end interface
844
845
846
855#if ELPA_IMPL_SUFFIX == d
856
860#endif
861#if ELPA_IMPL_SUFFIX == f
862
866#endif
867
868 abstract interface
869 subroutine elpa_solve_tridiagonal_&
870 &elpa_impl_suffix&
871 &_i(self, d, e, q, error)
872 use, intrinsic :: iso_c_binding
873 import elpa_t
874 implicit none
875 class(elpa_t) :: self
876 real(kind=c_real_datatype) :: d(self%na), e(self%na)
877#ifdef USE_ASSUMED_SIZE
878 real(kind=c_real_datatype) :: q(self%local_nrows,*)
879#else
880 real(kind=c_real_datatype) :: q(self%local_nrows,self%local_ncols)
881#endif
882
883#ifdef USE_FORTRAN2008
884 integer, optional :: error
885#else
886 integer :: error
887#endif
888 end subroutine
889 end interface
890
struct elpa_struct * elpa_t
Definition elpa.h:10