Commit ac061bca authored by Lorenz Huedepohl's avatar Lorenz Huedepohl
Browse files

Adapt legacy interface to new API

The legacy API is has been (internally) ported to use the new interface.
The intent is that users of the legacy API do not have to change their
codes.

Next step is to completely adapt the .gitlab-ci.yml file
parent 8ed932f5
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
......@@ -547,8 +547,8 @@ dnl Deal with --with-fixed-[real|complex]-kernel arguments
m4_foreach_w([elpa_m4_kind],[real complex],[
AC_ARG_WITH([fixed-]elpa_m4_kind[-kernel], m4_expand([AS_HELP_STRING([--with-fixed-]elpa_m4_kind[-kernel]=KERNEL,
[compile with only a single specific ]elpa_m4_kind[ kernel. Available kernels are:]
m4_expand(elpa_m4_[]elpa_m4_kind[]_kernels))]),
[fixed_]elpa_m4_kind[_kernel="$withval"],[fixed_]elpa_m4_kind[_kernel=""])
m4_foreach_w([elpa_m4_kernel],m4_expand(elpa_m4_[]elpa_m4_kind[]_kernels),[m4_bpatsubst(elpa_m4_kernel,elpa_m4_kind[]_,[]) ]))]),
[fixed_]elpa_m4_kind[_kernel="]elpa_m4_kind[_$withval"],[fixed_]elpa_m4_kind[_kernel=""])
if test -n "$fixed_[]elpa_m4_kind[]_kernel" ; then
m4_foreach_w([elpa_m4_otherkernel],m4_expand(elpa_m4_[]elpa_m4_kind[]_kernels),[
if test "$fixed_]elpa_m4_kind[_kernel" = "]elpa_m4_otherkernel[" ; then
......
......@@ -29,9 +29,9 @@ elpa/elpa_generated_fortran_interfaces.h: $(wildcard $(top_srcdir)/src/elpa2/ker
$(call extract_interface,#!f>)
src/fortran_constants.X90: $(top_srcdir)/src/fortran_constants.h
$(CPP) $(CPPFLAGS) -I$(top_builddir)/ -I$(top_srcdir)/ -I. $< -o $@_ || { rm -f $@; exit 1; }
awk '/!ELPA_C_DEFINE/ {gsub(/!ELPA_C_DEFINE/, "\n"); gsub(/NEWLINE/, "\n"); print;}' < $@_ > $@ || { rm -f $@; exit 1; }
rm $@_
@$(CPP) $(CPPFLAGS) -I$(top_builddir)/ -I$(top_srcdir)/ -I. $< -o $@_ || { rm -f $@; exit 1; }
@awk '/!ELPA_C_DEFINE/ {gsub(/!ELPA_C_DEFINE/, "\n"); gsub(/NEWLINE/, "\n"); print;}' < $@_ > $@ || { rm -f $@; exit 1; }
@rm $@_
generated_headers= config-f90.h elpa/elpa_generated.h test/shared/generated.h elpa/elpa_generated_fortran_interfaces.h src/fortran_constants.X90
......
......@@ -286,11 +286,10 @@ module ELPA1_AUXILIARY
#include "../../general/precision_macros.h"
function elpa_cholesky_real_double(na, a, lda, nblk, matrixCols, mpi_comm_rows, mpi_comm_cols, &
wantDebug) result(success)
function elpa_cholesky_real_double(na, a, lda, nblk, matrixCols, mpi_comm_rows, mpi_comm_cols, &
wantDebug) result(success)
#include "./elpa_cholesky_template_legacy.X90"
end function elpa_cholesky_real_double
end function
#ifdef WANT_SINGLE_PRECISION_REAL
#define REALCASE 1
......@@ -314,11 +313,10 @@ module ELPA1_AUXILIARY
!> \param wantDebug logical, more debug information on failure
!> \param succes logical, reports success or failure
function elpa_cholesky_real_single(na, a, lda, nblk, matrixCols, mpi_comm_rows, mpi_comm_cols, &
function elpa_cholesky_real_single(na, a, lda, nblk, matrixCols, mpi_comm_rows, mpi_comm_cols, &
wantDebug) result(success)
#include "./elpa_cholesky_template_legacy.X90"
end function elpa_cholesky_real_single
end function
#endif /* WANT_SINGLE_PRECSION_REAL */
......@@ -339,9 +337,9 @@ module ELPA1_AUXILIARY
!> \param mpi_comm_cols MPI communicator for columns
!> \param wantDebug logical, more debug information on failure
!> \result succes logical, reports success or failure
function elpa_invert_trm_real_double(na, a, lda, nblk, matrixCols, mpi_comm_rows, mpi_comm_cols, wantDebug) result(success)
function elpa_invert_trm_real_double(na, a, lda, nblk, matrixCols, mpi_comm_rows, mpi_comm_cols, wantDebug) result(success)
#include "./elpa_invert_trm_legacy.X90"
end function elpa_invert_trm_real_double
end function
#if WANT_SINGLE_PRECISION_REAL
#define REALCASE 1
......@@ -364,7 +362,7 @@ module ELPA1_AUXILIARY
!> \result succes logical, reports success or failure
function elpa_invert_trm_real_single(na, a, lda, nblk, matrixCols, mpi_comm_rows, mpi_comm_cols, wantDebug) result(success)
#include "./elpa_invert_trm_legacy.X90"
end function elpa_invert_trm_real_single
end function
#endif /* WANT_SINGLE_PRECISION_REAL */
......@@ -389,10 +387,8 @@ module ELPA1_AUXILIARY
!> \param wantDebug logical, more debug information on failure
!> \result succes logical, reports success or failure
function elpa_cholesky_complex_double(na, a, lda, nblk, matrixCols, mpi_comm_rows, mpi_comm_cols, wantDebug) result(success)
#include "./elpa_cholesky_template_legacy.X90"
end function elpa_cholesky_complex_double
end function
#ifdef WANT_SINGLE_PRECISION_COMPLEX
......@@ -416,10 +412,8 @@ module ELPA1_AUXILIARY
!> \param wantDebug logical, more debug information on failure
!> \result succes logical, reports success or failure
function elpa_cholesky_complex_single(na, a, lda, nblk, matrixCols, mpi_comm_rows, mpi_comm_cols, wantDebug) result(success)
#include "./elpa_cholesky_template_legacy.X90"
end function elpa_cholesky_complex_single
end function
#endif /* WANT_SINGLE_PRECISION_COMPLEX */
......@@ -442,9 +436,9 @@ module ELPA1_AUXILIARY
!> \param wantDebug logical, more debug information on failure
!> \result succes logical, reports success or failure
function elpa_invert_trm_complex_double(na, a, lda, nblk, matrixCols, mpi_comm_rows, mpi_comm_cols, wantDebug) result(success)
function elpa_invert_trm_complex_double(na, a, lda, nblk, matrixCols, mpi_comm_rows, mpi_comm_cols, wantDebug) result(success)
#include "./elpa_invert_trm_legacy.X90"
end function elpa_invert_trm_complex_double
end function
#ifdef WANT_SINGLE_PRECISION_COMPLEX
#define COMPLEXCASE 1
......@@ -468,7 +462,7 @@ module ELPA1_AUXILIARY
function elpa_invert_trm_complex_single(na, a, lda, nblk, matrixCols, mpi_comm_rows, mpi_comm_cols, wantDebug) result(success)
#include "./elpa_invert_trm_legacy.X90"
end function elpa_invert_trm_complex_single
end function
#endif /* WANT_SINGE_PRECISION_COMPLEX */
......
......@@ -68,7 +68,7 @@ function elpa_solve_evp_&
#endif
use iso_c_binding
use elpa_mpi
use elpa_type
use elpa
implicit none
integer(kind=c_int), intent(in) :: na, nev, lda, ldq, nblk, matrixCols, mpi_comm_rows, &
......@@ -103,7 +103,7 @@ function elpa_solve_evp_&
integer(kind=c_int) :: successInternal
type(elpa_t) :: e
class(elpa_t), pointer :: e
call timer%start("elpa_solve_evp_&
&MATH_DATATYPE&
&_1stage_&
......@@ -120,7 +120,7 @@ function elpa_solve_evp_&
return
endif
e = elpa_allocate()
e => elpa_allocate()
call e%set("na", na)
call e%set("nev", nev)
......@@ -185,7 +185,7 @@ function elpa_solve_evp_&
time_evp_solve = e%get_double("time_evp_solve")
time_evp_back = e%get_double("time_evp_back")
endif
call e%destroy()
call elpa_deallocate(e)
call elpa_uninit()
......
......@@ -43,17 +43,14 @@
! the original distribution, the GNU Lesser General Public License.
#include "../../general/sanity.X90"
use elpa_type
! use elpa1_compute
! use elpa_utilities
use elpa_mpi
use elpa
#ifdef HAVE_DETAILED_TIMINGS
use timings
use timings
#else
use timings_dummy
use timings_dummy
#endif
use precision
implicit none
use precision
implicit none
integer(kind=ik) :: na, lda, nblk, matrixCols, mpi_comm_rows, mpi_comm_cols
#if REALCASE == 1
......@@ -70,26 +67,12 @@
complex(kind=COMPLEX_DATATYPE) :: a(lda,matrixCols)
#endif
#endif
! integer(kind=ik) :: my_prow, my_pcol, np_rows, np_cols, mpierr
integer(kind=ik) :: nev
! integer(kind=ik) :: l_cols, l_rows, l_col1, l_row1, l_colx, l_rowx
! integer(kind=ik) :: n, nc, i, info
! integer(kind=ik) :: lcs, lce, lrs, lre
! integer(kind=ik) :: tile_size, l_rows_tile, l_cols_tile
!#if REALCASE == 1
! real(kind=REAL_DATATYPE), allocatable :: tmp1(:), tmp2(:,:), tmatr(:,:), tmatc(:,:)
!#endif
!#if COMPLEXCASE == 1
! complex(kind=COMPLEX_DATATYPE), allocatable :: tmp1(:), tmp2(:,:), tmatr(:,:), tmatc(:,:)
!#endif
integer(kind=ik) :: nev
logical, intent(in) :: wantDebug
logical :: success
integer(kind=ik) :: successInternal
! integer(kind=ik) :: istat
! character(200) :: errorMessage
type(elpa_t) :: e
class(elpa_t), pointer :: e
call timer%start("elpa_cholesky_&
&MATH_DATATYPE&
......@@ -105,7 +88,7 @@
return
endif
e = elpa_allocate()
e => elpa_allocate()
call e%set("na", na)
call e%set("nev", nev)
......@@ -131,7 +114,7 @@
else
success =.true.
endif
call e%destroy()
call elpa_deallocate(e)
call elpa_uninit()
......
......@@ -53,7 +53,7 @@
#include "../../general/sanity.X90"
use precision
use elpa_type
use elpa
! use elpa1_compute
! use elpa_utilities
use elpa_mpi
......@@ -96,7 +96,7 @@
! character(200) :: errorMessage
integer(kind=iK) :: successInternal
type(elpa_t) :: e
class(elpa_t), pointer :: e
call timer%start("elpa_invert_trm_&
&MATH_DATATYPE&
......@@ -112,7 +112,7 @@
return
endif
e = elpa_allocate()
e => elpa_allocate()
call e%set("na", na)
call e%set("local_nrows", lda)
......@@ -137,7 +137,7 @@
else
success =.true.
endif
call e%destroy()
call elpa_deallocate(e)
call elpa_uninit()
......
......@@ -54,7 +54,7 @@
#include "../../general/sanity.X90"
use elpa_type
use elpa
#ifdef HAVE_DETAILED_TIMINGS
use timings
#else
......@@ -101,7 +101,7 @@
! character(200) :: errorMessage
logical :: success
integer(kind=ik) :: successInternal
type(elpa_t) :: e
class(elpa_t), pointer :: e
call timer%start("elpa_mult_at_b_&
&MATH_DATATYPE&
......@@ -125,7 +125,7 @@
return
endif
e = elpa_allocate()
e => elpa_allocate()
call e%set("na", na)
call e%set("local_nrows", lda)
......@@ -149,7 +149,7 @@
success = .false.
return
endif
call e%destroy()
call elpa_deallocate(e)
call elpa_uninit()
......
......@@ -75,7 +75,7 @@
logical, intent(in) :: wantDebug
logical :: success
integer(kind=iK) :: successInternal
type(elpa_t) :: elpa
class(elpa_t), pointer :: obj
call timer%start("elpa_solve_tridi_&
&PRECISION&
......@@ -88,24 +88,24 @@
success = .false.
endif
elpa = elpa_allocate()
obj => elpa_allocate()
call elpa%set("na", na)
call elpa%set("nev", nev)
call elpa%set("local_nrows", ldq)
call elpa%set("local_ncols", matrixCols)
call elpa%set("nblk", nblk)
call obj%set("na", na)
call obj%set("nev", nev)
call obj%set("local_nrows", ldq)
call obj%set("local_ncols", matrixCols)
call obj%set("nblk", nblk)
call elpa%set("mpi_comm_rows", mpi_comm_rows)
call elpa%set("mpi_comm_cols", mpi_comm_cols)
call obj%set("mpi_comm_rows", mpi_comm_rows)
call obj%set("mpi_comm_cols", mpi_comm_cols)
if (elpa%setup() .ne. ELPA_OK) then
if (obj%setup() .ne. ELPA_OK) then
print *, "Cannot setup ELPA instance"
success = .false.
return
endif
call elpa%solve_tridi(d(1:na), e(1:na), q(1:ldq,1:matrixCols), successInternal)
call obj%solve_tridi(d(1:na), e(1:na), q(1:ldq,1:matrixCols), successInternal)
if (successInternal .ne. ELPA_OK) then
print *, "Cannot run solve_tridi"
......@@ -115,7 +115,7 @@
else
success =.true.
endif
call elpa%destroy()
call elpa_deallocate(obj)
call elpa_uninit()
......
......@@ -65,8 +65,8 @@
!> Synopsis: print_available_elpa2_kernels
!>
!> \author A. Marek (MPCDF)
program print_available_elpa2_kernels
program print_available_elpa2_kernels
use precision
use elpa
......@@ -74,6 +74,7 @@ program print_available_elpa2_kernels
integer(kind=ik) :: i
class(elpa_t), pointer :: e
integer :: option
if (elpa_init(CURRENT_API_VERSION) /= ELPA_OK) then
print *, "Unsupported ELPA API Version"
......@@ -108,7 +109,7 @@ program print_available_elpa2_kernels
print *, " AVX kernels are optimized for FMA (AVX2)"
#endif
print *
call e%print_options("real_kernel")
call print_options(e, "real_kernel")
print *
print *
......@@ -126,10 +127,25 @@ program print_available_elpa2_kernels
print *, " AVX kernels are optimized for FMA (AVX2)"
#endif
print *
call e%print_options("complex_kernel")
call print_options(e, "complex_kernel")
print *
print *
call elpa_deallocate(e)
contains
subroutine print_options(e, option_name)
class(elpa_t), intent(in) :: e
character(len=*), intent(in) :: option_name
integer :: i, option
do i = 0, elpa_option_cardinality(option_name) - 1
option = elpa_option_enumerate(option_name, i)
if (e%can_set(option_name, option) == ELPA_OK) then
print *, " ", elpa_int_value_to_string(option_name, option)
endif
end do
end subroutine
end program print_available_elpa2_kernels
......@@ -69,7 +69,7 @@
use timings_dummy
#endif
use iso_c_binding
use elpa_type
use elpa
use elpa_mpi
implicit none
......@@ -95,7 +95,7 @@
logical :: success
integer(kind=c_int) :: successInternal
type(elpa_t) :: e
class(elpa_t), pointer :: e
call timer%start("solve_evp_&
&MATH_DATATYPE&
......@@ -113,7 +113,7 @@
return
endif
e = elpa_allocate()
e => elpa_allocate()
call e%set("na", na)
call e%set("nev", nev)
......@@ -215,12 +215,12 @@
endif
if (elpa_print_times) then
time_evp_fwd = e%get("time_evp_fwd")
time_evp_solve = e%get("time_evp_solve")
time_evp_back = e%get("time_evp_back")
time_evp_fwd = e%get_double("time_evp_fwd")
time_evp_solve = e%get_double("time_evp_solve")
time_evp_back = e%get_double("time_evp_back")
endif
call e%destroy()
call elpa_deallocate(e)
call elpa_uninit()
......
......@@ -60,128 +60,352 @@ module elpa2_utilities
integer(kind=ik), parameter :: number_of_real_kernels = ELPA_2STAGE_NUMBER_OF_REAL_KERNELS
integer(kind=ik), parameter :: number_of_complex_kernels = ELPA_2STAGE_NUMBER_OF_COMPLEX_KERNELS
#ifdef WITH_KERNEL_REAL_GENERIC
#ifdef WITH_REAL_GENERIC_KERNEL
integer(kind=ik), parameter :: REAL_ELPA_KERNEL_GENERIC = ELPA_2STAGE_REAL_GENERIC
#endif
#ifdef WITH_KERNEL_REAL_GENERIC_SIMPLE
#ifdef WITH_REAL_GENERIC_SIMPLE_KERNEL
integer(kind=ik), parameter :: REAL_ELPA_KERNEL_GENERIC_SIMPLE = ELPA_2STAGE_REAL_GENERIC_SIMPLE
#endif
#ifdef WITH_KERNEL_REAL_BGP
#ifdef WITH_REAL_BGP_KERNEL
integer(kind=ik), parameter :: REAL_ELPA_KERNEL_BGP = ELPA_2STAGE_REAL_BGP
#endif
#ifdef WITH_KERNEL_REAL_BGQ
#ifdef WITH_REAL_BGQ_KERNEL
integer(kind=ik), parameter :: REAL_ELPA_KERNEL_BGQ = ELPA_2STAGE_REAL_BGQ
#endif
#ifdef WITH_KERNEL_REAL_SSE
#ifdef WITH_REAL_SSE_KERNEL
integer(kind=ik), parameter :: REAL_ELPA_KERNEL_SSE = ELPA_2STAGE_REAL_SSE
#endif
#ifdef WITH_KERNEL_REAL_SSE_BLOCK2
#ifdef WITH_REAL_SSE_BLOCK_KERNEL2
integer(kind=ik), parameter :: REAL_ELPA_KERNEL_SSE_BLOCK2 = ELPA_2STAGE_REAL_SSE_BLOCK2
#endif
#ifdef WITH_KERNEL_REAL_SSE_BLOCK4
#ifdef WITH_REAL_SSE_BLOCK_KERNEL4
integer(kind=ik), parameter :: REAL_ELPA_KERNEL_SSE_BLOCK4 = ELPA_2STAGE_REAL_SSE_BLOCK4
#endif
#ifdef WITH_KERNEL_REAL_SSE_BLOCK6
#ifdef WITH_REAL_SSE_BLOCK_KERNEL6
integer(kind=ik), parameter :: REAL_ELPA_KERNEL_SSE_BLOCK6 = ELPA_2STAGE_REAL_SSE_BLOCK6
#endif
#ifdef WITH_KERNEL_REAL_AVX_BLOCK2
#ifdef WITH_REAL_AVX_BLOCK_KERNEL2
integer(kind=ik), parameter :: REAL_ELPA_KERNEL_AVX_BLOCK2 = ELPA_2STAGE_REAL_AVX_BLOCK2
#endif
#ifdef WITH_KERNEL_REAL_AVX_BLOCK4
#ifdef WITH_REAL_AVX_BLOCK_KERNEL4
integer(kind=ik), parameter :: REAL_ELPA_KERNEL_AVX_BLOCK4 = ELPA_2STAGE_REAL_AVX_BLOCK4
#endif
#ifdef WITH_KERNEL_REAL_AVX_BLOCK6
#ifdef WITH_REAL_AVX_BLOCK_KERNEL6
integer(kind=ik), parameter :: REAL_ELPA_KERNEL_AVX_BLOCK6 = ELPA_2STAGE_REAL_AVX_BLOCK6
#endif
#ifdef WITH_KERNEL_REAL_AVX2_BLOCK2
#ifdef WITH_REAL_AVX_KERNEL2_BLOCK2
integer(kind=ik), parameter :: REAL_ELPA_KERNEL_AVX2_BLOCK2 = ELPA_2STAGE_REAL_AVX2_BLOCK2
#endif
#ifdef WITH_KERNEL_REAL_AVX2_BLOCK4
#ifdef WITH_REAL_AVX_KERNEL2_BLOCK4
integer(kind=ik), parameter :: REAL_ELPA_KERNEL_AVX2_BLOCK4 = ELPA_2STAGE_REAL_AVX2_BLOCK4
#endif
#ifdef WITH_KERNEL_REAL_AVX2_BLOCK6
#ifdef WITH_REAL_AVX_KERNEL2_BLOCK6
integer(kind=ik), parameter :: REAL_ELPA_KERNEL_AVX2_BLOCK6 = ELPA_2STAGE_REAL_AVX2_BLOCK6
#endif
#ifdef WITH_KERNEL_REAL_AVX512_BLOCK2
#ifdef WITH_REAL_AVX_KERNEL512_BLOCK2
integer(kind=ik), parameter :: REAL_ELPA_KERNEL_AVX512_BLOCK2 = ELPA_2STAGE_REAL_AVX512_BLOCK2
#endif
#ifdef WITH_KERNEL_REAL_AVX512_BLOCK4
#ifdef WITH_REAL_AVX_KERNEL512_BLOCK4
integer(kind=ik), parameter :: REAL_ELPA_KERNEL_AVX512_BLOCK4 = ELPA_2STAGE_REAL_AVX512_BLOCK4
#endif
#ifdef WITH_KERNEL_REAL_AVX512_BLOCK6
#ifdef WITH_REAL_AVX_KERNEL512_BLOCK6
integer(kind=ik), parameter :: REAL_ELPA_KERNEL_AVX512_BLOCK6 = ELPA_2STAGE_REAL_AVX512_BLOCK6
#endif
#ifdef WITH_KERNEL_REAL_GPU
#ifdef WITH_GPU_KERNEL
integer(kind=ik), parameter :: REAL_ELPA_KERNEL_GPU = ELPA_2STAGE_REAL_GPU
#endif
integer(kind=ik), parameter :: DEFAULT_REAL_ELPA_KERNEL = ELPA_2STAGE_REAL_DEFAULT
#ifdef WITH_KERNEL_COMPLEX_GENERIC
#ifdef WITH_COMPLEX_GENERIC_KERNEL
integer(kind=ik), parameter :: COMPLEX_ELPA_KERNEL_GENERIC = ELPA_2STAGE_COMPLEX_GENERIC
#endif
#ifdef WITH_KERNEL_COMPLEX_GENERIC_SIMPLE
#ifdef WITH_COMPLEX_GENERIC_SIMPLE_KERNEL
integer(kind=ik), parameter :: COMPLEX_ELPA_KERNEL_GENERIC_SIMPLE = ELPA_2STAGE_COMPLEX_GENERIC_SIMPLE
#endif
#ifdef WITH_KERNEL_COMPLEX_BGP
#ifdef WITH_COMPLEX_BGP_KERNEL
integer(kind=ik), parameter :: COMPLEX_ELPA_KERNEL_BGP = ELPA_2STAGE_COMPLEX_BGP
#endif
#ifdef WITH_KERNEL_COMPLEX_BGQ
#ifdef WITH_COMPLEX_BGQ_KERNEL
integer(kind=ik), parameter :: COMPLEX_ELPA_KERNEL_BGQ = ELPA_2STAGE_COMPLEX_BGQ
#endif
#ifdef WITH_KERNEL_COMPLEX_SSE
#ifdef WITH_COMPLEX_SSE_KERNEL
integer(kind=ik), parameter :: COMPLEX_ELPA_KERNEL_SSE = ELPA_2STAGE_COMPLEX_SSE
#endif
#ifdef WITH_KERNEL_COMPLEX_SSE_BLOCK1
#ifdef WITH_COMPLEX_SSE_BLOCK_KERNEL1
integer(kind=ik), parameter :: COMPLEX_ELPA_KERNEL_SSE_BLOCK1 = ELPA_2STAGE_COMPLEX_SSE_BLOCK1
#endif
#ifdef WITH_KERNEL_COMPLEX_SSE_BLOCK2
#ifdef WITH_COMPLEX_SSE_BLOCK_KERNEL2
integer(kind=ik), parameter :: COMPLEX_ELPA_KERNEL_SSE_BLOCK2 = ELPA_2STAGE_COMPLEX_SSE_BLOCK2
#endif
#ifdef WITH_KERNEL_COMPLEX_AVX_BLOCK1
#ifdef WITH_COMPLEX_AVX_BLOCK_KERNEL1
integer(kind=ik), parameter :: COMPLEX_ELPA_KERNEL_AVX_BLOCK1 = ELPA_2STAGE_COMPLEX_AVX_BLOCK1
#endif
#ifdef WITH_KERNEL_COMPLEX_AVX_BLOCK2
#ifdef WITH_COMPLEX_AVX_BLOCK_KERNEL2
integer(kind=ik), parameter :: COMPLEX_ELPA_KERNEL_AVX_BLOCK2 = ELPA_2STAGE_COMPLEX_AVX_BLOCK2
#endif
#ifdef WITH_KERNEL_COMPLEX_AVX2_BLOCK1
#ifdef WITH_COMPLEX_AVX_KERNEL2_BLOCK1
integer(kind=ik), parameter :: COMPLEX_ELPA_KERNEL_AVX2_BLOCK1 = ELPA_2STAGE_COMPLEX_AVX2_BLOCK1
#endif
#ifdef WITH_KERNEL_COMPLEX_AVX2_BLOCK2
#ifdef WITH_COMPLEX_AVX_KERNEL2_BLOCK2
integer(kind=ik), parameter :: COMPLEX_ELPA_KERNEL_AVX2_BLOCK2 = ELPA_2STAGE_COMPLEX_AVX2_BLOCK2
#endif
#ifdef WITH_KERNEL_COMPLEX_AVX512_BLOCK1
#ifdef WITH_COMPLEX_AVX_KERNEL512_BLOCK1
integer(kind=ik), parameter :: COMPLEX_ELPA_KERNEL_AVX512_BLOCK1 = ELPA_2STAGE_COMPLEX_AVX512_BLOCK1
#endif
#ifdef WITH_KERNEL_COMPLEX_AVX512_BLOCK2
#ifdef WITH_COMPLEX_AVX_KERNEL512_BLOCK2
integer(kind=ik), parameter :: COMPLEX_ELPA_KERNEL_AVX512_BLOCK2 = ELPA_2STAGE_COMPLEX_AVX512_BLOCK2
#endif
#ifdef WITH_KERNEL_COMPLEX_GPU
#ifdef WITH_GPU_KERNEL
integer(kind=ik), parameter :: COMPLEX_ELPA_KERNEL_GPU = ELPA_2STAGE_COMPLEX_GPU
#endif
integer(kind=ik), parameter :: DEFAULT_COMPLEX_ELPA_KERNEL = ELPA_2STAGE_COMPLEX_DEFAULT
character(35), parameter, dimension(number_of_real_kernels) :: &
REAL_ELPA_KERNEL_NAMES = (/"REAL_ELPA_KERNEL_GENERIC ", &
"REAL_ELPA_KERNEL_GENERIC_SIMPLE ", &
"REAL_ELPA_KERNEL_BGP ", &
"REAL_ELPA_KERNEL_BGQ ", &
"REAL_ELPA_KERNEL_SSE ", &
"REAL_ELPA_KERNEL_SSE_BLOCK2 ", &
"REAL_ELPA_KERNEL_SSE_BLOCK4 ", &
"REAL_ELPA_KERNEL_SSE_BLOCK6 ", &