74 subroutine elpa_eigenvectors_a_h_a_&
76 & (self, a, ev, q, error)
77 class(elpa_impl_t) :: self
79#ifdef USE_ASSUMED_SIZE
80 math_datatype(kind=c_datatype_kind) :: a(self%local_nrows, *), q(self%local_nrows, *)
82 math_datatype(kind=c_datatype_kind) :: a(self%local_nrows, self%local_ncols), q(self%local_nrows, self%local_ncols)
84 real(kind=c_real_datatype) :: ev(self%na)
87 integer,
optional :: error
92 integer(kind=c_int) :: solver
96 call self%get(
"solver", solver,error2)
97 if (error2 .ne. elpa_ok)
then
98 print *,
"Problem setting solver. Aborting..."
100 if (
present(error))
then
108 if (solver .eq. elpa_solver_1stage)
then
109 call self%autotune_timer%start(
"accumulator")
110#if defined(INCLUDE_ROUTINES)
111 success_l = elpa_solve_evp_&
115 &_impl(self, a, ev, q)
117 call self%autotune_timer%stop(
"accumulator")
119 else if (solver .eq. elpa_solver_2stage)
then
120 call self%autotune_timer%start(
"accumulator")
121#if defined(INCLUDE_ROUTINES)
122 success_l = elpa_solve_evp_&
126 &_impl(self, a, ev, q)
128 call self%autotune_timer%stop(
"accumulator")
131 write(error_unit,
'(a)')
"Unknown solver: Aborting!"
132#ifdef USE_FORTRAN2008
133 if (
present(error))
then
145#ifdef USE_FORTRAN2008
146 if (
present(error))
then
150 error = elpa_error_during_computation
152 else if (.not. success_l)
then
153 write(error_unit,
'(a)')
"ELPA: Error in eigenvectors() and you did not check for errors!"
159 error = elpa_error_during_computation
190 subroutine elpa_eigenvectors_d_ptr_&
192 & (self, a, ev, q, error)
196 class(elpa_impl_t) :: self
198 type(c_ptr) :: a, q, ev
200#ifdef USE_FORTRAN2008
201 integer,
optional :: error
206 integer(kind=c_int) :: solver
210 call self%get(
"solver", solver,error2)
211 if (error2 .ne. elpa_ok)
then
212 print *,
"Problem setting solver. Aborting..."
213#ifdef USE_FORTRAN2008
214 if (
present(error))
then
222 if (solver .eq. elpa_solver_1stage)
then
223 call self%autotune_timer%start(
"accumulator")
224#if defined(INCLUDE_ROUTINES)
225 success_l = elpa_solve_evp_&
229 &_impl(self, a, ev, q)
231 call self%autotune_timer%stop(
"accumulator")
233 else if (solver .eq. elpa_solver_2stage)
then
234 call self%autotune_timer%start(
"accumulator")
235#if defined(INCLUDE_ROUTINES)
236 success_l = elpa_solve_evp_&
240 &_impl(self, a, ev, q)
242 call self%autotune_timer%stop(
"accumulator")
245 write(error_unit,
'(a)')
"Unknown solver: Aborting!"
246#ifdef USE_FORTRAN2008
247 if (
present(error))
then
259#ifdef USE_FORTRAN2008
260 if (
present(error))
then
264 error = elpa_error_during_computation
266 else if (.not. success_l)
then
267 write(error_unit,
'(a)')
"ELPA: Error in eigenvectors() and you did not check for errors!"
273 error = elpa_error_during_computation
281#ifdef DOUBLE_PRECISION_REAL
284#ifdef SINGLE_PRECISION_REAL
289#ifdef DOUBLE_PRECISION_COMPLEX
292#ifdef SINGLE_PRECISION_COMPLEX
296 subroutine elpa_eigenvectors_a_h_a_&
298 &_c(handle, a_p, ev_p, q_p, error) &
300#ifdef DOUBLE_PRECISION_REAL
301 bind(C, name="elpa_eigenvectors_a_h_a_d")
303#ifdef SINGLE_PRECISION_REAL
304 bind(C, name="elpa_eigenvectors_a_h_a_f")
308#ifdef DOUBLE_PRECISION_COMPLEX
309 bind(C, name="elpa_eigenvectors_a_h_a_dc")
311#ifdef SINGLE_PRECISION_COMPLEX
312 bind(C, name="elpa_eigenvectors_a_h_a_fc")
315 type(c_ptr),
intent(in),
value :: handle, a_p, ev_p, q_p
316#ifdef USE_FORTRAN2008
317 integer(kind=c_int),
optional,
intent(in) :: error
319 integer(kind=c_int),
intent(in) :: error
322 math_datatype(kind=c_datatype_kind),
pointer :: a(:, :), q(:, :)
323 real(kind=c_real_datatype),
pointer :: ev(:)
324 type(elpa_impl_t),
pointer :: self
326 call c_f_pointer(handle, self)
327 call c_f_pointer(a_p, a, [self%local_nrows, self%local_ncols])
328 call c_f_pointer(ev_p, ev, [self%na])
329 call c_f_pointer(q_p, q, [self%local_nrows, self%local_ncols])
331 call elpa_eigenvectors_a_h_a_&
333 & (self, a, ev, q, error)
337#ifdef DOUBLE_PRECISION_REAL
340#ifdef SINGLE_PRECISION_REAL
345#ifdef DOUBLE_PRECISION_COMPLEX
348#ifdef SINGLE_PRECISION_COMPLEX
352 subroutine elpa_eigenvectors_d_ptr_&
354 &_c(handle, a_p, ev_p, q_p, error) &
356#ifdef DOUBLE_PRECISION_REAL
357 bind(C, name="elpa_eigenvectors_d_ptr_d")
359#ifdef SINGLE_PRECISION_REAL
360 bind(C, name="elpa_eigenvectors_d_ptr_f")
364#ifdef DOUBLE_PRECISION_COMPLEX
365 bind(C, name="elpa_eigenvectors_d_ptr_dc")
367#ifdef SINGLE_PRECISION_COMPLEX
368 bind(C, name="elpa_eigenvectors_d_ptr_fc")
371 type(c_ptr),
intent(in),
value :: handle, a_p, ev_p, q_p
372#ifdef USE_FORTRAN2008
373 integer(kind=c_int),
optional,
intent(in) :: error
375 integer(kind=c_int),
intent(in) :: error
380 type(elpa_impl_t),
pointer :: self
382 call c_f_pointer(handle, self)
387 call elpa_eigenvectors_d_ptr_&
389 & (self, a_p, ev_p, q_p, error)
392#ifdef HAVE_SKEWSYMMETRIC
420 subroutine elpa_skew_eigenvectors_a_h_a_&
422 & (self, a, ev, q, error)
423 class(elpa_impl_t) :: self
425#ifdef USE_ASSUMED_SIZE
426 math_datatype(kind=c_datatype_kind) :: a(self%local_nrows, *), q(self%local_nrows, *)
428 math_datatype(kind=c_datatype_kind) :: a(self%local_nrows, self%local_ncols)
429 math_datatype(kind=c_datatype_kind) :: q(self%local_nrows, 2*self%local_ncols)
431 real(kind=c_real_datatype) :: ev(self%na)
433#ifdef USE_FORTRAN2008
434 integer,
optional :: error
439 integer(kind=c_int) :: solver
443 call self%get(
"solver", solver,error2)
445 if (error2 .ne. elpa_ok)
then
446 print *,
"Problem setting is_skewsymmetric. Aborting..."
447#ifdef USE_FORTRAN2008
448 if (
present(error))
then
456 if (solver .eq. elpa_solver_1stage)
then
457 call self%autotune_timer%start(
"accumulator")
458#if defined(INCLUDE_ROUTINES)
459 success_l = elpa_solve_skew_evp_&
463 &_impl(self, a, ev, q)
465 call self%autotune_timer%stop(
"accumulator")
467 else if (solver .eq. elpa_solver_2stage)
then
468 call self%autotune_timer%start(
"accumulator")
469#if defined(INCLUDE_ROUTINES)
470 success_l = elpa_solve_skew_evp_&
474 &_impl(self, a, ev, q)
476 call self%autotune_timer%stop(
"accumulator")
479 write(error_unit,
'(a)')
"Unknown solver: Aborting!"
480#ifdef USE_FORTRAN2008
481 if (
present(error))
then
493#ifdef USE_FORTRAN2008
494 if (
present(error))
then
498 error = elpa_error_during_computation
500 else if (.not. success_l)
then
501 write(error_unit,
'(a)')
"ELPA: Error in skew_eigenvectors() and you did not check for errors!"
507 error = elpa_error_during_computation
513#ifdef DOUBLE_PRECISION_REAL
518#ifdef SINGLE_PRECISION_REAL
524 subroutine elpa_skew_eigenvectors_a_h_a_&
526 &_c(handle, a_p, ev_p, q_p, error) &
528#ifdef DOUBLE_PRECISION_REAL
529 bind(C, name="elpa_skew_eigenvectors_a_h_a_d")
531#ifdef SINGLE_PRECISION_REAL
532 bind(C, name="elpa_skew_eigenvectors_a_h_a_f")
536 type(c_ptr),
intent(in),
value :: handle, a_p, ev_p, q_p
537#ifdef USE_FORTRAN2008
538 integer(kind=c_int),
optional,
intent(in) :: error
540 integer(kind=c_int),
intent(in) :: error
543 math_datatype(kind=c_datatype_kind),
pointer :: a(:, :), q(:, :)
544 real(kind=c_real_datatype),
pointer :: ev(:)
545 type(elpa_impl_t),
pointer :: self
547 call c_f_pointer(handle, self)
548 call c_f_pointer(a_p, a, [self%local_nrows, self%local_ncols])
549 call c_f_pointer(ev_p, ev, [self%na])
550 call c_f_pointer(q_p, q, [self%local_nrows, self%local_ncols])
552 call elpa_skew_eigenvectors_a_h_a_&
554 & (self, a, ev, q, error)
583 subroutine elpa_skew_eigenvectors_d_ptr_&
585 & (self, a, ev, q, error)
588 class(elpa_impl_t) :: self
590 type(c_ptr) :: a, q, ev
592#ifdef USE_FORTRAN2008
593 integer,
optional :: error
598 integer(kind=c_int) :: solver
602 call self%get(
"solver", solver,error2)
604 if (error2 .ne. elpa_ok)
then
605 print *,
"Problem setting is_skewsymmetric. Aborting..."
606#ifdef USE_FORTRAN2008
607 if (
present(error))
then
615 if (solver .eq. elpa_solver_1stage)
then
616 call self%autotune_timer%start(
"accumulator")
617#if defined(INCLUDE_ROUTINES)
618 success_l = elpa_solve_skew_evp_&
622 &_impl(self, a, ev, q)
624 call self%autotune_timer%stop(
"accumulator")
626 else if (solver .eq. elpa_solver_2stage)
then
627 call self%autotune_timer%start(
"accumulator")
628#if defined(INCLUDE_ROUTINES)
629 success_l = elpa_solve_skew_evp_&
633 &_impl(self, a, ev, q)
635 call self%autotune_timer%stop(
"accumulator")
638 write(error_unit,
'(a)')
"Unknown solver: Aborting!"
639#ifdef USE_FORTRAN2008
640 if (
present(error))
then
652#ifdef USE_FORTRAN2008
653 if (
present(error))
then
657 error = elpa_error_during_computation
659 else if (.not. success_l)
then
660 write(error_unit,
'(a)')
"ELPA: Error in skew_eigenvectors() and you did not check for errors!"
666 error = elpa_error_during_computation
672#ifdef DOUBLE_PRECISION_REAL
677#ifdef SINGLE_PRECISION_REAL
683 subroutine elpa_skew_eigenvectors_d_ptr_&
685 &_c(handle, a_p, ev_p, q_p, error) &
687#ifdef DOUBLE_PRECISION_REAL
688 bind(C, name="elpa_skew_eigenvectors_d_ptr_d")
690#ifdef SINGLE_PRECISION_REAL
691 bind(C, name="elpa_skew_eigenvectors_d_ptr_f")
695 type(c_ptr),
intent(in),
value :: handle, a_p, ev_p, q_p
696#ifdef USE_FORTRAN2008
697 integer(kind=c_int),
optional,
intent(in) :: error
699 integer(kind=c_int),
intent(in) :: error
704 type(elpa_impl_t),
pointer :: self
706 call c_f_pointer(handle, self)
711 call elpa_skew_eigenvectors_d_ptr_&
713 & (self, a_p, ev_p, q_p, error)
717#endif /* HAVE_SKEWSYMMETRIC */
739 subroutine elpa_eigenvalues_a_h_a_&
741 & (self, a, ev, error)
742 class(elpa_impl_t) :: self
743#ifdef USE_ASSUMED_SIZE
744 math_datatype(kind=c_datatype_kind) :: a(self%local_nrows, *)
746 math_datatype(kind=c_datatype_kind) :: a(self%local_nrows, self%local_ncols)
748 real(kind=c_real_datatype) :: ev(self%na)
749#ifdef USE_FORTRAN2008
750 integer,
optional :: error
755 integer(kind=c_int) :: solver
759 call self%get(
"solver", solver,error2)
760 if (error2 .ne. elpa_ok)
then
761 print *,
"Problem getting solver option. Aborting..."
762#ifdef USE_FORTRAN2008
763 if (
present(error))
then
772 if (solver .eq. elpa_solver_1stage)
then
773 call self%autotune_timer%start(
"accumulator")
774#if defined(INCLUDE_ROUTINES)
775 success_l = elpa_solve_evp_&
781 call self%autotune_timer%stop(
"accumulator")
783 else if (solver .eq. elpa_solver_2stage)
then
784 call self%autotune_timer%start(
"accumulator")
785#if defined(INCLUDE_ROUTINES)
786 success_l = elpa_solve_evp_&
792 call self%autotune_timer%stop(
"accumulator")
795 write(error_unit,
'(a)')
"Unknown solver: Aborting!"
796#ifdef USE_FORTRAN2008
797 if (
present(error))
then
808#ifdef USE_FORTRAN2008
809 if (
present(error))
then
813 error = elpa_error_during_computation
815 else if (.not. success_l)
then
816 write(error_unit,
'(a)')
"ELPA: Error in eigenvalues() and you did not check for errors!"
822 error = elpa_error_during_computation
848 subroutine elpa_eigenvalues_d_ptr_&
850 & (self, a, ev, error)
854 class(elpa_impl_t) :: self
856#ifdef USE_FORTRAN2008
857 integer,
optional :: error
862 integer(kind=c_int) :: solver
866 call self%get(
"solver", solver,error2)
867 if (error2 .ne. elpa_ok)
then
868 print *,
"Problem getting solver option. Aborting..."
869#ifdef USE_FORTRAN2008
870 if (
present(error))
then
879 if (solver .eq. elpa_solver_1stage)
then
880 call self%autotune_timer%start(
"accumulator")
881#if defined(INCLUDE_ROUTINES)
882 success_l = elpa_solve_evp_&
888 call self%autotune_timer%stop(
"accumulator")
890 else if (solver .eq. elpa_solver_2stage)
then
891 call self%autotune_timer%start(
"accumulator")
892#if defined(INCLUDE_ROUTINES)
893 success_l = elpa_solve_evp_&
899 call self%autotune_timer%stop(
"accumulator")
902 write(error_unit,*)
"Unkown solver. Aborting!"
903#ifdef USE_FORTRAN2008
904 if (
present(error))
then
915#ifdef USE_FORTRAN2008
916 if (
present(error))
then
920 error = elpa_error_during_computation
922 else if (.not. success_l)
then
923 write(error_unit,
'(a)')
"ELPA: Error in eigenvalues() and you did not check for errors!"
929 error = elpa_error_during_computation
935#ifdef DOUBLE_PRECISION_REAL
938#ifdef SINGLE_PRECISION_REAL
943#ifdef DOUBLE_PRECISION_COMPLEX
946#ifdef SINGLE_PRECISION_COMPLEX
950 subroutine elpa_eigenvalues_a_h_a_&
952 &_c(handle, a_p, ev_p, error) &
954#ifdef DOUBLE_PRECISION_REAL
955 bind(C, name="elpa_eigenvalues_a_h_a_d")
957#ifdef SINGLE_PRECISION_REAL
958 bind(C, name="elpa_eigenvalues_a_h_a_f")
962#ifdef DOUBLE_PRECISION_COMPLEX
963 bind(C, name="elpa_eigenvalues_a_h_a_dc")
965#ifdef SINGLE_PRECISION_COMPLEX
966 bind(C, name="elpa_eigenvalues_a_h_a_fc")
970 type(c_ptr),
intent(in),
value :: handle, a_p, ev_p
971 integer(kind=c_int),
intent(in) :: error
973 math_datatype(kind=c_datatype_kind),
pointer :: a(:, :)
974 real(kind=c_real_datatype),
pointer :: ev(:)
975 type(elpa_impl_t),
pointer :: self
977 call c_f_pointer(handle, self)
978 call c_f_pointer(a_p, a, [self%local_nrows, self%local_ncols])
979 call c_f_pointer(ev_p, ev, [self%na])
981 call elpa_eigenvalues_a_h_a_&
983 & (self, a, ev, error)
987#ifdef DOUBLE_PRECISION_REAL
990#ifdef SINGLE_PRECISION_REAL
995#ifdef DOUBLE_PRECISION_COMPLEX
998#ifdef SINGLE_PRECISION_COMPLEX
1002 subroutine elpa_eigenvalues_d_ptr_&
1004 &_c(handle, a_p, ev_p, error) &
1006#ifdef DOUBLE_PRECISION_REAL
1007 bind(C, name="elpa_eigenvalues_d_ptr_d")
1009#ifdef SINGLE_PRECISION_REAL
1010 bind(C, name="elpa_eigenvalues_d_ptr_f")
1014#ifdef DOUBLE_PRECISION_COMPLEX
1015 bind(C, name="elpa_eigenvalues_d_ptr_dc")
1017#ifdef SINGLE_PRECISION_COMPLEX
1018 bind(C, name="elpa_eigenvalues_d_ptr_fc")
1022 type(c_ptr),
intent(in),
value :: handle, a_p, ev_p
1023 integer(kind=c_int),
intent(in) :: error
1027 type(elpa_impl_t),
pointer :: self
1029 call c_f_pointer(handle, self)
1033 call elpa_eigenvalues_d_ptr_&
1035 & (self, a_p, ev_p, error)
1038#ifdef HAVE_SKEWSYMMETRIC
1060 subroutine elpa_skew_eigenvalues_a_h_a_&
1062 & (self, a, ev, error)
1063 class(elpa_impl_t) :: self
1064#ifdef USE_ASSUMED_SIZE
1065 math_datatype(kind=c_datatype_kind) :: a(self%local_nrows, *)
1067 math_datatype(kind=c_datatype_kind) :: a(self%local_nrows, self%local_ncols)
1069 real(kind=c_real_datatype) :: ev(self%na)
1070#ifdef USE_FORTRAN2008
1071 integer,
optional :: error
1076 integer(kind=c_int) :: solver
1077 logical :: success_l
1080 call self%get(
"solver", solver,error2)
1082 if (error2 .ne. elpa_ok)
then
1083 print *,
"Problem getting solver option. Aborting..."
1084#ifdef USE_FORTRAN2008
1085 if (
present(error))
then
1094 if (solver .eq. elpa_solver_1stage)
then
1095 call self%autotune_timer%start(
"accumulator")
1096#if defined(INCLUDE_ROUTINES)
1097 success_l = elpa_solve_skew_evp_&
1103 call self%autotune_timer%stop(
"accumulator")
1105 else if (solver .eq. elpa_solver_2stage)
then
1106 call self%autotune_timer%start(
"accumulator")
1107#if defined(INCLUDE_ROUTINES)
1108 success_l = elpa_solve_skew_evp_&
1114 call self%autotune_timer%stop(
"accumulator")
1117 write(error_unit,
'(a)')
"Unknown solver: Aborting!"
1118#ifdef USE_FORTRAN2008
1119 if (
present(error))
then
1130#ifdef USE_FORTRAN2008
1131 if (
present(error))
then
1135 error = elpa_error_during_computation
1137 else if (.not. success_l)
then
1138 write(error_unit,
'(a)')
"ELPA: Error in skew_eigenvalues() and you did not check for errors!"
1144 error = elpa_error_during_computation
1169 subroutine elpa_skew_eigenvalues_d_ptr_&
1171 & (self, a, ev, error)
1174 class(elpa_impl_t) :: self
1175 type(c_ptr) :: a, ev
1176#ifdef USE_FORTRAN2008
1177 integer,
optional :: error
1182 integer(kind=c_int) :: solver
1183 logical :: success_l
1186 call self%get(
"solver", solver,error2)
1188 if (error2 .ne. elpa_ok)
then
1189 print *,
"Problem getting solver option. Aborting..."
1190#ifdef USE_FORTRAN2008
1191 if (
present(error))
then
1200 if (solver .eq. elpa_solver_1stage)
then
1201 call self%autotune_timer%start(
"accumulator")
1202#if defined(INCLUDE_ROUTINES)
1203 success_l = elpa_solve_skew_evp_&
1209 call self%autotune_timer%stop(
"accumulator")
1211 else if (solver .eq. elpa_solver_2stage)
then
1212 call self%autotune_timer%start(
"accumulator")
1213#if defined(INCLUDE_ROUTINES)
1214 success_l = elpa_solve_skew_evp_&
1220 call self%autotune_timer%stop(
"accumulator")
1223 write(error_unit,
'(a)')
"Unknown solver: Aborting!"
1224#ifdef USE_FORTRAN2008
1225 if (
present(error))
then
1236#ifdef USE_FORTRAN2008
1237 if (
present(error))
then
1241 error = elpa_error_during_computation
1243 else if (.not. success_l)
then
1244 write(error_unit,
'(a)')
"ELPA: Error in skew_eigenvalues() and you did not check for errors!"
1250 error = elpa_error_during_computation
1257#ifdef DOUBLE_PRECISION_REAL
1262#ifdef SINGLE_PRECISION_REAL
1268 subroutine elpa_skew_eigenvalues_a_h_a_&
1270 &_c(handle, a_p, ev_p, error) &
1272#ifdef DOUBLE_PRECISION_REAL
1273 bind(C, name="elpa_skew_eigenvalues_a_h_a_d")
1275#ifdef SINGLE_PRECISION_REAL
1276 bind(C, name="elpa_skew_eigenvalues_a_h_a_f")
1279 type(c_ptr),
intent(in),
value :: handle, a_p, ev_p
1280 integer(kind=c_int),
intent(in) :: error
1282 math_datatype(kind=c_datatype_kind),
pointer :: a(:, :)
1283 real(kind=c_real_datatype),
pointer :: ev(:)
1284 type(elpa_impl_t),
pointer :: self
1286 call c_f_pointer(handle, self)
1287 call c_f_pointer(a_p, a, [self%local_nrows, self%local_ncols])
1288 call c_f_pointer(ev_p, ev, [self%na])
1290 call elpa_skew_eigenvalues_a_h_a_&
1292 & (self, a, ev, error)
1296#ifdef DOUBLE_PRECISION_REAL
1301#ifdef SINGLE_PRECISION_REAL
1307 subroutine elpa_skew_eigenvalues_d_ptr_&
1309 &_c(handle, a_p, ev_p, error) &
1311#ifdef DOUBLE_PRECISION_REAL
1312 bind(C, name="elpa_skew_eigenvalues_d_ptr_d")
1314#ifdef SINGLE_PRECISION_REAL
1315 bind(C, name="elpa_skew_eigenvalues_d_ptr_f")
1318 type(c_ptr),
intent(in),
value :: handle, a_p, ev_p
1319 integer(kind=c_int),
intent(in) :: error
1323 type(elpa_impl_t),
pointer :: self
1325 call c_f_pointer(handle, self)
1329 call elpa_skew_eigenvalues_d_ptr_&
1331 & (self, a_p, ev_p, error)
1333#endif /* REALCASE */
1334#endif /* HAVE_SKEWSYMMETRIC */