diff --git a/Makefile.am b/Makefile.am
index f2dace98eb9bf1c10c59cd719690b5ca668196d3..153ba9a30a8113e6a6de2e6a6f988dbe305686be 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -465,77 +465,77 @@ endif
 
 if ENABLE_LEGACY
 noinst_PROGRAMS += \
-  elpa1_test_real@SUFFIX@ \
-  elpa1_test_complex@SUFFIX@ \
-  elpa2_test_real@SUFFIX@ \
-  elpa2_test_real_default@SUFFIX@ \
-  elpa2_test_real_qr@SUFFIX@ \
-  elpa2_test_real_api@SUFFIX@ \
-  elpa2_test_complex@SUFFIX@ \
-  elpa2_test_complex_default@SUFFIX@ \
-  elpa2_test_complex_api@SUFFIX@ \
-  elpa_driver_real@SUFFIX@ \
-  elpa_driver_complex@SUFFIX@ \
-  elpa1_real_toeplitz@SUFFIX@ \
-  elpa1_real_transpose_multiply@SUFFIX@ \
-  elpa1_complex_transpose_multiply@SUFFIX@ \
-  elpa1_real_cholesky@SUFFIX@ \
-  elpa1_real_invert_trm@SUFFIX@ \
-  elpa1_complex_cholesky@SUFFIX@ \
-  elpa1_complex_invert_trm@SUFFIX@ \
-  elpa1_test_real_with_c@SUFFIX@ \
-  elpa1_test_real_c_version@SUFFIX@ \
-  elpa1_test_complex_c_version@SUFFIX@ \
-  elpa2_test_real_c_version@SUFFIX@ \
-  elpa2_test_complex_c_version@SUFFIX@ \
-  elpa_driver_real_c_version@SUFFIX@ \
-  elpa_driver_complex_c_version@SUFFIX@
+  legacy_real_1stage@SUFFIX@ \
+  legacy_complex_1stage@SUFFIX@ \
+  legacy_real_2stage@SUFFIX@ \
+  legacy_real_2stage_default@SUFFIX@ \
+  legacy_real_2stage_qr@SUFFIX@ \
+  legacy_real_2stage_api@SUFFIX@ \
+  legacy_complex_2stage@SUFFIX@ \
+  legacy_complex_2stage_default@SUFFIX@ \
+  legacy_complex_2stage_api@SUFFIX@ \
+  legacy_real_driver@SUFFIX@ \
+  legacy_complex_driver@SUFFIX@ \
+  legacy_real_toeplitz@SUFFIX@ \
+  legacy_real_transpose_multiply@SUFFIX@ \
+  legacy_complex_transpose_multiply@SUFFIX@ \
+  legacy_real_cholesky@SUFFIX@ \
+  legacy_real_invert_trm@SUFFIX@ \
+  legacy_complex_cholesky@SUFFIX@ \
+  legacy_complex_invert_trm@SUFFIX@ \
+  legacy_real_1stage_with_c@SUFFIX@ \
+  legacy_real_1stage_c_version@SUFFIX@ \
+  legacy_complex_1stage_c_version@SUFFIX@ \
+  legacy_real_2stage_c_version@SUFFIX@ \
+  legacy_complex_2stage_c_version@SUFFIX@ \
+  legacy_real_driver_c_version@SUFFIX@ \
+  legacy_complex_driver_c_version@SUFFIX@
 
 if WANT_SINGLE_PRECISION_COMPLEX
 noinst_PROGRAMS += \
-  elpa1_test_complex_single_precision@SUFFIX@ \
-  elpa2_test_complex_single_precision@SUFFIX@ \
-  elpa2_test_complex_default_single_precision@SUFFIX@ \
-  elpa1_complex_transpose_multiply_single_precision@SUFFIX@ \
-  elpa_driver_complex_single_precision@SUFFIX@ \
-  elpa1_complex_cholesky_single_precision@SUFFIX@ \
-  elpa1_complex_invert_trm_single_precision@SUFFIX@ \
-  elpa2_test_complex_api_single_precision@SUFFIX@ \
-  elpa_driver_complex_c_version_single_precision@SUFFIX@
+  legacy_single_complex_1stage@SUFFIX@ \
+  legacy_single_complex_2stage@SUFFIX@ \
+  legacy_single_complex_2stage_default@SUFFIX@ \
+  legacy_single_complex_transpose_multiply@SUFFIX@ \
+  legacy_single_complex_driver@SUFFIX@ \
+  legacy_single_complex_cholesky@SUFFIX@ \
+  legacy_single_complex_invert_trm@SUFFIX@ \
+  legacy_single_complex_2stage_api@SUFFIX@ \
+  legacy_single_complex_driver_c_version@SUFFIX@
 endif
 
 if WANT_SINGLE_PRECISION_REAL
 noinst_PROGRAMS += \
-  elpa1_test_real_single_precision@SUFFIX@ \
-  elpa2_test_real_single_precision@SUFFIX@ \
-  elpa2_test_real_default_single_precision@SUFFIX@ \
-  elpa2_test_real_qr_single_precision@SUFFIX@ \
-  elpa2_test_real_api_single_precision@SUFFIX@ \
-  elpa_driver_real_single_precision@SUFFIX@ \
-  elpa1_real_transpose_multiply_single_precision@SUFFIX@ \
-  elpa1_real_cholesky_single_precision@SUFFIX@ \
-  elpa1_real_invert_trm_single_precision@SUFFIX@ \
-  elpa_driver_real_c_version_single_precision@SUFFIX@ \
-  elpa1_real_toeplitz_single_precision@SUFFIX@
+  legacy_single_real_1stage@SUFFIX@ \
+  legacy_single_real_2stage@SUFFIX@ \
+  legacy_single_real_2stage_default@SUFFIX@ \
+  legacy_single_real_2stage_qr@SUFFIX@ \
+  legacy_single_real_2stage_api@SUFFIX@ \
+  legacy_single_real_driver@SUFFIX@ \
+  legacy_single_real_transpose_multiply@SUFFIX@ \
+  legacy_single_real_cholesky@SUFFIX@ \
+  legacy_single_real_invert_trm@SUFFIX@ \
+  legacy_single_real_driver_c_version@SUFFIX@ \
+  legacy_single_real_toeplitz@SUFFIX@
 endif
 
 if WITH_GPU_VERSION
 noinst_PROGRAMS += \
-  elpa1_test_complex_gpu@SUFFIX@ \
-  elpa1_test_real_gpu@SUFFIX@ \
-  elpa2_test_complex_gpu@SUFFIX@ \
-  elpa2_test_real_gpu@SUFFIX@
+  legacy_complex_1stage_gpu@SUFFIX@ \
+  legacy_real_1stage_gpu@SUFFIX@ \
+  legacy_complex_2stage_gpu@SUFFIX@ \
+  legacy_real_2stage_gpu@SUFFIX@
 
 if WANT_SINGLE_PRECISION_REAL
 noinst_PROGRAMS += \
-  elpa1_test_real_gpu_single_precision@SUFFIX@ \
-  elpa2_test_real_gpu_single_precision@SUFFIX@
+  legacy_single_real_1stage_gpu@SUFFIX@ \
+  legacy_single_real_2stage_gpu@SUFFIX@
 endif
 
 if WANT_SINGLE_PRECISION_COMPLEX
 noinst_PROGRAMS += \
-  elpa1_test_complex_gpu_single_precision@SUFFIX@ \
-  elpa2_test_complex_gpu_single_precision@SUFFIX@
+  legacy_single_complex_1stage_gpu@SUFFIX@ \
+  legacy_single_complex_2stage_gpu@SUFFIX@
 endif
 endif
 endif
@@ -637,92 +637,111 @@ test_single_complex_2stage_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $
         -DTEST_SOLVER_2STAGE \
         -DTEST_GPU=0
 endif
+real_2stage_banded@SUFFIX@_SOURCES = test/Fortran/elpa2/real_2stage_banded.F90
+real_2stage_banded@SUFFIX@_LDADD = $(build_lib)
+real_2stage_banded@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
+EXTRA_real_2stage_banded@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
 
-real_2stage@SUFFIX@_SOURCES = test/Fortran/real_2stage.F90
+complex_2stage_banded@SUFFIX@_SOURCES = test/Fortran/elpa2/complex_2stage_banded.F90
+complex_2stage_banded@SUFFIX@_LDADD = $(build_lib)
+complex_2stage_banded@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
+EXTRA_complex_2stage_banded@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
+
+real_2stage@SUFFIX@_SOURCES = test/Fortran/elpa2/real_2stage.F90
 real_2stage@SUFFIX@_LDADD = $(build_lib) $(FCLIBS)
 real_2stage@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
 EXTRA_real_2stage@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
 
-complex_2stage@SUFFIX@_SOURCES = test/Fortran/complex_2stage.F90
+complex_2stage@SUFFIX@_SOURCES = test/Fortran/elpa2/complex_2stage.F90
 complex_2stage@SUFFIX@_LDADD = $(build_lib) $(FCLIBS)
 complex_2stage@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
 EXTRA_complex_2stage@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
 
-real_1stage@SUFFIX@_SOURCES = test/Fortran/real_1stage.F90
+real_1stage@SUFFIX@_SOURCES = test/Fortran/elpa1/real_1stage.F90
 real_1stage@SUFFIX@_LDADD = $(build_lib) $(FCLIBS)
 real_1stage@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
 EXTRA_real_1stage@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
 
-complex_1stage@SUFFIX@_SOURCES = test/Fortran/complex_1stage.F90
+complex_1stage@SUFFIX@_SOURCES = test/Fortran/elpa1/complex_1stage.F90
 complex_1stage@SUFFIX@_LDADD = $(build_lib) $(FCLIBS)
 complex_1stage@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
 EXTRA_complex_1stage@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
 
 if WANT_SINGLE_PRECISION_REAL
-single_real_2stage@SUFFIX@_SOURCES = test/Fortran/single_real_2stage.F90
+single_real_2stage@SUFFIX@_SOURCES = test/Fortran/elpa2/single_real_2stage.F90
 single_real_2stage@SUFFIX@_LDADD = $(build_lib) $(FCLIBS)
 single_real_2stage@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
 EXTRA_single_real_2stage@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
 
-single_real_1stage@SUFFIX@_SOURCES = test/Fortran/single_real_1stage.F90
+single_real_1stage@SUFFIX@_SOURCES = test/Fortran/elpa1/single_real_1stage.F90
 single_real_1stage@SUFFIX@_LDADD = $(build_lib) $(FCLIBS)
 single_real_1stage@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
 EXTRA_single_real_1stage@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
 endif
 
 if WANT_SINGLE_PRECISION_COMPLEX
-single_complex_2stage@SUFFIX@_SOURCES = test/Fortran/single_complex_2stage.F90
+single_complex_2stage@SUFFIX@_SOURCES = test/Fortran/elpa2/single_complex_2stage.F90
 single_complex_2stage@SUFFIX@_LDADD = $(build_lib) $(FCLIBS)
 single_complex_2stage@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
 EXTRA_single_complex_2stage@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
 
-single_complex_1stage@SUFFIX@_SOURCES = test/Fortran/single_complex_1stage.F90
+single_complex_1stage@SUFFIX@_SOURCES = test/Fortran/elpa1/single_complex_1stage.F90
 single_complex_1stage@SUFFIX@_LDADD = $(build_lib) $(FCLIBS)
 single_complex_1stage@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
 EXTRA_single_complex_1stage@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
 endif
 
 if WITH_GPU_VERSION
-real_1stage_gpu@SUFFIX@_SOURCES = test/Fortran/real_1stage_gpu.F90
+real_1stage_gpu@SUFFIX@_SOURCES = test/Fortran/elpa1/real_1stage_gpu.F90
 real_1stage_gpu@SUFFIX@_LDADD = $(build_lib)
 real_1stage_gpu@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
 EXTRA_real_1stage_gpu@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
 
-complex_1stage_gpu@SUFFIX@_SOURCES = test/Fortran/complex_1stage_gpu.F90
+complex_1stage_gpu@SUFFIX@_SOURCES = test/Fortran/elpa1/complex_1stage_gpu.F90
 complex_1stage_gpu@SUFFIX@_LDADD = $(build_lib)
 complex_1stage_gpu@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
 EXTRA_complex_1stage_gpu@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
 
-real_2stage_gpu@SUFFIX@_SOURCES = test/Fortran/real_2stage_gpu.F90
+real_2stage_gpu@SUFFIX@_SOURCES = test/Fortran/elpa2/real_2stage_gpu.F90
 real_2stage_gpu@SUFFIX@_LDADD = $(build_lib)
 real_2stage_gpu@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
 EXTRA_real_2stage_gpu@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
 
-complex_2stage_gpu@SUFFIX@_SOURCES = test/Fortran/complex_2stage_gpu.F90
+complex_2stage_gpu@SUFFIX@_SOURCES = test/Fortran/elpa2/complex_2stage_gpu.F90
 complex_2stage_gpu@SUFFIX@_LDADD = $(build_lib)
 complex_2stage_gpu@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
 EXTRA_complex_2stage_gpu@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
 endif
 
 if WANT_SINGLE_PRECISION_REAL
-single_real_1stage_gpu@SUFFIX@_SOURCES = test/Fortran/single_real_1stage_gpu.F90
+single_real_2stage_banded@SUFFIX@_SOURCES = test/Fortran/elpa2/single_real_2stage_banded.F90
+single_real_2stage_banded@SUFFIX@_LDADD = $(build_lib)
+single_real_2stage_banded@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
+EXTRA_single_real_2stage_banded@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
+
+single_real_1stage_gpu@SUFFIX@_SOURCES = test/Fortran/elpa1/single_real_1stage_gpu.F90
 single_real_1stage_gpu@SUFFIX@_LDADD = $(build_lib)
 single_real_1stage_gpu@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
 EXTRA_single_real_1stage_gpu@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
 
-single_real_2stage_gpu@SUFFIX@_SOURCES = test/Fortran/single_real_2stage_gpu.F90
+single_real_2stage_gpu@SUFFIX@_SOURCES = test/Fortran/elpa2/single_real_2stage_gpu.F90
 single_real_2stage_gpu@SUFFIX@_LDADD = $(build_lib)
 single_real_2stage_gpu@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
 EXTRA_single_real_2stage_gpu@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
 endif
 
 if WANT_SINGLE_PRECISION_COMPLEX
-single_complex_1stage_gpu@SUFFIX@_SOURCES = test/Fortran/single_complex_1stage_gpu.F90
+single_complex_2stage_banded@SUFFIX@_SOURCES = test/Fortran/elpa2/single_complex_2stage_banded.F90
+single_complex_2stage_banded@SUFFIX@_LDADD = $(build_lib)
+single_complex_2stage_banded@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
+EXTRA_single_complex_2stage_banded@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
+
+single_complex_1stage_gpu@SUFFIX@_SOURCES = test/Fortran/elpa1/single_complex_1stage_gpu.F90
 single_complex_1stage_gpu@SUFFIX@_LDADD = $(build_lib)
 single_complex_1stage_gpu@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
 EXTRA_single_complex_1stage_gpu@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
 
-single_complex_2stage_gpu@SUFFIX@_SOURCES = test/Fortran/single_complex_2stage_gpu.F90
+single_complex_2stage_gpu@SUFFIX@_SOURCES = test/Fortran/elpa2/single_complex_2stage_gpu.F90
 single_complex_2stage_gpu@SUFFIX@_LDADD = $(build_lib)
 single_complex_2stage_gpu@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
 EXTRA_single_complex_2stage_gpu@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
@@ -730,304 +749,284 @@ endif
 
 
 if ENABLE_LEGACY
-elpa1_test_real_c_version@SUFFIX@_SOURCES = test/C/elpa1_test_real_c_version.c
-elpa1_test_real_c_version@SUFFIX@_LDADD = $(build_lib) $(FCLIBS)
-elpa1_test_real_c_version@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
-EXTRA_elpa1_test_real_c_version@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
-
-elpa1_test_real_with_c@SUFFIX@_SOURCES = test/Fortran/test_real_with_c.F90
-elpa1_test_real_with_c@SUFFIX@_LDADD = $(build_lib)
-elpa1_test_real_with_c@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
-EXTRA_elpa1_test_real_with_c@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
-
-elpa_driver_real_c_version@SUFFIX@_SOURCES = test/C/elpa_driver_real_c_version.c
-elpa_driver_real_c_version@SUFFIX@_LDADD = $(build_lib) $(FCLIBS)
-elpa_driver_real_c_version@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
-EXTRA_elpa_driver_real_c_version@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
-
-elpa1_test_complex_c_version@SUFFIX@_SOURCES = test/C/elpa1_test_complex_c_version.c
-elpa1_test_complex_c_version@SUFFIX@_LDADD = $(build_lib) $(FCLIBS)
-elpa1_test_complex_c_version@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
-EXTRA_elpa1_test_complex_c_version@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
-
-elpa_driver_complex_c_version@SUFFIX@_SOURCES = test/C/elpa_driver_complex_c_version.c
-elpa_driver_complex_c_version@SUFFIX@_LDADD = $(build_lib) $(FCLIBS)
-elpa_driver_complex_c_version@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
-EXTRA_elpa_driver_complex_c_version@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
-
-elpa2_test_real_c_version@SUFFIX@_SOURCES = test/C/elpa2_test_real_c_version.c
-elpa2_test_real_c_version@SUFFIX@_LDADD = $(build_lib) $(FCLIBS)
-elpa2_test_real_c_version@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
-EXTRA_elpa2_test_real_c_version@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
-
-elpa2_test_complex_c_version@SUFFIX@_SOURCES = test/C/elpa2_test_complex_c_version.c
-elpa2_test_complex_c_version@SUFFIX@_LDADD = $(build_lib) $(FCLIBS)
-elpa2_test_complex_c_version@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
-EXTRA_elpa2_test_complex_c_version@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
-
-elpa1_test_real@SUFFIX@_SOURCES = test/Fortran/elpa1/real.F90
-elpa1_test_real@SUFFIX@_LDADD = $(build_lib)
-elpa1_test_real@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
-EXTRA_elpa1_test_real@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
-
-elpa1_real_toeplitz@SUFFIX@_SOURCES = test/Fortran/elpa1/toeplitz.F90
-elpa1_real_toeplitz@SUFFIX@_LDADD = $(build_lib)
-elpa1_real_toeplitz@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
-EXTRA_elpa1_real_toeplitz@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
-
-elpa1_real_transpose_multiply@SUFFIX@_SOURCES = test/Fortran/test_transpose_multiply_real.F90
-elpa1_real_transpose_multiply@SUFFIX@_LDADD = $(build_lib)
-elpa1_real_transpose_multiply@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
-EXTRA_elpa1_real_transpose_multiply@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
-
-elpa1_complex_transpose_multiply@SUFFIX@_SOURCES = test/Fortran/test_transpose_multiply_complex.F90
-elpa1_complex_transpose_multiply@SUFFIX@_LDADD = $(build_lib)
-elpa1_complex_transpose_multiply@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
-EXTRA_elpa1_complex_transpose_multiply@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
-
-elpa1_real_cholesky@SUFFIX@_SOURCES = test/Fortran/elpa1/real_cholesky.F90
-elpa1_real_cholesky@SUFFIX@_LDADD = $(build_lib)
-elpa1_real_cholesky@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
-EXTRA_elpa1_real_cholesky@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
-
-elpa1_real_invert_trm@SUFFIX@_SOURCES = test/Fortran/elpa1/real_invert_trm.F90
-elpa1_real_invert_trm@SUFFIX@_LDADD = $(build_lib)
-elpa1_real_invert_trm@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
-EXTRA_elpa1_real_invert_trm@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
-
-elpa1_complex_cholesky@SUFFIX@_SOURCES = test/Fortran/elpa1/complex_cholesky.F90
-elpa1_complex_cholesky@SUFFIX@_LDADD = $(build_lib)
-elpa1_complex_cholesky@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
-EXTRA_elpa1_complex_cholesky@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
-
-elpa1_complex_invert_trm@SUFFIX@_SOURCES = test/Fortran/elpa1/complex_invert_trm.F90
-elpa1_complex_invert_trm@SUFFIX@_LDADD = $(build_lib)
-elpa1_complex_invert_trm@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
-EXTRA_elpa1_complex_invert_trm@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
-
-elpa2_test_real@SUFFIX@_SOURCES = test/Fortran/elpa2/real.F90
-elpa2_test_real@SUFFIX@_LDADD = $(build_lib)
-elpa2_test_real@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
-EXTRA_elpa2_test_real@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
-
-elpa2_test_real_default@SUFFIX@_SOURCES = test/Fortran/elpa2/real_default_kernel.F90
-elpa2_test_real_default@SUFFIX@_LDADD = $(build_lib)
-elpa2_test_real_default@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
-EXTRA_elpa2_test_real_default@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
-
-elpa2_test_real_qr@SUFFIX@_SOURCES = test/Fortran/elpa2/real_qr.F90
-elpa2_test_real_qr@SUFFIX@_LDADD = $(build_lib)
-elpa2_test_real_qr@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
-EXTRA_elpa2_test_real_qr@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
-
-elpa2_test_real_api@SUFFIX@_SOURCES = test/Fortran/elpa2/real_api.F90
-elpa2_test_real_api@SUFFIX@_LDADD = $(build_lib)
-elpa2_test_real_api@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
-EXTRA_elpa2_test_real_api@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
-
-real_2stage_banded@SUFFIX@_SOURCES = test/Fortran/real_2stage_banded.F90
-real_2stage_banded@SUFFIX@_LDADD = $(build_lib)
-real_2stage_banded@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
-EXTRA_real_2stage_banded@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
-
-elpa1_test_complex@SUFFIX@_SOURCES = test/Fortran/elpa1/complex.F90
-elpa1_test_complex@SUFFIX@_LDADD = $(build_lib)
-elpa1_test_complex@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
-EXTRA_elpa1_test_complex@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
-
-elpa2_test_complex@SUFFIX@_SOURCES = test/Fortran/elpa2/complex.F90
-elpa2_test_complex@SUFFIX@_LDADD = $(build_lib)
-elpa2_test_complex@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
-EXTRA_elpa2_test_complex@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
-
-elpa2_test_complex_default@SUFFIX@_SOURCES = test/Fortran/elpa2/complex_default_kernel.F90
-elpa2_test_complex_default@SUFFIX@_LDADD = $(build_lib)
-elpa2_test_complex_default@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
-EXTRA_elpa2_test_complex_default@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
-
-elpa2_test_complex_api@SUFFIX@_SOURCES = test/Fortran/elpa2/complex_api.F90
-elpa2_test_complex_api@SUFFIX@_LDADD = $(build_lib)
-elpa2_test_complex_api@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
-EXTRA_elpa2_test_complex_api@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
-
-complex_2stage_banded@SUFFIX@_SOURCES = test/Fortran/complex_2stage_banded.F90
-complex_2stage_banded@SUFFIX@_LDADD = $(build_lib)
-complex_2stage_banded@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
-EXTRA_complex_2stage_banded@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
-
-
-elpa_driver_real@SUFFIX@_SOURCES = test/Fortran/test_driver_real.F90
-elpa_driver_real@SUFFIX@_LDADD = $(build_lib)
-elpa_driver_real@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
-EXTRA_elpa_driver_real@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
-
-elpa_driver_complex@SUFFIX@_SOURCES = test/Fortran/test_driver_complex.F90
-elpa_driver_complex@SUFFIX@_LDADD = $(build_lib)
-elpa_driver_complex@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
-EXTRA_elpa_driver_complex@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
+legacy_real_1stage_c_version@SUFFIX@_SOURCES = test/C/elpa1/legacy_interface/legacy_real_1stage_c_version.c
+legacy_real_1stage_c_version@SUFFIX@_LDADD = $(build_lib) $(FCLIBS)
+legacy_real_1stage_c_version@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
+EXTRA_legacy_real_1stage_c_version@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
+
+legacy_real_1stage_with_c@SUFFIX@_SOURCES = test/Fortran/elpa1/legacy_interface/legacy_real_1stage_with_c.F90
+legacy_real_1stage_with_c@SUFFIX@_LDADD = $(build_lib)
+legacy_real_1stage_with_c@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
+EXTRA_legacy_real_1stage_with_c@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
+
+legacy_real_driver_c_version@SUFFIX@_SOURCES = test/C/driver/legacy_interface/legacy_real_driver_c_version.c
+legacy_real_driver_c_version@SUFFIX@_LDADD = $(build_lib) $(FCLIBS)
+legacy_real_driver_c_version@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
+EXTRA_legacy_real_driver_c_version@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
+
+legacy_complex_1stage_c_version@SUFFIX@_SOURCES = test/C/elpa1/legacy_interface/legacy_complex_1stage_c_version.c
+legacy_complex_1stage_c_version@SUFFIX@_LDADD = $(build_lib) $(FCLIBS)
+legacy_complex_1stage_c_version@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
+EXTRA_legacy_complex_1stage_c_version@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
+
+legacy_complex_driver_c_version@SUFFIX@_SOURCES = test/C/driver/legacy_interface/legacy_complex_driver_c_version.c
+legacy_complex_driver_c_version@SUFFIX@_LDADD = $(build_lib) $(FCLIBS)
+legacy_complex_driver_c_version@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
+EXTRA_legacy_complex_driver_c_version@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
+
+legacy_real_2stage_c_version@SUFFIX@_SOURCES = test/C/elpa2/legacy_interface/legacy_real_2stage_c_version.c
+legacy_real_2stage_c_version@SUFFIX@_LDADD = $(build_lib) $(FCLIBS)
+legacy_real_2stage_c_version@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
+EXTRA_legacy_real_2stage_c_version@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
+
+legacy_complex_2stage_c_version@SUFFIX@_SOURCES = test/C/elpa2/legacy_interface/legacy_complex_2stage_c_version.c
+legacy_complex_2stage_c_version@SUFFIX@_LDADD = $(build_lib) $(FCLIBS)
+legacy_complex_2stage_c_version@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
+EXTRA_legacy_complex_2stage_c_version@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
+
+legacy_real_1stage@SUFFIX@_SOURCES = test/Fortran/elpa1/legacy_interface/legacy_real.F90
+legacy_real_1stage@SUFFIX@_LDADD = $(build_lib)
+legacy_real_1stage@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
+EXTRA_legacy_real_1stage@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
+
+legacy_real_toeplitz@SUFFIX@_SOURCES = test/Fortran/elpa1/legacy_interface/legacy_toeplitz.F90
+legacy_real_toeplitz@SUFFIX@_LDADD = $(build_lib)
+legacy_real_toeplitz@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
+EXTRA_legacy_real_toeplitz@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
+
+legacy_real_transpose_multiply@SUFFIX@_SOURCES = test/Fortran/elpa1/legacy_interface/legacy_real_transpose_multiply.F90
+legacy_real_transpose_multiply@SUFFIX@_LDADD = $(build_lib)
+legacy_real_transpose_multiply@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
+EXTRA_legacy_real_transpose_multiply@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
+
+legacy_complex_transpose_multiply@SUFFIX@_SOURCES = test/Fortran/elpa1/legacy_interface/legacy_complex_transpose_multiply.F90
+legacy_complex_transpose_multiply@SUFFIX@_LDADD = $(build_lib)
+legacy_complex_transpose_multiply@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
+EXTRA_legacy_complex_transpose_multiply@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
+
+legacy_real_cholesky@SUFFIX@_SOURCES = test/Fortran/elpa1/legacy_interface/legacy_real_cholesky.F90
+legacy_real_cholesky@SUFFIX@_LDADD = $(build_lib)
+legacy_real_cholesky@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
+EXTRA_legacy_real_cholesky@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
+
+legacy_real_invert_trm@SUFFIX@_SOURCES = test/Fortran/elpa1/legacy_interface/legacy_real_invert_trm.F90
+legacy_real_invert_trm@SUFFIX@_LDADD = $(build_lib)
+legacy_real_invert_trm@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
+EXTRA_legacy_real_invert_trm@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
+
+legacy_complex_cholesky@SUFFIX@_SOURCES = test/Fortran/elpa1/legacy_interface/legacy_complex_cholesky.F90
+legacy_complex_cholesky@SUFFIX@_LDADD = $(build_lib)
+legacy_complex_cholesky@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
+EXTRA_legacy_complex_cholesky@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
+
+legacy_complex_invert_trm@SUFFIX@_SOURCES = test/Fortran/elpa1/legacy_interface/legacy_complex_invert_trm.F90
+legacy_complex_invert_trm@SUFFIX@_LDADD = $(build_lib)
+legacy_complex_invert_trm@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
+EXTRA_legacy_complex_invert_trm@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
+
+legacy_real_2stage@SUFFIX@_SOURCES = test/Fortran/elpa2/legacy_interface/legacy_real.F90
+legacy_real_2stage@SUFFIX@_LDADD = $(build_lib)
+legacy_real_2stage@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
+EXTRA_legacy_real_2stage@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
+
+legacy_real_2stage_default@SUFFIX@_SOURCES = test/Fortran/elpa2/legacy_interface/legacy_real_default_kernel.F90
+legacy_real_2stage_default@SUFFIX@_LDADD = $(build_lib)
+legacy_real_2stage_default@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
+EXTRA_legacy_real_2stage_default@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
+
+legacy_real_2stage_qr@SUFFIX@_SOURCES = test/Fortran/elpa2/legacy_interface/legacy_real_qr.F90
+legacy_real_2stage_qr@SUFFIX@_LDADD = $(build_lib)
+legacy_real_2stage_qr@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
+EXTRA_legacy_real_2stage_qr@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
+
+legacy_real_2stage_api@SUFFIX@_SOURCES = test/Fortran/elpa2/legacy_interface/legacy_real_api.F90
+legacy_real_2stage_api@SUFFIX@_LDADD = $(build_lib)
+legacy_real_2stage_api@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
+EXTRA_legacy_real_2stage_api@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
+
+legacy_complex_1stage@SUFFIX@_SOURCES = test/Fortran/elpa1/legacy_interface/legacy_complex.F90
+legacy_complex_1stage@SUFFIX@_LDADD = $(build_lib)
+legacy_complex_1stage@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
+EXTRA_legacy_complex_1stage@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
+
+legacy_complex_2stage@SUFFIX@_SOURCES = test/Fortran/elpa2/legacy_interface/legacy_complex.F90
+legacy_complex_2stage@SUFFIX@_LDADD = $(build_lib)
+legacy_complex_2stage@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
+EXTRA_legacy_complex_2stage@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
+
+legacy_complex_2stage_default@SUFFIX@_SOURCES = test/Fortran/elpa2/legacy_interface/legacy_complex_default_kernel.F90
+legacy_complex_2stage_default@SUFFIX@_LDADD = $(build_lib)
+legacy_complex_2stage_default@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
+EXTRA_legacy_complex_2stage_default@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
+
+legacy_complex_2stage_api@SUFFIX@_SOURCES = test/Fortran/elpa2/legacy_interface/legacy_complex_api.F90
+legacy_complex_2stage_api@SUFFIX@_LDADD = $(build_lib)
+legacy_complex_2stage_api@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
+EXTRA_legacy_complex_2stage_api@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
+
+legacy_real_driver@SUFFIX@_SOURCES = test/Fortran/driver/legacy_interface/legacy_real_driver.F90
+legacy_real_driver@SUFFIX@_LDADD = $(build_lib)
+legacy_real_driver@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
+EXTRA_legacy_real_driver@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
+
+legacy_complex_driver@SUFFIX@_SOURCES = test/Fortran/driver/legacy_interface/legacy_complex_driver.F90
+legacy_complex_driver@SUFFIX@_LDADD = $(build_lib)
+legacy_complex_driver@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
+EXTRA_legacy_complex_driver@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
 
 elpa_tests@SUFFIX@_SOURCES = test/Fortran/elpa_tests.F90
 elpa_tests@SUFFIX@_LDADD = $(build_lib)
 elpa_tests@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
 
 if WANT_SINGLE_PRECISION_REAL
-single_real_2stage_banded@SUFFIX@_SOURCES = test/Fortran/single_real_2stage_banded.F90
-single_real_2stage_banded@SUFFIX@_LDADD = $(build_lib)
-single_real_2stage_banded@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
-EXTRA_single_real_2stage_banded@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
 
-elpa1_test_real_single_precision@SUFFIX@_SOURCES = test/Fortran/elpa1/single_real.F90
-elpa1_test_real_single_precision@SUFFIX@_LDADD = $(build_lib)
-elpa1_test_real_single_precision@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
-EXTRA_elpa1_test_real_single_precision@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
-
-elpa2_test_real_single_precision@SUFFIX@_SOURCES = test/Fortran/elpa2/single_real.F90
-elpa2_test_real_single_precision@SUFFIX@_LDADD = $(build_lib)
-elpa2_test_real_single_precision@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
-EXTRA_elpa2_test_real_single_precision@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
-
-elpa_driver_real_single_precision@SUFFIX@_SOURCES = test/Fortran/test_driver_real_single.F90
-elpa_driver_real_single_precision@SUFFIX@_LDADD = $(build_lib)
-elpa_driver_real_single_precision@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
-EXTRA_elpa_driver_real_single_precision@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
-
-elpa1_real_toeplitz_single_precision@SUFFIX@_SOURCES = test/Fortran/elpa1/single_toeplitz.F90
-elpa1_real_toeplitz_single_precision@SUFFIX@_LDADD = $(build_lib)
-elpa1_real_toeplitz_single_precision@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
-EXTRA_elpa1_real_toeplitz_single_precision@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
-
-elpa1_real_transpose_multiply_single_precision@SUFFIX@_SOURCES = test/Fortran/test_transpose_multiply_real_single.F90
-elpa1_real_transpose_multiply_single_precision@SUFFIX@_LDADD = $(build_lib)
-elpa1_real_transpose_multiply_single_precision@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
-EXTRA_elpa1_real_transpose_multiply_single_precision@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
-
-elpa_driver_real_c_version_single_precision@SUFFIX@_SOURCES = test/C/elpa_driver_real_c_version_single.c
-elpa_driver_real_c_version_single_precision@SUFFIX@_LDADD = $(build_lib) $(FCLIBS)
-elpa_driver_real_c_version_single_precision@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
-EXTRA_elpa_driver_real_c_version_single_precision@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
-
-elpa1_real_cholesky_single_precision@SUFFIX@_SOURCES = test/Fortran/elpa1/single_real_cholesky.F90
-elpa1_real_cholesky_single_precision@SUFFIX@_LDADD = $(build_lib)
-elpa1_real_cholesky_single_precision@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
-EXTRA_elpa1_real_cholesky_single_precision@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
-
-elpa1_real_invert_trm_single_precision@SUFFIX@_SOURCES = test/Fortran/elpa1/single_real_invert_trm.F90
-elpa1_real_invert_trm_single_precision@SUFFIX@_LDADD = $(build_lib)
-elpa1_real_invert_trm_single_precision@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
-EXTRA_elpa1_real_invert_trm_single_precision@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
-
-elpa2_test_real_default_single_precision@SUFFIX@_SOURCES = test/Fortran/elpa2/single_real_default_kernel.F90
-elpa2_test_real_default_single_precision@SUFFIX@_LDADD = $(build_lib)
-elpa2_test_real_default_single_precision@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
-EXTRA_elpa2_test_real_default_single_precision@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
-
-elpa2_test_real_qr_single_precision@SUFFIX@_SOURCES = \
-                test/Fortran/elpa2/single_real_qr.F90
-elpa2_test_real_qr_single_precision@SUFFIX@_LDADD = $(build_lib)
-elpa2_test_real_qr_single_precision@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
-EXTRA_elpa2_test_real_qr_single_precision@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
-
-elpa2_test_real_api_single_precision@SUFFIX@_SOURCES = test/Fortran/elpa2/single_real_api.F90
-elpa2_test_real_api_single_precision@SUFFIX@_LDADD = $(build_lib)
-elpa2_test_real_api_single_precision@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
-EXTRA_elpa2_test_real_api_single_precision@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
+legacy_single_real_1stage@SUFFIX@_SOURCES = test/Fortran/elpa1/legacy_interface/legacy_single_real.F90
+legacy_single_real_1stage@SUFFIX@_LDADD = $(build_lib)
+legacy_single_real_1stage@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
+EXTRA_legacy_single_real_1stage@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
+
+legacy_single_real_2stage@SUFFIX@_SOURCES = test/Fortran/elpa2/legacy_interface/legacy_single_real.F90
+legacy_single_real_2stage@SUFFIX@_LDADD = $(build_lib)
+legacy_single_real_2stage@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
+EXTRA_legacy_single_real_2stage@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
+
+legacy_single_real_driver@SUFFIX@_SOURCES = test/Fortran/driver/legacy_interface/legacy_single_real_driver.F90
+legacy_single_real_driver@SUFFIX@_LDADD = $(build_lib)
+legacy_single_real_driver@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
+EXTRA_legacy_single_real_driver@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
+
+legacy_single_real_toeplitz@SUFFIX@_SOURCES = test/Fortran/elpa1/legacy_interface/legacy_single_toeplitz.F90
+legacy_single_real_toeplitz@SUFFIX@_LDADD = $(build_lib)
+legacy_single_real_toeplitz@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
+EXTRA_legacy_single_real_toeplitz@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
+
+legacy_single_real_transpose_multiply@SUFFIX@_SOURCES = test/Fortran/elpa1/legacy_interface/legacy_single_real_transpose_multiply.F90
+legacy_single_real_transpose_multiply@SUFFIX@_LDADD = $(build_lib)
+legacy_single_real_transpose_multiply@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
+EXTRA_legacy_single_real_transpose_multiply@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
+
+legacy_single_real_driver_c_version@SUFFIX@_SOURCES = test/C/driver/legacy_interface/legacy_single_real_driver_c_version.c
+legacy_single_real_driver_c_version@SUFFIX@_LDADD = $(build_lib) $(FCLIBS)
+legacy_single_real_driver_c_version@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
+EXTRA_legacy_single_real_driver_c_version@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
+
+legacy_single_real_cholesky@SUFFIX@_SOURCES = test/Fortran/elpa1/legacy_interface/legacy_single_real_cholesky.F90
+legacy_single_real_cholesky@SUFFIX@_LDADD = $(build_lib)
+legacy_single_real_cholesky@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
+EXTRA_legacy_single_real_cholesky@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
+
+legacy_single_real_invert_trm@SUFFIX@_SOURCES = test/Fortran/elpa1/legacy_interface/legacy_single_real_invert_trm.F90
+legacy_single_real_invert_trm@SUFFIX@_LDADD = $(build_lib)
+legacy_single_real_invert_trm@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
+EXTRA_legacy_single_real_invert_trm@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
+
+legacy_single_real_2stage_default@SUFFIX@_SOURCES = test/Fortran/elpa2/legacy_interface/legacy_single_real_default_kernel.F90
+legacy_single_real_2stage_default@SUFFIX@_LDADD = $(build_lib)
+legacy_single_real_2stage_default@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
+EXTRA_legacy_single_real_2stage_default@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
+
+legacy_single_real_2stage_qr@SUFFIX@_SOURCES = \
+                test/Fortran/elpa2/legacy_interface/legacy_single_real_qr.F90
+legacy_single_real_2stage_qr@SUFFIX@_LDADD = $(build_lib)
+legacy_single_real_2stage_qr@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
+EXTRA_legacy_single_real_2stage_qr@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
+
+legacy_single_real_2stage_api@SUFFIX@_SOURCES = test/Fortran/elpa2/legacy_interface/legacy_single_real_api.F90
+legacy_single_real_2stage_api@SUFFIX@_LDADD = $(build_lib)
+legacy_single_real_2stage_api@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
+EXTRA_legacy_single_real_2stage_api@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
 endif
 
 if WANT_SINGLE_PRECISION_COMPLEX
-single_complex_2stage_banded@SUFFIX@_SOURCES = test/Fortran/single_complex_2stage_banded.F90
-single_complex_2stage_banded@SUFFIX@_LDADD = $(build_lib)
-single_complex_2stage_banded@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
-EXTRA_single_complex_2stage_banded@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
-
-elpa1_test_complex_single_precision@SUFFIX@_SOURCES = test/Fortran/elpa1/single_complex.F90
-elpa1_test_complex_single_precision@SUFFIX@_LDADD = $(build_lib)
-elpa1_test_complex_single_precision@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
-EXTRA_elpa1_test_complex_single_precision@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
-
-elpa_driver_complex_single_precision@SUFFIX@_SOURCES = test/Fortran/test_driver_complex_single.F90
-elpa_driver_complex_single_precision@SUFFIX@_LDADD = $(build_lib)
-elpa_driver_complex_single_precision@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
-EXTRA_elpa_driver_complex_single_precision@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
-
-elpa_driver_complex_c_version_single_precision@SUFFIX@_SOURCES = test/C/elpa_driver_complex_c_version_single.c
-elpa_driver_complex_c_version_single_precision@SUFFIX@_LDADD = $(build_lib) $(FCLIBS)
-elpa_driver_complex_c_version_single_precision@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
-EXTRA_elpa_driver_complex_c_version_single_precision@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
-
-elpa2_test_complex_single_precision@SUFFIX@_SOURCES = test/Fortran/elpa2/single_complex.F90
-elpa2_test_complex_single_precision@SUFFIX@_LDADD = $(build_lib)
-elpa2_test_complex_single_precision@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
-EXTRA_elpa2_test_complex_single_precision@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
-
-elpa2_test_complex_default_single_precision@SUFFIX@_SOURCES = test/Fortran/elpa2/single_complex_default_kernel.F90 $(shared_sources) $(redirect_sources)
-elpa2_test_complex_default_single_precision@SUFFIX@_LDADD = $(build_lib)
-elpa2_test_complex_default_single_precision@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
-EXTRA_elpa2_test_complex_default_single_precision@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
-
-elpa1_complex_transpose_multiply_single_precision@SUFFIX@_SOURCES = test/Fortran/test_transpose_multiply_complex_single.F90
-elpa1_complex_transpose_multiply_single_precision@SUFFIX@_LDADD = $(build_lib)
-elpa1_complex_transpose_multiply_single_precision@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
-EXTRA_elpa1_complex_transpose_multiply_single_precision@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
-
-elpa1_complex_cholesky_single_precision@SUFFIX@_SOURCES = test/Fortran/elpa1/single_complex_cholesky.F90
-elpa1_complex_cholesky_single_precision@SUFFIX@_LDADD = $(build_lib)
-elpa1_complex_cholesky_single_precision@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
-EXTRA_elpa1_complex_cholesky_single_precision@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
-
-elpa1_complex_invert_trm_single_precision@SUFFIX@_SOURCES = test/Fortran/elpa1/single_complex_invert_trm.F90
-elpa1_complex_invert_trm_single_precision@SUFFIX@_LDADD = $(build_lib)
-elpa1_complex_invert_trm_single_precision@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
-EXTRA_elpa1_complex_invert_trm_single_precision@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
-
-elpa2_test_complex_api_single_precision@SUFFIX@_SOURCES = test/Fortran/elpa2/single_complex_api.F90
-elpa2_test_complex_api_single_precision@SUFFIX@_LDADD = $(build_lib)
-elpa2_test_complex_api_single_precision@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
-EXTRA_elpa2_test_complex_api_single_precision@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
+legacy_single_complex_1stage@SUFFIX@_SOURCES = test/Fortran/elpa1/legacy_interface/legacy_single_complex.F90
+legacy_single_complex_1stage@SUFFIX@_LDADD = $(build_lib)
+legacy_single_complex_1stage@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
+EXTRA_legacy_single_complex_1stage@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
+
+legacy_single_complex_driver@SUFFIX@_SOURCES = test/Fortran/driver/legacy_interface/legacy_single_complex_driver.F90
+legacy_single_complex_driver@SUFFIX@_LDADD = $(build_lib)
+legacy_single_complex_driver@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
+EXTRA_legacy_single_complex_driver@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
+
+legacy_single_complex_driver_c_version@SUFFIX@_SOURCES = test/C/driver/legacy_interface/legacy_single_complex_driver_c_version.c
+legacy_single_complex_driver_c_version@SUFFIX@_LDADD = $(build_lib) $(FCLIBS)
+legacy_single_complex_driver_c_version@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
+legacy_single_complex_driver_c_version@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
+
+legacy_single_complex_2stage@SUFFIX@_SOURCES = test/Fortran/elpa2/legacy_interface/legacy_single_complex.F90
+legacy_single_complex_2stage@SUFFIX@_LDADD = $(build_lib)
+legacy_single_complex_2stage@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
+EXTRA_legacy_single_complex_2stage@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
+
+legacy_single_complex_2stage_default@SUFFIX@_SOURCES = test/Fortran/elpa2/legacy_interface/legacy_single_complex_default_kernel.F90 $(shared_sources) $(redirect_sources)
+legacy_single_complex_2stage_default@SUFFIX@_LDADD = $(build_lib)
+legacy_single_complex_2stage_default@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
+EXTRA_legacy_single_complex_2stage_default@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
+
+legacy_single_complex_transpose_multiply@SUFFIX@_SOURCES = test/Fortran/elpa1/legacy_interface/legacy_single_complex_transpose_multiply.F90
+legacy_single_complex_transpose_multiply@SUFFIX@_LDADD = $(build_lib)
+legacy_single_complex_transpose_multiply@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
+EXTRA_legacy_single_complex_transpose_multiply@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
+
+legacy_single_complex_cholesky@SUFFIX@_SOURCES = test/Fortran/elpa1/legacy_interface/legacy_single_complex_cholesky.F90
+legacy_single_complex_cholesky@SUFFIX@_LDADD = $(build_lib)
+legacy_single_complex_cholesky@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
+EXTRA_legacy_single_complex_cholesky@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
+
+legacy_single_complex_invert_trm@SUFFIX@_SOURCES = test/Fortran/elpa1/legacy_interface/legacy_single_complex_invert_trm.F90
+legacy_single_complex_invert_trm@SUFFIX@_LDADD = $(build_lib)
+legacy_single_complex_invert_trm@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
+EXTRA_legacy_single_complex_invert_trm@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
+
+legacy_single_complex_2stage_api@SUFFIX@_SOURCES = test/Fortran/elpa2/legacy_interface/legacy_single_complex_api.F90
+legacy_single_complex_2stage_api@SUFFIX@_LDADD = $(build_lib)
+legacy_single_complex_2stage_api@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
+EXTRA_legacy_single_complex_2stage_api@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
 endif
 
 if WITH_GPU_VERSION
-elpa1_test_real_gpu@SUFFIX@_SOURCES = test/Fortran/elpa1/real_gpu.F90
-elpa1_test_real_gpu@SUFFIX@_LDADD = $(build_lib)
-elpa1_test_real_gpu@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
-EXTRA_elpa1_test_real_gpu@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
-
-elpa1_test_complex_gpu@SUFFIX@_SOURCES = test/Fortran/elpa1/complex_gpu.F90
-elpa1_test_complex_gpu@SUFFIX@_LDADD = $(build_lib)
-elpa1_test_complex_gpu@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
-EXTRA_elpa1_test_complex_gpu@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
-
-elpa2_test_real_gpu@SUFFIX@_SOURCES = test/Fortran/elpa2/real_gpu.F90
-elpa2_test_real_gpu@SUFFIX@_LDADD = $(build_lib)
-elpa2_test_real_gpu@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
-EXTRA_elpa2_test_real_gpu@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
-
-elpa2_test_complex_gpu@SUFFIX@_SOURCES = test/Fortran/elpa2/complex_gpu.F90
-elpa2_test_complex_gpu@SUFFIX@_LDADD = $(build_lib)
-elpa2_test_complex_gpu@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
-EXTRA_elpa2_test_complex_gpu@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
+legacy_real_1stage_gpu@SUFFIX@_SOURCES = test/Fortran/elpa1/legacy_interface/legacy_real_gpu.F90
+legacy_real_1stage_gpu@SUFFIX@_LDADD = $(build_lib)
+legacy_real_1stage_gpu@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
+EXTRA_legacy_real_1stage_gpu@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
+
+legacy_complex_1stage_gpu@SUFFIX@_SOURCES = test/Fortran/elpa1/legacy_interface/legacy_complex_gpu.F90
+legacy_complex_1stage_gpu@SUFFIX@_LDADD = $(build_lib)
+legacy_complex_1stage_gpu@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
+EXTRA_legacy_complex_1stage_gpu@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
+
+legacy_real_2stage_gpu@SUFFIX@_SOURCES = test/Fortran/elpa2/legacy_interface/legacy_real_gpu.F90
+legacy_real_2stage_gpu@SUFFIX@_LDADD = $(build_lib)
+legacy_real_2stage_gpu@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
+EXTRA_legacy_real_2stage_gpu@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
+
+legacy_complex_2stage_gpu@SUFFIX@_SOURCES = test/Fortran/elpa2/legacy_interface/legacy_complex_gpu.F90
+legacy_complex_2stage_gpu@SUFFIX@_LDADD = $(build_lib)
+legacy_complex_2stage_gpu@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
+EXTRA_legacy_complex_2stage_gpu@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
 
 if WANT_SINGLE_PRECISION_REAL
-elpa1_test_real_gpu_single_precision@SUFFIX@_SOURCES = test/Fortran/elpa1/single_real_gpu.F90
-elpa1_test_real_gpu_single_precision@SUFFIX@_LDADD = $(build_lib)
-elpa1_test_real_gpu_single_precision@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
-EXTRA_elpa1_test_real_gpu_single_precision@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
+legacy_single_real_1stage_gpu@SUFFIX@_SOURCES = test/Fortran/elpa1/legacy_interface/legacy_single_real_gpu.F90
+legacy_single_real_1stage_gpu@SUFFIX@_LDADD = $(build_lib)
+legacy_single_real_1stage_gpu@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
+EXTRA_legacy_single_real_1stage_gpu@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
 
-elpa2_test_real_gpu_single_precision@SUFFIX@_SOURCES = test/Fortran/elpa2/single_real_gpu.F90
-elpa2_test_real_gpu_single_precision@SUFFIX@_LDADD = $(build_lib)
-elpa2_test_real_gpu_single_precision@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
-EXTRA_elpa2_test_real_gpu_single_precision@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
+legacy_single_real_2stage_gpu@SUFFIX@_SOURCES = test/Fortran/elpa2/legacy_interface/legacy_single_real_gpu.F90
+legacy_single_real_2stage_gpu@SUFFIX@_LDADD = $(build_lib)
+legacy_single_real_2stage_gpu@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
+EXTRA_legacy_single_real_2stage_gpu@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
 endif
 
 if WANT_SINGLE_PRECISION_COMPLEX
-elpa1_test_complex_gpu_single_precision@SUFFIX@_SOURCES = test/Fortran/elpa1/single_complex_gpu.F90
-elpa1_test_complex_gpu_single_precision@SUFFIX@_LDADD = $(build_lib)
-elpa1_test_complex_gpu_single_precision@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
-EXTRA_elpa1_test_complex_gpu_single_precision@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
+legacy_single_complex_1stage_gpu@SUFFIX@_SOURCES = test/Fortran/elpa1/legacy_interface/legacy_single_complex_gpu.F90
+legacy_single_complex_1stage_gpu@SUFFIX@_LDADD = $(build_lib)
+legacy_single_complex_1stage_gpu@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
+EXTRA_legacy_single_complex_1stage_gpu@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
 
-elpa2_test_complex_gpu_single_precision@SUFFIX@_SOURCES = test/Fortran/elpa2/single_complex_gpu.F90
-elpa2_test_complex_gpu_single_precision@SUFFIX@_LDADD = $(build_lib)
-elpa2_test_complex_gpu_single_precision@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
-EXTRA_elpa2_test_complex_gpu_single_precision@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
+legacy_single_complex_2stage_gpu@SUFFIX@_SOURCES = test/Fortran/elpa2/legacy_interface/legacy_single_complex_gpu.F90
+legacy_single_complex_2stage_gpu@SUFFIX@_LDADD = $(build_lib)
+legacy_single_complex_2stage_gpu@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
+EXTRA_legacy_single_complex_2stage_gpu@SUFFIX@_DEPENDENCIES = test/Fortran/elpa_print_headers.X90
 endif
 endif
 endif
@@ -1084,76 +1083,75 @@ endif
 
 if ENABLE_LEGACY
 check_SCRIPTS += \
-  elpa1_test_real@SUFFIX@.sh \
-  elpa2_test_real@SUFFIX@.sh \
-  elpa2_test_real_default@SUFFIX@.sh \
-  elpa1_test_complex@SUFFIX@.sh \
-  elpa2_test_complex@SUFFIX@.sh \
-  elpa2_test_real_qr@SUFFIX@.sh \
-  elpa2_test_complex_default@SUFFIX@.sh \
-  elpa2_test_real_api@SUFFIX@.sh \
-  elpa2_test_complex_api@SUFFIX@.sh \
-  elpa_driver_real@SUFFIX@.sh \
-  elpa_driver_complex@SUFFIX@.sh \
-  elpa1_real_toeplitz@SUFFIX@.sh \
-  elpa1_test_real_with_c@SUFFIX@.sh \
-  elpa1_real_cholesky@SUFFIX@.sh \
-  elpa1_real_invert_trm@SUFFIX@.sh \
-  elpa1_real_transpose_multiply@SUFFIX@.sh \
-  elpa1_complex_cholesky@SUFFIX@.sh \
-  elpa1_complex_invert_trm@SUFFIX@.sh \
-  elpa1_complex_transpose_multiply@SUFFIX@.sh \
-  elpa2_print_kernels@SUFFIX@ \
-  elpa1_test_real_c_version@SUFFIX@.sh \
-  elpa1_test_complex_c_version@SUFFIX@.sh \
-  elpa2_test_real_c_version@SUFFIX@.sh \
-  elpa2_test_complex_c_version@SUFFIX@.sh \
-  elpa_driver_real_c_version@SUFFIX@.sh \
-  elpa_driver_complex_c_version@SUFFIX@.sh
+  legacy_real_1stage@SUFFIX@.sh \
+  legacy_real_2stage@SUFFIX@.sh \
+  legacy_real_2stage_default@SUFFIX@.sh \
+  legacy_complex_1stage@SUFFIX@.sh \
+  legacy_complex_2stage@SUFFIX@.sh \
+  legacy_real_2stage_qr@SUFFIX@.sh \
+  legacy_complex_2stage_default@SUFFIX@.sh \
+  legacy_real_2stage_api@SUFFIX@.sh \
+  legacy_complex_2stage_api@SUFFIX@.sh \
+  legacy_real_driver@SUFFIX@.sh \
+  legacy_complex_driver@SUFFIX@.sh \
+  legacy_real_toeplitz@SUFFIX@.sh \
+  legacy_real_1stage_with_c@SUFFIX@.sh \
+  legacy_real_cholesky@SUFFIX@.sh \
+  legacy_real_invert_trm@SUFFIX@.sh \
+  legacy_real_transpose_multiply@SUFFIX@.sh \
+  legacy_complex_cholesky@SUFFIX@.sh \
+  legacy_complex_invert_trm@SUFFIX@.sh \
+  legacy_complex_transpose_multiply@SUFFIX@.sh \
+  legacy_real_1stage_c_version@SUFFIX@.sh \
+  legacy_complex_1stage_c_version@SUFFIX@.sh \
+  legacy_real_2stage_c_version@SUFFIX@.sh \
+  legacy_complex_2stage_c_version@SUFFIX@.sh \
+  legacy_real_driver_c_version@SUFFIX@.sh \
+  legacy_complex_driver_c_version@SUFFIX@.sh
 
 if WANT_SINGLE_PRECISION_REAL
 check_SCRIPTS += \
-  elpa1_test_real_single_precision@SUFFIX@.sh \
-  elpa2_test_real_single_precision@SUFFIX@.sh \
-  elpa2_test_real_default_single_precision@SUFFIX@.sh \
-  elpa2_test_real_qr_single_precision@SUFFIX@.sh \
-  elpa_driver_real_single_precision@SUFFIX@.sh \
-  elpa1_real_cholesky_single_precision@SUFFIX@.sh \
-  elpa1_real_invert_trm_single_precision@SUFFIX@.sh \
-  elpa1_real_transpose_multiply_single_precision@SUFFIX@.sh \
-  elpa2_test_real_api_single_precision@SUFFIX@.sh \
-  elpa_driver_real_c_version_single_precision@SUFFIX@.sh
+  legacy_single_real_1stage@SUFFIX@.sh \
+  legacy_single_real_2stage@SUFFIX@.sh \
+  legacy_single_real_2stage_default@SUFFIX@.sh \
+  legacy_single_real_2stage_qr@SUFFIX@.sh \
+  legacy_single_real_driver@SUFFIX@.sh \
+  legacy_single_real_cholesky@SUFFIX@.sh \
+  legacy_single_real_invert_trm@SUFFIX@.sh \
+  legacy_single_real_transpose_multiply@SUFFIX@.sh \
+  legacy_single_real_2stage_api@SUFFIX@.sh \
+  legacy_single_real_driver_c_version@SUFFIX@.sh
 endif
 
 if WANT_SINGLE_PRECISION_COMPLEX
 check_SCRIPTS += \
-  elpa1_test_complex_single_precision@SUFFIX@.sh \
-  elpa2_test_complex_single_precision@SUFFIX@.sh \
-  elpa2_test_complex_default_single_precision@SUFFIX@.sh \
-  elpa1_complex_cholesky_single_precision@SUFFIX@.sh \
-  elpa_driver_complex_single_precision@SUFFIX@.sh \
-  elpa1_complex_invert_trm_single_precision@SUFFIX@.sh \
-  elpa1_complex_transpose_multiply_single_precision@SUFFIX@.sh \
-  elpa2_test_complex_api_single_precision@SUFFIX@.sh \
-  elpa_driver_complex_c_version_single_precision@SUFFIX@.sh
+  legacy_single_complex_1stage@SUFFIX@.sh \
+  legacy_single_complex_2stage@SUFFIX@.sh \
+  legacy_single_complex_2stage_default@SUFFIX@.sh \
+  legacy_single_complex_cholesky@SUFFIX@.sh \
+  legacy_single_complex_driver@SUFFIX@.sh \
+  legacy_single_complex_invert_trm@SUFFIX@.sh \
+  legacy_single_complex_transpose_multiply@SUFFIX@.sh \
+  legacy_single_complex_2stage_api@SUFFIX@.sh \
+  legacy_single_complex_driver_c_version@SUFFIX@.sh
 endif
 
 if WITH_GPU_VERSION
 check_SCRIPTS += \
-  elpa1_test_real_gpu@SUFFIX@.sh \
-  elpa1_test_complex_gpu@SUFFIX@.sh \
-  elpa2_test_real_gpu@SUFFIX@.sh \
-  elpa2_test_complex_gpu@SUFFIX@.sh
+  legacy_real_1stage_gpu@SUFFIX@.sh \
+  legacy_complex_1stage_gpu@SUFFIX@.sh \
+  legacy_real_2stage_gpu@SUFFIX@.sh \
+  legacy_complex_2stage_gpu@SUFFIX@.sh
 
 if WANT_SINGLE_PRECISION_REAL
 check_SCRIPTS += \
-  elpa1_test_real_gpu_single_precision@SUFFIX@.sh \
-  elpa2_test_real_gpu_single_precision@SUFFIX@.sh
+  legacy_single_real_1stage_gpu@SUFFIX@.sh \
+  legacy_single_real_2stage_gpu@SUFFIX@.sh
 endif
 if WANT_SINGLE_PRECISION_COMPLEX
 check_SCRIPTS += \
-  elpa1_test_complex_gpu_single_precision@SUFFIX@.sh \
-  elpa2_test_complex_gpu_single_precision@SUFFIX@.sh
+  legacy_single_complex_1stage_gpu@SUFFIX@.sh \
+  legacy_single_complex_2stage_gpu@SUFFIX@.sh
 endif
 endif
 endif
@@ -1180,6 +1178,14 @@ CLEANFILES = \
   elpa1_real* \
   elpa*.sh \
   test*.sh \
+  legacy_real* \
+  legacy_complex* \
+  legacy_single_real* \
+  legacy_single_complex* \
+  single_real* \
+  single_complex* \
+  real* \
+  complex* \
   *.i
 
 clean-local:
diff --git a/src/elpa1/legacy_interface/elpa_1stage_c_interface.F90 b/src/elpa1/legacy_interface/elpa_1stage_c_interface.F90
index 5be98d299ddcfa42fdca130f64b5ea5b1970e9a2..7eeef9fa372f9f474ae017413751c90c83f1453a 100644
--- a/src/elpa1/legacy_interface/elpa_1stage_c_interface.F90
+++ b/src/elpa1/legacy_interface/elpa_1stage_c_interface.F90
@@ -255,7 +255,7 @@
 #define SINGLE_PRECISION
 #include "../../general/precision_macros.h"
 
-  !lc> int elpa_solve_evp_complex_1stage_single_precision(int na, int nev,  complex *a, int lda, float *ev, complex *q, int ldq, int nblk, int matrixCols, int mpi_comm_rows, int mpi_comm_cols, int mpi_comm_all, int useGPU);
+  !lc> int elpa_solve_evp_complex_1stage_single_precision(int na, int nev,  complex float *a, int lda, float *ev, complex float *q, int ldq, int nblk, int matrixCols, int mpi_comm_rows, int mpi_comm_cols, int mpi_comm_all, int useGPU);
 
 #include "./elpa1_c_interface_template.X90"
 
@@ -491,7 +491,7 @@
   !lc> \result success              int reports success (1) or failure (0)
   !lc> */
 
-  !lc> int elpa_mult_ah_b_complex_single(char uplo_a, char uplo_c, int na, int ncb, complex *a, int lda, int ldaCols, complex *b, int ldb, int ldbCols, int nblk, int mpi_comm_rows, int mpi_comm_cols, complex *c, int ldc, int ldcCols);
+  !lc> int elpa_mult_ah_b_complex_single(char uplo_a, char uplo_c, int na, int ncb, complex float *a, int lda, int ldaCols, complex float *b, int ldb, int ldbCols, int nblk, int mpi_comm_rows, int mpi_comm_cols, complex float *c, int ldc, int ldcCols);
 #define COMPLEXCASE 1
 #define SINGLE_PRECISION 1
 #include "../../general/precision_macros.h"
@@ -598,7 +598,7 @@
  !lc> \result succes               int reports success (1) or failure (0)
  !lc> */
 
- !lc> int elpa_invert_trm_complex_single(int na, complex *a, int lda, int nblk, int matrixCols, int mpi_comm_rows, int mpi_comm_cols, int wantDebug);
+ !lc> int elpa_invert_trm_complex_single(int na, complex float *a, int lda, int nblk, int matrixCols, int mpi_comm_rows, int mpi_comm_cols, int wantDebug);
 #define COMPLEXCASE 1
 #define SINGLE_PRECISION 1
 #include "../../general/precision_macros.h"
@@ -714,7 +714,7 @@
  !lc> \result succes               int reports success (1) or failure (0)
  !lc> */
 
- !lc> int elpa_cholesky_complex_single(int na, complex *a, int lda, int nblk, int matrixCols, int mpi_comm_rows, int mpi_comm_cols, int wantDebug);
+ !lc> int elpa_cholesky_complex_single(int na, complex float *a, int lda, int nblk, int matrixCols, int mpi_comm_rows, int mpi_comm_cols, int wantDebug);
 #define COMPLEXCASE 1
 #define SINGLE_PRECISION 1
 #include "../../general/precision_macros.h"
diff --git a/test/C/elpa_driver_complex_c_version.c b/test/C/driver/legacy_interface/legacy_complex_driver_c_version.c
similarity index 100%
rename from test/C/elpa_driver_complex_c_version.c
rename to test/C/driver/legacy_interface/legacy_complex_driver_c_version.c
diff --git a/test/C/elpa_driver_real_c_version.c b/test/C/driver/legacy_interface/legacy_real_driver_c_version.c
similarity index 100%
rename from test/C/elpa_driver_real_c_version.c
rename to test/C/driver/legacy_interface/legacy_real_driver_c_version.c
diff --git a/test/C/driver/legacy_interface/legacy_single_complex_driver_c_version.c b/test/C/driver/legacy_interface/legacy_single_complex_driver_c_version.c
new file mode 100644
index 0000000000000000000000000000000000000000..f66e7d2ee3b2ae1665fd9208e30af07f2e6bc935
--- /dev/null
+++ b/test/C/driver/legacy_interface/legacy_single_complex_driver_c_version.c
@@ -0,0 +1,292 @@
+/*     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), formerly 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 Naturwissenschaften, */
+/*       Leipzig, Abt. Komplexe Strukutren in Biologie und Kognition, */
+/*       and */
+/*     - IBM Deutschland GmbH */
+/*  */
+/*  */
+/*     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. */
+/*  */
+/*  */
+
+#include "config-f90.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#ifdef WITH_MPI
+#include <mpi.h>
+#endif
+#include <math.h>
+
+#include <elpa/elpa_legacy.h>
+#include <test/shared/generated.h>
+#include <complex.h>
+
+int main(int argc, char** argv) {
+   int myid;
+   int nprocs;
+#ifndef WITH_MPI
+   int MPI_COMM_WORLD;
+#endif
+   int na, nev, nblk;
+
+   int status;
+
+   int np_cols, np_rows, np_colsStart;
+
+   int my_blacs_ctxt, nprow, npcol, my_prow, my_pcol;
+
+   int mpierr;
+
+   int my_mpi_comm_world;
+   int mpi_comm_rows, mpi_comm_cols;
+
+   int info, *sc_desc;
+
+   int na_rows, na_cols;
+   float startVal;
+
+   complex float *a, *z, *as;
+
+   float *ev;
+
+   int success;
+   int i;
+
+   int useGPU, THIS_COMPLEX_ELPA_KERNEL_API;
+#ifdef WITH_MPI
+   MPI_Init(&argc, &argv);
+   MPI_Comm_size(MPI_COMM_WORLD, &nprocs);
+   MPI_Comm_rank(MPI_COMM_WORLD, &myid);
+#else
+   nprocs = 1;
+   myid =0;
+   MPI_COMM_WORLD=1;
+#endif
+   na = 1000;
+   nev = 500;
+   nblk = 16;
+
+   if (myid == 0) {
+     printf("This is the c version of an ELPA test-programm\n");
+     printf("\n");
+     printf("It will call the ELPA complex solver for a matrix\n");
+     printf("of matrix size %d. It will compute %d eigenvalues\n",na,nev);
+     printf("and uses a blocksize of %d\n",nblk);
+     printf("\n");
+     printf("This is an example program with much less functionality\n");
+     printf("as it's Fortran counterpart. It's only purpose is to show how \n");
+     printf("to evoke ELPA1 from a c programm\n");
+
+     printf("\n");
+
+   }
+
+   status = 0;
+
+   startVal = sqrt((float) nprocs);
+   np_colsStart = (int) round(startVal);
+   for (np_cols=np_colsStart;np_cols>1;np_cols--){
+     if (nprocs %np_cols ==0){
+     break;
+     }
+   }
+
+   np_rows = nprocs/np_cols;
+
+   if (myid == 0) {
+     printf("\n");
+     printf("Number of processor rows %d, cols %d, total %d \n",np_rows,np_cols,nprocs);
+   }
+
+   /* set up blacs */
+   /* convert communicators before */
+#ifdef WITH_MPI
+   my_mpi_comm_world = MPI_Comm_c2f(MPI_COMM_WORLD);
+#else
+   my_mpi_comm_world = 1;
+#endif
+   set_up_blacsgrid_f(my_mpi_comm_world, &my_blacs_ctxt, &np_rows, &np_cols, &nprow, &npcol, &my_prow, &my_pcol);
+
+   if (myid == 0) {
+     printf("\n");
+     printf("Past BLACS_Gridinfo...\n");
+     printf("\n");
+   }
+
+   /* get the ELPA row and col communicators. */
+   /* These are NOT usable in C without calling the MPI_Comm_f2c function on them !! */
+#ifdef WITH_MPI
+   my_mpi_comm_world = MPI_Comm_c2f(MPI_COMM_WORLD);
+#endif
+   mpierr = elpa_get_communicators(my_mpi_comm_world, my_prow, my_pcol, &mpi_comm_rows, &mpi_comm_cols);
+
+   if (myid == 0) {
+     printf("\n");
+     printf("Past split communicator setup for rows and columns...\n");
+     printf("\n");
+   }
+
+   sc_desc = malloc(9*sizeof(int));
+
+   set_up_blacs_descriptor_f(na, nblk, my_prow, my_pcol, np_rows, np_cols, &na_rows, &na_cols, sc_desc, my_blacs_ctxt, &info);
+
+   if (myid == 0) {
+     printf("\n");
+     printf("Past scalapack descriptor setup...\n");
+     printf("\n");
+   }
+
+   /* allocate the matrices needed for elpa */
+   if (myid == 0) {
+     printf("\n");
+     printf("Allocating matrices with na_rows=%d and na_cols=%d\n",na_rows, na_cols);
+     printf("\n");
+   }
+
+   a  = malloc(na_rows*na_cols*sizeof(complex float));
+   z  = malloc(na_rows*na_cols*sizeof(complex float));
+   as = malloc(na_rows*na_cols*sizeof(complex float));
+   ev = malloc(na*sizeof(float));
+
+   prepare_matrix_complex_single_f(na, myid, na_rows, na_cols, sc_desc, a, z, as);
+
+   if (myid == 0) {
+     printf("\n");
+     printf("Entering ELPA 1stage complex solver\n");
+     printf("\n");
+   }
+#ifdef WITH_MPI
+   mpierr = MPI_Barrier(MPI_COMM_WORLD);
+#endif
+   useGPU = 0;
+   THIS_COMPLEX_ELPA_KERNEL_API = ELPA_2STAGE_COMPLEX_DEFAULT;
+   success = elpa_solve_evp_complex_single(na, nev, a, na_rows, ev, z, na_rows, nblk, na_cols, mpi_comm_rows, mpi_comm_cols, my_mpi_comm_world, THIS_COMPLEX_ELPA_KERNEL_API, useGPU, "1stage");
+
+   if (success != 1) {
+     printf("error in ELPA solve \n");
+#ifdef WITH_MPI
+     mpierr = MPI_Abort(MPI_COMM_WORLD, 99);
+#endif
+   }
+
+
+   if (myid == 0) {
+     printf("\n");
+     printf("1stage ELPA complex solver complete\n");
+     printf("\n");
+   }
+
+   for (i=0;i<na_rows*na_cols;i++){
+      a[i] = as[i];
+      z[i] = as[i];
+   }
+   if (myid == 0) {
+     printf("\n");
+     printf("Entering ELPA 2stage complex solver\n");
+     printf("\n");
+   }
+#ifdef WITH_MPI
+   mpierr = MPI_Barrier(MPI_COMM_WORLD);
+#endif
+   useGPU =0;
+   THIS_COMPLEX_ELPA_KERNEL_API = ELPA_2STAGE_COMPLEX_DEFAULT;
+   success = elpa_solve_evp_complex_single(na, nev, a, na_rows, ev, z, na_rows, nblk, na_cols, mpi_comm_rows, mpi_comm_cols, my_mpi_comm_world, THIS_COMPLEX_ELPA_KERNEL_API, useGPU, "2stage");
+
+   if (success != 1) {
+     printf("error in ELPA solve \n");
+#ifdef WITH_MPI
+     mpierr = MPI_Abort(MPI_COMM_WORLD, 99);
+#endif
+   }
+
+   if (myid == 0) {
+     printf("\n");
+     printf("2stage ELPA complex solver complete\n");
+     printf("\n");
+   }
+
+   for (i=0;i<na_rows*na_cols;i++){
+      a[i] = as[i];
+      z[i] = as[i];
+   }
+   if (myid == 0) {
+     printf("\n");
+     printf("Entering auto-chosen ELPA complex solver\n");
+     printf("\n");
+   }
+#ifdef WITH_MPI
+   mpierr = MPI_Barrier(MPI_COMM_WORLD);
+#endif
+   useGPU = 0;
+   THIS_COMPLEX_ELPA_KERNEL_API = ELPA_2STAGE_COMPLEX_DEFAULT;
+   success = elpa_solve_evp_complex_single(na, nev, a, na_rows, ev, z, na_rows, nblk, na_cols, mpi_comm_rows, mpi_comm_cols, my_mpi_comm_world, THIS_COMPLEX_ELPA_KERNEL_API, useGPU, "auto");
+
+   if (success != 1) {
+     printf("error in ELPA solve \n");
+#ifdef WITH_MPI
+     mpierr = MPI_Abort(MPI_COMM_WORLD, 99);
+#endif
+   }
+
+   if (myid == 0) {
+     printf("\n");
+     printf("Auto-chosen ELPA complex solver complete\n");
+     printf("\n");
+   }
+
+   /* check the results */
+   status = check_correctness_complex_single_f(na, nev, na_rows, na_cols, as, z, ev, sc_desc, myid);
+
+   if (status !=0){
+     printf("The computed EVs are not correct !\n");
+   }
+   if (status ==0){
+     if (myid == 0) {
+       printf("All ok!\n");
+     }
+   }
+
+   free(sc_desc);
+   free(a);
+   free(z);
+   free(as);
+   free(ev);
+
+#ifdef WITH_MPI
+   MPI_Finalize();
+#endif
+   return 0;
+}
diff --git a/test/C/elpa_driver_real_c_version_single.c b/test/C/driver/legacy_interface/legacy_single_real_driver_c_version.c
similarity index 100%
rename from test/C/elpa_driver_real_c_version_single.c
rename to test/C/driver/legacy_interface/legacy_single_real_driver_c_version.c
diff --git a/test/C/elpa1_test_complex_c_version.c b/test/C/elpa1/legacy_interface/legacy_complex_1stage_c_version.c
similarity index 100%
rename from test/C/elpa1_test_complex_c_version.c
rename to test/C/elpa1/legacy_interface/legacy_complex_1stage_c_version.c
diff --git a/test/C/elpa1_test_real_c_version.c b/test/C/elpa1/legacy_interface/legacy_real_1stage_c_version.c
similarity index 100%
rename from test/C/elpa1_test_real_c_version.c
rename to test/C/elpa1/legacy_interface/legacy_real_1stage_c_version.c
diff --git a/test/C/elpa2_test_complex_c_version.c b/test/C/elpa2/legacy_interface/legacy_complex_2stage_c_version.c
similarity index 100%
rename from test/C/elpa2_test_complex_c_version.c
rename to test/C/elpa2/legacy_interface/legacy_complex_2stage_c_version.c
diff --git a/test/C/elpa2_test_real_c_version.c b/test/C/elpa2/legacy_interface/legacy_real_2stage_c_version.c
similarity index 100%
rename from test/C/elpa2_test_real_c_version.c
rename to test/C/elpa2/legacy_interface/legacy_real_2stage_c_version.c
diff --git a/test/Fortran/test_driver_complex.F90 b/test/Fortran/driver/legacy_interface/legacy_complex_driver.F90
similarity index 99%
rename from test/Fortran/test_driver_complex.F90
rename to test/Fortran/driver/legacy_interface/legacy_complex_driver.F90
index 31ccc937e5820e358dc4b85a6076195605aa17f4..a0e6fca6e7d707b1f84f61d83b8adf2f3cab0077 100644
--- a/test/Fortran/test_driver_complex.F90
+++ b/test/Fortran/driver/legacy_interface/legacy_complex_driver.F90
@@ -144,7 +144,7 @@ program test_complex2
    STATUS = 0
 
 #define DATATYPE COMPLEX
-#include "elpa_print_headers.X90"
+#include "../../elpa_print_headers.X90"
 
 #ifdef HAVE_DETAILED_TIMINGS
 
diff --git a/test/Fortran/test_driver_real.F90 b/test/Fortran/driver/legacy_interface/legacy_real_driver.F90
similarity index 99%
rename from test/Fortran/test_driver_real.F90
rename to test/Fortran/driver/legacy_interface/legacy_real_driver.F90
index a444416e738552ac8d359f30f3c23bd3ed2db792..948d537cf8cae10ddebfce032cb22dbf827de342 100644
--- a/test/Fortran/test_driver_real.F90
+++ b/test/Fortran/driver/legacy_interface/legacy_real_driver.F90
@@ -144,7 +144,7 @@ program test_real2
    STATUS = 0
 
 #define DATATYPE REAL
-#include "elpa_print_headers.X90"
+#include "../../elpa_print_headers.X90"
 
 #ifdef HAVE_DETAILED_TIMINGS
 
diff --git a/test/Fortran/test_driver_complex_single.F90 b/test/Fortran/driver/legacy_interface/legacy_single_complex_driver.F90
similarity index 99%
rename from test/Fortran/test_driver_complex_single.F90
rename to test/Fortran/driver/legacy_interface/legacy_single_complex_driver.F90
index f7341336120b61f8fed17bfda4b7e109bb456e09..c3723245c6d7afd0a497c51758cebd56762a245a 100644
--- a/test/Fortran/test_driver_complex_single.F90
+++ b/test/Fortran/driver/legacy_interface/legacy_single_complex_driver.F90
@@ -144,7 +144,7 @@ program test_complex2
    STATUS = 0
 
 #define DATATYPE COMPLEX
-#include "elpa_print_headers.X90"
+#include "../../elpa_print_headers.X90"
 
 #ifdef HAVE_DETAILED_TIMINGS
 
diff --git a/test/Fortran/test_driver_real_single.F90 b/test/Fortran/driver/legacy_interface/legacy_single_real_driver.F90
similarity index 99%
rename from test/Fortran/test_driver_real_single.F90
rename to test/Fortran/driver/legacy_interface/legacy_single_real_driver.F90
index 2ea0539b06dda12d96ab1899ac2554cd0f1a11c6..12cc85b54196ebb333a17f0cac3e0455301dc4e1 100644
--- a/test/Fortran/test_driver_real_single.F90
+++ b/test/Fortran/driver/legacy_interface/legacy_single_real_driver.F90
@@ -143,7 +143,7 @@ program test_real2
    STATUS = 0
 
 #define DATATYPE REAL
-#include "elpa_print_headers.X90"
+#include "../../elpa_print_headers.X90"
 
 #ifdef HAVE_DETAILED_TIMINGS
 
diff --git a/test/Fortran/complex_1stage.F90 b/test/Fortran/elpa1/complex_1stage.F90
similarity index 99%
rename from test/Fortran/complex_1stage.F90
rename to test/Fortran/elpa1/complex_1stage.F90
index 122488e2a81c56a1b93a3e191b2e987148ec1435..f18c04f6dfe8175e83f5a4ffa49ca3a237c31e70 100644
--- a/test/Fortran/complex_1stage.F90
+++ b/test/Fortran/elpa1/complex_1stage.F90
@@ -42,7 +42,7 @@
 !
 #include "config-f90.h"
 
-#include "assert.h"
+#include "../assert.h"
 
 program test_interface
    use precision
diff --git a/test/Fortran/complex_1stage_gpu.F90 b/test/Fortran/elpa1/complex_1stage_gpu.F90
similarity index 99%
rename from test/Fortran/complex_1stage_gpu.F90
rename to test/Fortran/elpa1/complex_1stage_gpu.F90
index 63cdb9813a242a7f5121a21d8078a1734e7085fd..802ef5ea5a7531454cb1b4a7fa9a3e223300e235 100644
--- a/test/Fortran/complex_1stage_gpu.F90
+++ b/test/Fortran/elpa1/complex_1stage_gpu.F90
@@ -42,7 +42,7 @@
 !
 #include "config-f90.h"
 
-#include "assert.h"
+#include "../assert.h"
 
 program test_interface
    use precision
diff --git a/test/Fortran/elpa1/complex.F90 b/test/Fortran/elpa1/legacy_interface/legacy_complex.F90
similarity index 99%
rename from test/Fortran/elpa1/complex.F90
rename to test/Fortran/elpa1/legacy_interface/legacy_complex.F90
index e7aee895bfde2a5f1aaac2dd4b9b506f99771ff3..cb0d58f12cced8f662d7cd17998cce2c118a6fb0 100644
--- a/test/Fortran/elpa1/complex.F90
+++ b/test/Fortran/elpa1/legacy_interface/legacy_complex.F90
@@ -139,7 +139,7 @@ program test_complex_double_precision
 
 #define COMPLEXCASE
 #define ELPA1
-#include "../elpa_print_headers.X90"
+#include "../../elpa_print_headers.X90"
 
 #ifdef HAVE_DETAILED_TIMINGS
 
diff --git a/test/Fortran/elpa1/complex_cholesky.F90 b/test/Fortran/elpa1/legacy_interface/legacy_complex_cholesky.F90
similarity index 100%
rename from test/Fortran/elpa1/complex_cholesky.F90
rename to test/Fortran/elpa1/legacy_interface/legacy_complex_cholesky.F90
diff --git a/test/Fortran/elpa1/complex_gpu.F90 b/test/Fortran/elpa1/legacy_interface/legacy_complex_gpu.F90
similarity index 99%
rename from test/Fortran/elpa1/complex_gpu.F90
rename to test/Fortran/elpa1/legacy_interface/legacy_complex_gpu.F90
index 035a838c145be95a4ac07127e77ea15c3b8d4bff..33752be7d625206e3fa951d8c9a3dc65618a9155 100644
--- a/test/Fortran/elpa1/complex_gpu.F90
+++ b/test/Fortran/elpa1/legacy_interface/legacy_complex_gpu.F90
@@ -147,7 +147,7 @@ program test_complex_gpu_version_double_precision
 
 #define COMPLEXCASE
 #define ELPA1
-#include "../elpa_print_headers.X90"
+#include "../../elpa_print_headers.X90"
 
 #ifdef HAVE_DETAILED_TIMINGS
 
diff --git a/test/Fortran/elpa1/complex_invert_trm.F90 b/test/Fortran/elpa1/legacy_interface/legacy_complex_invert_trm.F90
similarity index 100%
rename from test/Fortran/elpa1/complex_invert_trm.F90
rename to test/Fortran/elpa1/legacy_interface/legacy_complex_invert_trm.F90
diff --git a/test/Fortran/test_transpose_multiply_complex.F90 b/test/Fortran/elpa1/legacy_interface/legacy_complex_transpose_multiply.F90
similarity index 100%
rename from test/Fortran/test_transpose_multiply_complex.F90
rename to test/Fortran/elpa1/legacy_interface/legacy_complex_transpose_multiply.F90
diff --git a/test/Fortran/elpa1/real.F90 b/test/Fortran/elpa1/legacy_interface/legacy_real.F90
similarity index 99%
rename from test/Fortran/elpa1/real.F90
rename to test/Fortran/elpa1/legacy_interface/legacy_real.F90
index 95aa98dd298994c729b1aac62e270fbf7d0f82a0..4785488847bd0fce02f2cb7ed6ed3749304d5041 100644
--- a/test/Fortran/elpa1/real.F90
+++ b/test/Fortran/elpa1/legacy_interface/legacy_real.F90
@@ -141,7 +141,7 @@ program test_real_double_precision
 
 #define REALCASE
 #define ELPA1
-#include "../elpa_print_headers.X90"
+#include "../../elpa_print_headers.X90"
 
 #ifdef HAVE_DETAILED_TIMINGS
 
diff --git a/test/Fortran/test_real_with_c.F90 b/test/Fortran/elpa1/legacy_interface/legacy_real_1stage_with_c.F90
similarity index 100%
rename from test/Fortran/test_real_with_c.F90
rename to test/Fortran/elpa1/legacy_interface/legacy_real_1stage_with_c.F90
diff --git a/test/Fortran/elpa1/real_cholesky.F90 b/test/Fortran/elpa1/legacy_interface/legacy_real_cholesky.F90
similarity index 100%
rename from test/Fortran/elpa1/real_cholesky.F90
rename to test/Fortran/elpa1/legacy_interface/legacy_real_cholesky.F90
diff --git a/test/Fortran/elpa1/real_gpu.F90 b/test/Fortran/elpa1/legacy_interface/legacy_real_gpu.F90
similarity index 99%
rename from test/Fortran/elpa1/real_gpu.F90
rename to test/Fortran/elpa1/legacy_interface/legacy_real_gpu.F90
index 97a6175ab7551cdc90ddadea4ed351d4b54051de..7b7ea360f1c5c4e7b83a335afff1bcdf92ead2ef 100644
--- a/test/Fortran/elpa1/real_gpu.F90
+++ b/test/Fortran/elpa1/legacy_interface/legacy_real_gpu.F90
@@ -149,7 +149,7 @@ program test_real_gpu_version_double_precision
 
 #define REALCASE
 #define ELPA1
-#include "../elpa_print_headers.X90"
+#include "../../elpa_print_headers.X90"
 
 #ifdef HAVE_DETAILED_TIMINGS
 
diff --git a/test/Fortran/elpa1/real_invert_trm.F90 b/test/Fortran/elpa1/legacy_interface/legacy_real_invert_trm.F90
similarity index 100%
rename from test/Fortran/elpa1/real_invert_trm.F90
rename to test/Fortran/elpa1/legacy_interface/legacy_real_invert_trm.F90
diff --git a/test/Fortran/test_transpose_multiply_real.F90 b/test/Fortran/elpa1/legacy_interface/legacy_real_transpose_multiply.F90
similarity index 100%
rename from test/Fortran/test_transpose_multiply_real.F90
rename to test/Fortran/elpa1/legacy_interface/legacy_real_transpose_multiply.F90
diff --git a/test/Fortran/elpa1/single_complex.F90 b/test/Fortran/elpa1/legacy_interface/legacy_single_complex.F90
similarity index 99%
rename from test/Fortran/elpa1/single_complex.F90
rename to test/Fortran/elpa1/legacy_interface/legacy_single_complex.F90
index cade218bc12d30fcd81ac7b07fd465b0586f738e..13746c8f4d912b77d093e94f076be4ad34187cec 100644
--- a/test/Fortran/elpa1/single_complex.F90
+++ b/test/Fortran/elpa1/legacy_interface/legacy_single_complex.F90
@@ -139,7 +139,7 @@ program test_complex_single_precision
 
 #define COMPLEXCASE
 #define ELPA1
-#include "../elpa_print_headers.X90"
+#include "../../elpa_print_headers.X90"
 
 #ifdef HAVE_DETAILED_TIMINGS
 
diff --git a/test/Fortran/elpa1/single_complex_cholesky.F90 b/test/Fortran/elpa1/legacy_interface/legacy_single_complex_cholesky.F90
similarity index 100%
rename from test/Fortran/elpa1/single_complex_cholesky.F90
rename to test/Fortran/elpa1/legacy_interface/legacy_single_complex_cholesky.F90
diff --git a/test/Fortran/elpa1/single_complex_gpu.F90 b/test/Fortran/elpa1/legacy_interface/legacy_single_complex_gpu.F90
similarity index 99%
rename from test/Fortran/elpa1/single_complex_gpu.F90
rename to test/Fortran/elpa1/legacy_interface/legacy_single_complex_gpu.F90
index b74874b8feea67780f69414a1b9ae4c5f63cb000..069757edcd5b55e1b3f7577db3d573851a2c270b 100644
--- a/test/Fortran/elpa1/single_complex_gpu.F90
+++ b/test/Fortran/elpa1/legacy_interface/legacy_single_complex_gpu.F90
@@ -147,7 +147,7 @@ program test_complex_gpu_version_single_precision
 
 #define COMPLEXCASE
 #define ELPA1
-#include "../elpa_print_headers.X90"
+#include "../../elpa_print_headers.X90"
 
 #ifdef HAVE_DETAILED_TIMINGS
 
diff --git a/test/Fortran/elpa1/single_complex_invert_trm.F90 b/test/Fortran/elpa1/legacy_interface/legacy_single_complex_invert_trm.F90
similarity index 100%
rename from test/Fortran/elpa1/single_complex_invert_trm.F90
rename to test/Fortran/elpa1/legacy_interface/legacy_single_complex_invert_trm.F90
diff --git a/test/Fortran/test_transpose_multiply_complex_single.F90 b/test/Fortran/elpa1/legacy_interface/legacy_single_complex_transpose_multiply.F90
similarity index 100%
rename from test/Fortran/test_transpose_multiply_complex_single.F90
rename to test/Fortran/elpa1/legacy_interface/legacy_single_complex_transpose_multiply.F90
diff --git a/test/Fortran/elpa1/single_real.F90 b/test/Fortran/elpa1/legacy_interface/legacy_single_real.F90
similarity index 99%
rename from test/Fortran/elpa1/single_real.F90
rename to test/Fortran/elpa1/legacy_interface/legacy_single_real.F90
index d637c6774f0dc19b81bcbc6b82edeee88e05859a..4a25d713fd8e4133cbbc3bf3cce4573284ee1100 100644
--- a/test/Fortran/elpa1/single_real.F90
+++ b/test/Fortran/elpa1/legacy_interface/legacy_single_real.F90
@@ -140,7 +140,7 @@ program test_real_single_precision
 
 #define REALCASE
 #define ELPA1
-#include "../elpa_print_headers.X90"
+#include "../../elpa_print_headers.X90"
 
 #ifdef HAVE_DETAILED_TIMINGS
 
diff --git a/test/Fortran/elpa1/single_real_cholesky.F90 b/test/Fortran/elpa1/legacy_interface/legacy_single_real_cholesky.F90
similarity index 100%
rename from test/Fortran/elpa1/single_real_cholesky.F90
rename to test/Fortran/elpa1/legacy_interface/legacy_single_real_cholesky.F90
diff --git a/test/Fortran/elpa1/single_real_gpu.F90 b/test/Fortran/elpa1/legacy_interface/legacy_single_real_gpu.F90
similarity index 99%
rename from test/Fortran/elpa1/single_real_gpu.F90
rename to test/Fortran/elpa1/legacy_interface/legacy_single_real_gpu.F90
index 7b0670da4673041766bb954c85c05b0062e5b2b5..44b8a32ad0e0945ed522a04b79f87e631902a379 100644
--- a/test/Fortran/elpa1/single_real_gpu.F90
+++ b/test/Fortran/elpa1/legacy_interface/legacy_single_real_gpu.F90
@@ -149,7 +149,7 @@ program test_real_gpu_version_single_precision
 
 #define REALCASE
 #define ELPA1
-#include "../elpa_print_headers.X90"
+#include "../../elpa_print_headers.X90"
 
 #ifdef HAVE_DETAILED_TIMINGS
 
diff --git a/test/Fortran/elpa1/single_real_invert_trm.F90 b/test/Fortran/elpa1/legacy_interface/legacy_single_real_invert_trm.F90
similarity index 100%
rename from test/Fortran/elpa1/single_real_invert_trm.F90
rename to test/Fortran/elpa1/legacy_interface/legacy_single_real_invert_trm.F90
diff --git a/test/Fortran/test_transpose_multiply_real_single.F90 b/test/Fortran/elpa1/legacy_interface/legacy_single_real_transpose_multiply.F90
similarity index 100%
rename from test/Fortran/test_transpose_multiply_real_single.F90
rename to test/Fortran/elpa1/legacy_interface/legacy_single_real_transpose_multiply.F90
diff --git a/test/Fortran/elpa1/single_toeplitz.F90 b/test/Fortran/elpa1/legacy_interface/legacy_single_toeplitz.F90
similarity index 99%
rename from test/Fortran/elpa1/single_toeplitz.F90
rename to test/Fortran/elpa1/legacy_interface/legacy_single_toeplitz.F90
index a284dfcfda3976d1934d5be3da28603ee451d0f5..dd88ef45ee6ae342dc964682be5138f9451fc3c4 100644
--- a/test/Fortran/elpa1/single_toeplitz.F90
+++ b/test/Fortran/elpa1/legacy_interface/legacy_single_toeplitz.F90
@@ -131,7 +131,7 @@ program test_solve_tridi_single
 
 !#define DATATYPE REAL
 !#define ELPA1
-!#include "../elpa_print_headers.X90"
+!#include "../../elpa_print_headers.X90"
 
 #ifdef HAVE_DETAILED_TIMINGS
 
diff --git a/test/Fortran/elpa1/toeplitz.F90 b/test/Fortran/elpa1/legacy_interface/legacy_toeplitz.F90
similarity index 99%
rename from test/Fortran/elpa1/toeplitz.F90
rename to test/Fortran/elpa1/legacy_interface/legacy_toeplitz.F90
index a41ef112d283276948e43668857fc42f1d366c19..6bbfee35ce191e9522a65bd0402cc31df030056c 100644
--- a/test/Fortran/elpa1/toeplitz.F90
+++ b/test/Fortran/elpa1/legacy_interface/legacy_toeplitz.F90
@@ -131,7 +131,7 @@ program test_solve_tridi
 
 !#define DATATYPE REAL
 !#define ELPA1
-!#include "../elpa_print_headers.X90"
+!#include "../../elpa_print_headers.X90"
 
 #ifdef HAVE_DETAILED_TIMINGS
 
diff --git a/test/Fortran/real_1stage.F90 b/test/Fortran/elpa1/real_1stage.F90
similarity index 99%
rename from test/Fortran/real_1stage.F90
rename to test/Fortran/elpa1/real_1stage.F90
index 73bc3bd8919fafb959373b46a5a530749f075e1f..903831918b919ad6349c64344fdea008c08b22fd 100644
--- a/test/Fortran/real_1stage.F90
+++ b/test/Fortran/elpa1/real_1stage.F90
@@ -42,7 +42,7 @@
 !
 #include "config-f90.h"
 
-#include "assert.h"
+#include "../assert.h"
 
 program test_interface
    use precision
diff --git a/test/Fortran/real_1stage_gpu.F90 b/test/Fortran/elpa1/real_1stage_gpu.F90
similarity index 99%
rename from test/Fortran/real_1stage_gpu.F90
rename to test/Fortran/elpa1/real_1stage_gpu.F90
index 40e0ed8b9ec6c669a2d156a0637b0cf45c9db188..ec859a51de7e1352e7a78e868d2f02bf0ad53e34 100644
--- a/test/Fortran/real_1stage_gpu.F90
+++ b/test/Fortran/elpa1/real_1stage_gpu.F90
@@ -42,7 +42,7 @@
 !
 #include "config-f90.h"
 
-#include "assert.h"
+#include "../assert.h"
 
 program test_interface
    use precision
diff --git a/test/Fortran/single_complex_1stage.F90 b/test/Fortran/elpa1/single_complex_1stage.F90
similarity index 99%
rename from test/Fortran/single_complex_1stage.F90
rename to test/Fortran/elpa1/single_complex_1stage.F90
index f1f7f281665f286ac14eb5f6aa034b6a15ef37cf..0a1a4dfd1ce0d72f98444c68f494a7aa8784a688 100644
--- a/test/Fortran/single_complex_1stage.F90
+++ b/test/Fortran/elpa1/single_complex_1stage.F90
@@ -42,7 +42,7 @@
 !
 #include "config-f90.h"
 
-#include "assert.h"
+#include "../assert.h"
 
 program test_interface
    use precision
diff --git a/test/Fortran/single_complex_1stage_gpu.F90 b/test/Fortran/elpa1/single_complex_1stage_gpu.F90
similarity index 99%
rename from test/Fortran/single_complex_1stage_gpu.F90
rename to test/Fortran/elpa1/single_complex_1stage_gpu.F90
index e96712bbfef5132435ee00345b7cb33740cce6df..f48f59eef01127023b3f559c4753f2aba5ee35db 100644
--- a/test/Fortran/single_complex_1stage_gpu.F90
+++ b/test/Fortran/elpa1/single_complex_1stage_gpu.F90
@@ -42,7 +42,7 @@
 !
 #include "config-f90.h"
 
-#include "assert.h"
+#include "../assert.h"
 
 program test_interface
    use precision
diff --git a/test/Fortran/single_real_1stage.F90 b/test/Fortran/elpa1/single_real_1stage.F90
similarity index 99%
rename from test/Fortran/single_real_1stage.F90
rename to test/Fortran/elpa1/single_real_1stage.F90
index 8190fd4e75a92c8cdccda7f4974c2ed26faf53b6..c255c789ed574f7db506a47942d2be70eb61dc6d 100644
--- a/test/Fortran/single_real_1stage.F90
+++ b/test/Fortran/elpa1/single_real_1stage.F90
@@ -42,7 +42,7 @@
 !
 #include "config-f90.h"
 
-#include "assert.h"
+#include "../assert.h"
 
 program test_interface
    use precision
diff --git a/test/Fortran/single_real_1stage_gpu.F90 b/test/Fortran/elpa1/single_real_1stage_gpu.F90
similarity index 99%
rename from test/Fortran/single_real_1stage_gpu.F90
rename to test/Fortran/elpa1/single_real_1stage_gpu.F90
index fc4725e1df8a692ba0d5e20360166c90490f1b2c..1252405de202e6fd4902a948a8aa0e06fad6c891 100644
--- a/test/Fortran/single_real_1stage_gpu.F90
+++ b/test/Fortran/elpa1/single_real_1stage_gpu.F90
@@ -42,7 +42,7 @@
 !
 #include "config-f90.h"
 
-#include "assert.h"
+#include "../assert.h"
 
 program test_interface
    use precision
diff --git a/test/Fortran/complex_2stage.F90 b/test/Fortran/elpa2/complex_2stage.F90
similarity index 99%
rename from test/Fortran/complex_2stage.F90
rename to test/Fortran/elpa2/complex_2stage.F90
index 6178bb48b4b29d8deb7e84d4f67c1d1cb4516a0e..31f4415bea52fa2d585aa8da374b0d18660d361b 100644
--- a/test/Fortran/complex_2stage.F90
+++ b/test/Fortran/elpa2/complex_2stage.F90
@@ -42,7 +42,7 @@
 !
 #include "config-f90.h"
 
-#include "assert.h"
+#include "../assert.h"
 
 program test_interface
    use precision
diff --git a/test/Fortran/complex_2stage_banded.F90 b/test/Fortran/elpa2/complex_2stage_banded.F90
similarity index 99%
rename from test/Fortran/complex_2stage_banded.F90
rename to test/Fortran/elpa2/complex_2stage_banded.F90
index e7b4c05448e0014bcbf956be7c89c118ed8f007f..23c31e53a7d22dc46e891ecbec3d5790541471ee 100644
--- a/test/Fortran/complex_2stage_banded.F90
+++ b/test/Fortran/elpa2/complex_2stage_banded.F90
@@ -41,7 +41,7 @@
 !
 !
 #include "config-f90.h"
-#include "assert.h"
+#include "../assert.h"
 !>
 !> Fortran test programm to demonstrates the use of
 !> ELPA 2 complex case library.
@@ -154,7 +154,7 @@ program test_complex2_double_banded
 
    STATUS = 0
 
-#include "elpa_print_headers.X90"
+#include "../elpa_print_headers.X90"
 
 #ifdef HAVE_DETAILED_TIMINGS
 
diff --git a/test/Fortran/complex_2stage_gpu.F90 b/test/Fortran/elpa2/complex_2stage_gpu.F90
similarity index 99%
rename from test/Fortran/complex_2stage_gpu.F90
rename to test/Fortran/elpa2/complex_2stage_gpu.F90
index 751e9ee9dbfc9528933db212d84b09c8b426e3ac..631020432309441d24a28a574fcb64dca7fc7a30 100644
--- a/test/Fortran/complex_2stage_gpu.F90
+++ b/test/Fortran/elpa2/complex_2stage_gpu.F90
@@ -42,7 +42,7 @@
 !
 #include "config-f90.h"
 
-#include "assert.h"
+#include "../assert.h"
 
 program test_interface
    use precision
diff --git a/test/Fortran/elpa2/complex.F90 b/test/Fortran/elpa2/legacy_interface/legacy_complex.F90
similarity index 99%
rename from test/Fortran/elpa2/complex.F90
rename to test/Fortran/elpa2/legacy_interface/legacy_complex.F90
index bc0a74b862742eb8f2364bc0555282fc419a3555..5d29d30e805ee9186c0c29c369f6da2487c30618 100644
--- a/test/Fortran/elpa2/complex.F90
+++ b/test/Fortran/elpa2/legacy_interface/legacy_complex.F90
@@ -154,7 +154,7 @@ program test_complex2_double_precision
 
    STATUS = 0
 
-#include "../elpa_print_headers.X90"
+#include "../../elpa_print_headers.X90"
 
 #ifdef HAVE_DETAILED_TIMINGS
 
diff --git a/test/Fortran/elpa2/complex_api.F90 b/test/Fortran/elpa2/legacy_interface/legacy_complex_api.F90
similarity index 99%
rename from test/Fortran/elpa2/complex_api.F90
rename to test/Fortran/elpa2/legacy_interface/legacy_complex_api.F90
index 00d2efd54b4c7b4154112bcf351b82d41ac68000..4069297225b99c99afcc78eb272f5d9b54e06e58 100644
--- a/test/Fortran/elpa2/complex_api.F90
+++ b/test/Fortran/elpa2/legacy_interface/legacy_complex_api.F90
@@ -154,7 +154,7 @@ program test_complex2_choose_kernel_with_api_double_precision
    STATUS = 0
 
 #define COMPLEXCASE
-#include "../elpa_print_headers.X90"
+#include "../../elpa_print_headers.X90"
 
 #ifdef HAVE_DETAILED_TIMINGS
 
diff --git a/test/Fortran/elpa2/complex_default_kernel.F90 b/test/Fortran/elpa2/legacy_interface/legacy_complex_default_kernel.F90
similarity index 99%
rename from test/Fortran/elpa2/complex_default_kernel.F90
rename to test/Fortran/elpa2/legacy_interface/legacy_complex_default_kernel.F90
index f5bd725ca675e7045cfe63c8162640e9c045c9ba..0462107ab2596544a0b17bc77db86b82ab884fd4 100644
--- a/test/Fortran/elpa2/complex_default_kernel.F90
+++ b/test/Fortran/elpa2/legacy_interface/legacy_complex_default_kernel.F90
@@ -154,7 +154,7 @@ program test_complex2_default_kernel_double_precision
    STATUS = 0
 
 #define COMPLEXCASE
-#include "../elpa_print_headers.X90"
+#include "../../elpa_print_headers.X90"
 
 #ifdef HAVE_DETAILED_TIMINGS
 
diff --git a/test/Fortran/elpa2/complex_gpu.F90 b/test/Fortran/elpa2/legacy_interface/legacy_complex_gpu.F90
similarity index 99%
rename from test/Fortran/elpa2/complex_gpu.F90
rename to test/Fortran/elpa2/legacy_interface/legacy_complex_gpu.F90
index 1c121d5c07fd0f0b7dbcb597600464822c0513b9..efcb2bdac828807f13ace2f2b9627639c176b009 100644
--- a/test/Fortran/elpa2/complex_gpu.F90
+++ b/test/Fortran/elpa2/legacy_interface/legacy_complex_gpu.F90
@@ -155,7 +155,7 @@ program test_complex2_gpu_version_double_precision
    STATUS = 0
 
 #define COMPLEXCASE
-#include "../elpa_print_headers.X90"
+#include "../../elpa_print_headers.X90"
 
 #ifdef HAVE_DETAILED_TIMINGS
 
diff --git a/test/Fortran/elpa2/real.F90 b/test/Fortran/elpa2/legacy_interface/legacy_real.F90
similarity index 99%
rename from test/Fortran/elpa2/real.F90
rename to test/Fortran/elpa2/legacy_interface/legacy_real.F90
index 7ac2a8ba3822259d7742c3859e9adac87c9b28a0..aa5dec1dae8954b5d8daf8ab2e272f72fe68571e 100644
--- a/test/Fortran/elpa2/real.F90
+++ b/test/Fortran/elpa2/legacy_interface/legacy_real.F90
@@ -149,7 +149,7 @@ program test_real2_double_precision
    STATUS = 0
 
 #define REALCASE
-#include "../elpa_print_headers.X90"
+#include "../../elpa_print_headers.X90"
 
 #ifdef HAVE_DETAILED_TIMINGS
 
diff --git a/test/Fortran/elpa2/real_api.F90 b/test/Fortran/elpa2/legacy_interface/legacy_real_api.F90
similarity index 99%
rename from test/Fortran/elpa2/real_api.F90
rename to test/Fortran/elpa2/legacy_interface/legacy_real_api.F90
index 429adafe2521265941cfe109fef7f7c9fae4b442..a3d085136ddd658ccf0cde0d50fe9de4ddef9bb7 100644
--- a/test/Fortran/elpa2/real_api.F90
+++ b/test/Fortran/elpa2/legacy_interface/legacy_real_api.F90
@@ -152,7 +152,7 @@ program test_real2_choose_kernel_with_api_double_precision
    STATUS = 0
 
 #define REALCASE
-#include "../elpa_print_headers.X90"
+#include "../../elpa_print_headers.X90"
 
 #ifdef HAVE_DETAILED_TIMINGS
 
diff --git a/test/Fortran/elpa2/real_default_kernel.F90 b/test/Fortran/elpa2/legacy_interface/legacy_real_default_kernel.F90
similarity index 99%
rename from test/Fortran/elpa2/real_default_kernel.F90
rename to test/Fortran/elpa2/legacy_interface/legacy_real_default_kernel.F90
index 07deeed07b5009de172e8ab47fc8099b4b3c41e0..b6a7465a3458fe676dd4c69018136b102b24e7f1 100644
--- a/test/Fortran/elpa2/real_default_kernel.F90
+++ b/test/Fortran/elpa2/legacy_interface/legacy_real_default_kernel.F90
@@ -150,7 +150,7 @@ program test_real2_default_kernel_double_precision
    STATUS = 0
 
 #define REALCASE
-#include "../elpa_print_headers.X90"
+#include "../../elpa_print_headers.X90"
 
 #ifdef HAVE_DETAILED_TIMINGS
 
diff --git a/test/Fortran/elpa2/real_gpu.F90 b/test/Fortran/elpa2/legacy_interface/legacy_real_gpu.F90
similarity index 99%
rename from test/Fortran/elpa2/real_gpu.F90
rename to test/Fortran/elpa2/legacy_interface/legacy_real_gpu.F90
index b832968af0292cf11d7a04e1dddd9da507a84cb4..f12e420b3cddd21f260a4a62d575bb9f708367c8 100644
--- a/test/Fortran/elpa2/real_gpu.F90
+++ b/test/Fortran/elpa2/legacy_interface/legacy_real_gpu.F90
@@ -153,7 +153,7 @@ program test_real2_gpu_version_double_precision
    STATUS = 0
 
 #define REALCASE
-#include "../elpa_print_headers.X90"
+#include "../../elpa_print_headers.X90"
 
 #ifdef HAVE_DETAILED_TIMINGS
 
diff --git a/test/Fortran/elpa2/real_qr.F90 b/test/Fortran/elpa2/legacy_interface/legacy_real_qr.F90
similarity index 99%
rename from test/Fortran/elpa2/real_qr.F90
rename to test/Fortran/elpa2/legacy_interface/legacy_real_qr.F90
index ec5eab1c281dc2a74e96ea0681f37a95081e48ae..2eae8cf762fa0cdac81fd697ae51e0a766243237 100644
--- a/test/Fortran/elpa2/real_qr.F90
+++ b/test/Fortran/elpa2/legacy_interface/legacy_real_qr.F90
@@ -191,7 +191,7 @@ program test_real2_default_kernel_qr_decomposition_double_precision
 
 
 #define REALCASE
-#include "../elpa_print_headers.X90"
+#include "../../elpa_print_headers.X90"
 
 #ifdef HAVE_DETAILED_TIMINGS
 
diff --git a/test/Fortran/elpa2/single_complex.F90 b/test/Fortran/elpa2/legacy_interface/legacy_single_complex.F90
similarity index 99%
rename from test/Fortran/elpa2/single_complex.F90
rename to test/Fortran/elpa2/legacy_interface/legacy_single_complex.F90
index a6e74a57bb1d79bc408e54f2bc2f4c3d146055f0..c22c7c9bb14d9cf7c017532134525cdb2a135351 100644
--- a/test/Fortran/elpa2/single_complex.F90
+++ b/test/Fortran/elpa2/legacy_interface/legacy_single_complex.F90
@@ -154,7 +154,7 @@ program test_complex2_single_precision
    STATUS = 0
 
 #define COMPLEXCASE
-#include "../elpa_print_headers.X90"
+#include "../../elpa_print_headers.X90"
 
 #ifdef HAVE_DETAILED_TIMINGS
 
diff --git a/test/Fortran/elpa2/single_complex_api.F90 b/test/Fortran/elpa2/legacy_interface/legacy_single_complex_api.F90
similarity index 99%
rename from test/Fortran/elpa2/single_complex_api.F90
rename to test/Fortran/elpa2/legacy_interface/legacy_single_complex_api.F90
index 1ee819c561cb33b672cf406ab45e261e565d251e..0155cd1fa9116b7aee0dea2c8f91181bd59452a0 100644
--- a/test/Fortran/elpa2/single_complex_api.F90
+++ b/test/Fortran/elpa2/legacy_interface/legacy_single_complex_api.F90
@@ -154,7 +154,7 @@ program test_complex2_choose_kernel_with_api_single_precision
    STATUS = 0
 
 #define COMPLEXCASE
-#include "../elpa_print_headers.X90"
+#include "../../elpa_print_headers.X90"
 
 #ifdef HAVE_DETAILED_TIMINGS
 
diff --git a/test/Fortran/elpa2/single_complex_default_kernel.F90 b/test/Fortran/elpa2/legacy_interface/legacy_single_complex_default_kernel.F90
similarity index 99%
rename from test/Fortran/elpa2/single_complex_default_kernel.F90
rename to test/Fortran/elpa2/legacy_interface/legacy_single_complex_default_kernel.F90
index 3ee9aedd96bb9d594c3f442fcb4cc4ccc44214ed..74b9f266554308e1b634bb8a25e557c501ed9e9f 100644
--- a/test/Fortran/elpa2/single_complex_default_kernel.F90
+++ b/test/Fortran/elpa2/legacy_interface/legacy_single_complex_default_kernel.F90
@@ -154,7 +154,7 @@ program test_complex2_default_kernel_single_precision
    STATUS = 0
 
 #define COMPLEXCASE
-#include "../elpa_print_headers.X90"
+#include "../../elpa_print_headers.X90"
 
 #ifdef HAVE_DETAILED_TIMINGS
 
diff --git a/test/Fortran/elpa2/single_complex_gpu.F90 b/test/Fortran/elpa2/legacy_interface/legacy_single_complex_gpu.F90
similarity index 99%
rename from test/Fortran/elpa2/single_complex_gpu.F90
rename to test/Fortran/elpa2/legacy_interface/legacy_single_complex_gpu.F90
index d5fd7e1d8720887ba4804161add5cb03c98290a1..b4946e9d174fbf7c03611beec64850125fd487a6 100644
--- a/test/Fortran/elpa2/single_complex_gpu.F90
+++ b/test/Fortran/elpa2/legacy_interface/legacy_single_complex_gpu.F90
@@ -155,7 +155,7 @@ program test_complex2_gpu_version_single_precision
    STATUS = 0
 
 #define COMPLEXCASE
-#include "../elpa_print_headers.X90"
+#include "../../elpa_print_headers.X90"
 
 #ifdef HAVE_DETAILED_TIMINGS
 
diff --git a/test/Fortran/elpa2/single_real.F90 b/test/Fortran/elpa2/legacy_interface/legacy_single_real.F90
similarity index 99%
rename from test/Fortran/elpa2/single_real.F90
rename to test/Fortran/elpa2/legacy_interface/legacy_single_real.F90
index dfa5c670c0b6724a31789ce5819b655e6cf5ae15..bbe7d10de29686b940f72e58ec20984699ba4e67 100644
--- a/test/Fortran/elpa2/single_real.F90
+++ b/test/Fortran/elpa2/legacy_interface/legacy_single_real.F90
@@ -149,7 +149,7 @@ program test_real2_single_precision
    STATUS = 0
 
 #define REALCASE
-#include "../elpa_print_headers.X90"
+#include "../../elpa_print_headers.X90"
 
 #ifdef HAVE_DETAILED_TIMINGS
 
diff --git a/test/Fortran/elpa2/single_real_api.F90 b/test/Fortran/elpa2/legacy_interface/legacy_single_real_api.F90
similarity index 99%
rename from test/Fortran/elpa2/single_real_api.F90
rename to test/Fortran/elpa2/legacy_interface/legacy_single_real_api.F90
index 7380ee5bab68806d77cafe52290e5331838b9735..933005b8018558c937c90bbc0f9ee6cad931163d 100644
--- a/test/Fortran/elpa2/single_real_api.F90
+++ b/test/Fortran/elpa2/legacy_interface/legacy_single_real_api.F90
@@ -152,7 +152,7 @@ program test_real2_choose_kernel_with_api_single_precision
    STATUS = 0
 
 #define REALCASE
-#include "../elpa_print_headers.X90"
+#include "../../elpa_print_headers.X90"
 
 #ifdef HAVE_DETAILED_TIMINGS
 
diff --git a/test/Fortran/elpa2/single_real_default_kernel.F90 b/test/Fortran/elpa2/legacy_interface/legacy_single_real_default_kernel.F90
similarity index 99%
rename from test/Fortran/elpa2/single_real_default_kernel.F90
rename to test/Fortran/elpa2/legacy_interface/legacy_single_real_default_kernel.F90
index a2c03b009ec0ac1a2b336b2bc702ce25f20759f5..cf7a009aeae65b2afc2d00858ef4262826b913fa 100644
--- a/test/Fortran/elpa2/single_real_default_kernel.F90
+++ b/test/Fortran/elpa2/legacy_interface/legacy_single_real_default_kernel.F90
@@ -150,7 +150,7 @@ program test_real2_default_kernel_single_precision
    STATUS = 0
 
 #define REALCASE
-#include "../elpa_print_headers.X90"
+#include "../../elpa_print_headers.X90"
 
 #ifdef HAVE_DETAILED_TIMINGS
 
diff --git a/test/Fortran/elpa2/single_real_gpu.F90 b/test/Fortran/elpa2/legacy_interface/legacy_single_real_gpu.F90
similarity index 99%
rename from test/Fortran/elpa2/single_real_gpu.F90
rename to test/Fortran/elpa2/legacy_interface/legacy_single_real_gpu.F90
index 4ad959e30ebf957fb6d6d27f619d9f8f39648fff..6ae92532641d20f4907969527491f9a9d6bb5f27 100644
--- a/test/Fortran/elpa2/single_real_gpu.F90
+++ b/test/Fortran/elpa2/legacy_interface/legacy_single_real_gpu.F90
@@ -153,7 +153,7 @@ program test_real2_gpu_version_single_precision
    STATUS = 0
 
 #define REALCASE
-#include "../elpa_print_headers.X90"
+#include "../../elpa_print_headers.X90"
 
 #ifdef HAVE_DETAILED_TIMINGS
 
diff --git a/test/Fortran/elpa2/single_real_qr.F90 b/test/Fortran/elpa2/legacy_interface/legacy_single_real_qr.F90
similarity index 99%
rename from test/Fortran/elpa2/single_real_qr.F90
rename to test/Fortran/elpa2/legacy_interface/legacy_single_real_qr.F90
index e975b50d0bdd6bc7d036da2793b85b9e53d98ba4..4b4460b157e6f5019a7999b5152094786a3ae64b 100644
--- a/test/Fortran/elpa2/single_real_qr.F90
+++ b/test/Fortran/elpa2/legacy_interface/legacy_single_real_qr.F90
@@ -195,7 +195,7 @@ program test_real2_default_kernel_qr_decomposition_single_precision
    endif
 
 #define REALCASE
-#include "../elpa_print_headers.X90"
+#include "../../elpa_print_headers.X90"
 
 #ifdef HAVE_DETAILED_TIMINGS
 
diff --git a/test/Fortran/real_2stage.F90 b/test/Fortran/elpa2/real_2stage.F90
similarity index 99%
rename from test/Fortran/real_2stage.F90
rename to test/Fortran/elpa2/real_2stage.F90
index 103ede137143c43ab651c2ae0841211934cc96af..4bda2617acbe1edd46ac1d1b1fae1ed6e29b5969 100644
--- a/test/Fortran/real_2stage.F90
+++ b/test/Fortran/elpa2/real_2stage.F90
@@ -42,7 +42,7 @@
 !
 #include "config-f90.h"
 
-#include "assert.h"
+#include "../assert.h"
 
 program test_interface
    use precision
diff --git a/test/Fortran/real_2stage_banded.F90 b/test/Fortran/elpa2/real_2stage_banded.F90
similarity index 99%
rename from test/Fortran/real_2stage_banded.F90
rename to test/Fortran/elpa2/real_2stage_banded.F90
index 156cf4efb2d2aab942f6bfdb999746ce888ab084..3854ee71dedf4f2436f47e1d23c7553a5ca2ef86 100644
--- a/test/Fortran/real_2stage_banded.F90
+++ b/test/Fortran/elpa2/real_2stage_banded.F90
@@ -41,7 +41,7 @@
 !
 !
 #include "config-f90.h"
-#include "assert.h"
+#include "../assert.h"
 !>
 !> Fortran test programm to demonstrates the use of
 !> ELPA 2 real case library.
@@ -149,7 +149,7 @@ program test_real2_double_banded
    STATUS = 0
 
 #define REALCASE
-#include "elpa_print_headers.X90"
+#include "../elpa_print_headers.X90"
 
 #ifdef HAVE_DETAILED_TIMINGS
 
diff --git a/test/Fortran/real_2stage_gpu.F90 b/test/Fortran/elpa2/real_2stage_gpu.F90
similarity index 99%
rename from test/Fortran/real_2stage_gpu.F90
rename to test/Fortran/elpa2/real_2stage_gpu.F90
index 4a1e26200166f3d6b2dbf7704ecd0c72d49f7fdf..c3421928111bfe3b1aa527ae0e53a37f35f1bd44 100644
--- a/test/Fortran/real_2stage_gpu.F90
+++ b/test/Fortran/elpa2/real_2stage_gpu.F90
@@ -42,7 +42,7 @@
 !
 #include "config-f90.h"
 
-#include "assert.h"
+#include "../assert.h"
 
 program test_interface
    use precision
diff --git a/test/Fortran/single_complex_2stage.F90 b/test/Fortran/elpa2/single_complex_2stage.F90
similarity index 99%
rename from test/Fortran/single_complex_2stage.F90
rename to test/Fortran/elpa2/single_complex_2stage.F90
index 68229b18275ffb281a277a5569e9ace8ec5394a8..2073c004e7a435c21211e9664b049c96a7a47e05 100644
--- a/test/Fortran/single_complex_2stage.F90
+++ b/test/Fortran/elpa2/single_complex_2stage.F90
@@ -42,7 +42,7 @@
 !
 #include "config-f90.h"
 
-#include "assert.h"
+#include "../assert.h"
 
 program test_interface
    use precision
diff --git a/test/Fortran/single_complex_2stage_banded.F90 b/test/Fortran/elpa2/single_complex_2stage_banded.F90
similarity index 99%
rename from test/Fortran/single_complex_2stage_banded.F90
rename to test/Fortran/elpa2/single_complex_2stage_banded.F90
index d5de958ef418c78640c0dd7e424bd5b51bcc55c7..e82abf8394e7205efbaf42e807056d0e9fb72ada 100644
--- a/test/Fortran/single_complex_2stage_banded.F90
+++ b/test/Fortran/elpa2/single_complex_2stage_banded.F90
@@ -41,7 +41,7 @@
 !
 !
 #include "config-f90.h"
-#include "assert.h"
+#include "../assert.h"
 !>
 !> Fortran test programm to demonstrates the use of
 !> ELPA 2 complex case library.
@@ -154,7 +154,7 @@ program test_complex2_single_banded
 
    STATUS = 0
 
-#include "elpa_print_headers.X90"
+#include "../elpa_print_headers.X90"
 
 #ifdef HAVE_DETAILED_TIMINGS
 
diff --git a/test/Fortran/single_complex_2stage_gpu.F90 b/test/Fortran/elpa2/single_complex_2stage_gpu.F90
similarity index 99%
rename from test/Fortran/single_complex_2stage_gpu.F90
rename to test/Fortran/elpa2/single_complex_2stage_gpu.F90
index c364d367981a5aaf00eceaada8622554b9a45327..542cb79c5b4d647ae145c460e25c6826e1a8420f 100644
--- a/test/Fortran/single_complex_2stage_gpu.F90
+++ b/test/Fortran/elpa2/single_complex_2stage_gpu.F90
@@ -42,7 +42,7 @@
 !
 #include "config-f90.h"
 
-#include "assert.h"
+#include "../assert.h"
 
 program test_interface
    use precision
diff --git a/test/Fortran/single_real_2stage.F90 b/test/Fortran/elpa2/single_real_2stage.F90
similarity index 99%
rename from test/Fortran/single_real_2stage.F90
rename to test/Fortran/elpa2/single_real_2stage.F90
index de44180f53650301c348a67f0e812dfc78dbdd80..73e900ae4d27d41d53a4ccbdae566e351a369630 100644
--- a/test/Fortran/single_real_2stage.F90
+++ b/test/Fortran/elpa2/single_real_2stage.F90
@@ -42,7 +42,7 @@
 !
 #include "config-f90.h"
 
-#include "assert.h"
+#include "../assert.h"
 
 program test_interface
    use precision
diff --git a/test/Fortran/single_real_2stage_banded.F90 b/test/Fortran/elpa2/single_real_2stage_banded.F90
similarity index 99%
rename from test/Fortran/single_real_2stage_banded.F90
rename to test/Fortran/elpa2/single_real_2stage_banded.F90
index 6f2f9fa004c185473ad06643ec73ba542307c352..405dc850106e3058bc760a4bc987f9d1b5e8eb67 100644
--- a/test/Fortran/single_real_2stage_banded.F90
+++ b/test/Fortran/elpa2/single_real_2stage_banded.F90
@@ -41,7 +41,7 @@
 !
 !
 #include "config-f90.h"
-#include "assert.h"
+#include "../assert.h"
 !>
 !> Fortran test programm to demonstrates the use of
 !> ELPA 2 real case library.
@@ -149,7 +149,7 @@ program test_real2_single_banded
    STATUS = 0
 
 #define REALCASE
-#include "elpa_print_headers.X90"
+#include "../elpa_print_headers.X90"
 
 #ifdef HAVE_DETAILED_TIMINGS
 
diff --git a/test/Fortran/single_real_2stage_gpu.F90 b/test/Fortran/elpa2/single_real_2stage_gpu.F90
similarity index 99%
rename from test/Fortran/single_real_2stage_gpu.F90
rename to test/Fortran/elpa2/single_real_2stage_gpu.F90
index cbc2bc74a75406339de285b19d38f2c597efc000..6a78bf98cc42a810af38cde3d89901cc19fc92b3 100644
--- a/test/Fortran/single_real_2stage_gpu.F90
+++ b/test/Fortran/elpa2/single_real_2stage_gpu.F90
@@ -42,7 +42,7 @@
 !
 #include "config-f90.h"
 
-#include "assert.h"
+#include "../assert.h"
 
 program test_interface
    use precision
diff --git a/test/Fortran/test_transpose_multiply_complex_2stage.F90 b/test/Fortran/test_transpose_multiply_complex_2stage.F90
deleted file mode 100644
index 126c458397e58d319ef355f7a4e865c3bfab3727..0000000000000000000000000000000000000000
--- a/test/Fortran/test_transpose_multiply_complex_2stage.F90
+++ /dev/null
@@ -1,316 +0,0 @@
-!    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), formerly 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 Naturwissenschaften,
-!      Leipzig, Abt. Komplexe Strukutren in Biologie und Kognition,
-!      and
-!    - IBM Deutschland GmbH
-!
-!
-!    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.
-!
-!
-#include "config-f90.h"
-!>
-
-program test_transpose_multiply
-
-   use precision
-   use elpa1
-   use elpa_utilities, only : error_unit
-#ifdef WITH_OPENMP
-   use test_util
-#endif
-
-   use mod_read_input_parameters
-   use mod_check_correctness
-   use mod_setup_mpi
-   use mod_blacs_infrastructure
-   use mod_prepare_matrix
-
-   use elpa_mpi
-#ifdef HAVE_REDIRECT
-   use redirect
-#endif
-#ifdef HAVE_DETAILED_TIMINGS
-  use timings
-#endif
-  use output_types
-
-   implicit none
-
-   !-------------------------------------------------------------------------------
-   ! Please set system size parameters below!
-   ! na:   System size
-   ! nev:  Number of eigenvectors to be calculated
-   ! nblk: Blocking factor in block cyclic distribution
-   !-------------------------------------------------------------------------------
-   integer(kind=ik)           :: nblk
-   integer(kind=ik)           :: na, nev
-
-   integer(kind=ik)           :: np_rows, np_cols, na_rows, na_cols
-
-   integer(kind=ik)           :: myid, nprocs, my_prow, my_pcol, mpi_comm_rows, mpi_comm_cols
-   integer(kind=ik)           :: i, mpierr, my_blacs_ctxt, sc_desc(9), info, nprow, npcol
-
-   integer, external          :: numroc
-
-   real(kind=rk8), allocatable    :: ev(:)
-   complex(kind=ck8), allocatable :: a(:,:), b(:,:), c(:,:), z(:,:), tmp1(:,:), tmp2(:,:), as(:,:)
-   complex(kind=ck8), parameter   :: CZERO = (0.0_rk8,0.0_rk8), CONE = (1.0_rk8,0.0_rk8)
-   real(kind=rk8)              :: norm, normmax
-#ifdef WITH_MPI
-   real(kind=rk8)              :: pzlange
-#else
-   real(kind=rk8)              :: zlange
-#endif
-   integer(kind=ik)           :: STATUS
-#ifdef WITH_OPENMP
-   integer(kind=ik)           :: omp_get_max_threads,  required_mpi_thread_level, &
-                                 provided_mpi_thread_level
-#endif
-   type(output_t)             :: write_to_file
-   logical                    :: success
-   character(len=8)           :: task_suffix
-   integer(kind=ik)           :: j
-   !-------------------------------------------------------------------------------
-
-   success = .true.
-
-   call read_input_parameters_traditional(na, nev, nblk, write_to_file)
-
-   !-------------------------------------------------------------------------------
-   !  MPI Initialization
-   call setup_mpi(myid, nprocs)
-
-   STATUS = 0
-
-#ifdef HAVE_DETAILED_TIMINGS
-
-   ! initialise the timing functionality
-
-#ifdef HAVE_LIBPAPI
-   call timer%measure_flops(.true.)
-#endif
-
-   call timer%measure_allocated_memory(.true.)
-   call timer%measure_virtual_memory(.true.)
-   call timer%measure_max_allocated_memory(.true.)
-
-   call timer%set_print_options(&
-#ifdef HAVE_LIBPAPI
-                print_flop_count=.true., &
-                print_flop_rate=.true., &
-#endif
-                print_allocated_memory = .true. , &
-                print_virtual_memory=.true., &
-                print_max_allocated_memory=.true.)
-
-
-  call timer%enable()
-
-  call timer%start("program")
-#endif
-
-   do np_cols = NINT(SQRT(REAL(nprocs))),2,-1
-      if(mod(nprocs,np_cols) == 0 ) exit
-   enddo
-
-   ! at the end of the above loop, nprocs is always divisible by np_cols
-
-   np_rows = nprocs/np_cols
-
-   if(myid==0) then
-      print '(3(a,i0))','Matrix size=',na,', Block size=',nblk
-      print '(3(a,i0))','Number of processor rows=',np_rows,', cols=',np_cols,', total=',nprocs
-      print *
-   endif
-
-   !-------------------------------------------------------------------------------
-   ! Set up BLACS context and MPI communicators
-   !
-   ! The BLACS context is only necessary for using Scalapack.
-   !
-   ! For ELPA, the MPI communicators along rows/cols are sufficient,
-   ! and the grid setup may be done in an arbitrary way as long as it is
-   ! consistent (i.e. 0<=my_prow<np_rows, 0<=my_pcol<np_cols and every
-   ! process has a unique (my_prow,my_pcol) pair).
-
-   call set_up_blacsgrid(mpi_comm_world, my_blacs_ctxt, np_rows, np_cols, &
-                         nprow, npcol, my_prow, my_pcol)
-
-   if (myid==0) then
-     print '(a)','| Past BLACS_Gridinfo.'
-   end if
-
-   ! All ELPA routines need MPI communicators for communicating within
-   ! rows or columns of processes, these are set in elpa_get_communicators.
-
-   mpierr = elpa_get_communicators(mpi_comm_world, my_prow, my_pcol, &
-                                   mpi_comm_rows, mpi_comm_cols)
-
-   if (myid==0) then
-     print '(a)','| Past split communicator setup for rows and columns.'
-   end if
-
-   call set_up_blacs_descriptor(na ,nblk, my_prow, my_pcol, np_rows, np_cols, &
-                                na_rows, na_cols, sc_desc, my_blacs_ctxt, info)
-
-   if (myid==0) then
-     print '(a)','| Past scalapack descriptor setup.'
-   end if
-
-   !-------------------------------------------------------------------------------
-   ! Allocate matrices and set up a test matrix for the eigenvalue problem
-#ifdef HAVE_DETAILED_TIMINGS
-   call timer%start("set up matrix")
-#endif
-   allocate(a (na_rows,na_cols))
-   allocate(b (na_rows,na_cols))
-   allocate(c (na_rows,na_cols))
-
-   allocate(z (na_rows,na_cols))
-   allocate(as(na_rows,na_cols))
-
-   allocate(ev(na))
-   call prepare_matrix(na, myid, sc_desc, a, z, as)
-   b(:,:) = 2.0_ck8 * a(:,:)
-   c(:,:) = 0.0_ck8
-
-#ifdef HAVE_DETAILED_TIMINGS
-   call timer%stop("set up matrix")
-#endif
-
-   !-------------------------------------------------------------------------------
-   ! Calculate eigenvalues/eigenvectors
-
-   if (myid==0) then
-     print '(a)','| Compute c= a**T * b ... '
-     print *
-   end if
-#ifdef WITH_MPI
-   call mpi_barrier(mpi_comm_world, mpierr) ! for correct timings only
-#endif
-
-   success = elpa_mult_ah_b_complex_double("F","F", na, na, a, na_rows, na_cols, b, na_rows, na_cols, &
-                                           nblk, mpi_comm_rows, mpi_comm_cols, c, na_rows, na_cols)
-
-   if (.not.(success)) then
-      write(error_unit,*) " elpa_mult_at_b_complex produced an error! Aborting..."
-#ifdef WITH_MPI
-      call MPI_ABORT(mpi_comm_world, 1, mpierr)
-#endif
-   endif
-
-
-   if (myid==0) then
-     print '(a)','| Solve c = a**T * b complete.'
-     print *
-   end if
-
-
-   !-------------------------------------------------------------------------------
-   ! Test correctness of result (using plain scalapack routines)
-   allocate(tmp1(na_rows,na_cols))
-   allocate(tmp2(na_rows,na_cols))
-
-   tmp1(:,:) = 0.0_ck8
-
-   ! tmp1 = a**T
-#ifdef WITH_MPI
-   call pztranc(na, na, CONE, a, 1, 1, sc_desc, CZERO, tmp1, 1, 1, sc_desc)
-#else
-   tmp1 = transpose(conjg(a))
-#endif
-   ! tmp2 = tmp1 * b
-#ifdef WITH_MPI
-   call pzgemm("N","N", na, na, na, CONE, tmp1, 1, 1, sc_desc, b, 1, 1, &
-               sc_desc, CZERO, tmp2, 1, 1, sc_desc)
-#else
-   call zgemm("N","N", na, na, na, CONE, tmp1, na, b, na, CZERO, tmp2, na)
-#endif
-
-   ! compare tmp2 with c
-   tmp2(:,:) = tmp2(:,:) - c(:,:)
-
-#ifdef WITH_MPI
-   norm = pzlange("M",na, na, tmp2, 1, 1, sc_desc, tmp1)
-#else
-   norm = zlange("M",na, na, tmp2, na_rows, tmp1)
-#endif
-#ifdef WITH_MPI
-   call mpi_allreduce(norm,normmax,1,MPI_REAL8,MPI_MAX,MPI_COMM_WORLD,mpierr)
-#else
-   normmax = norm
-#endif
-   if (myid .eq. 0) then
-     print *," Maximum error of result: ", normmax
-   endif
-
-   if (normmax .gt. 5e-11_rk8) then
-        status = 1
-   endif
-
-   deallocate(a)
-   deallocate(b)
-   deallocate(c)
-
-   deallocate(as)
-
-   deallocate(z)
-   deallocate(tmp1)
-   deallocate(tmp2)
-   deallocate(ev)
-
-#ifdef HAVE_DETAILED_TIMINGS
-   call timer%stop("program")
-   print *," "
-   print *,"Timings program:"
-   print *," "
-   call timer%print("program")
-   print *," "
-   print *,"End timings program"
-   print *," "
-#endif
-
-#ifdef WITH_MPI
-   call blacs_gridexit(my_blacs_ctxt)
-   call mpi_finalize(mpierr)
-#endif
-
-   call EXIT(STATUS)
-
-
-end
-
-!-------------------------------------------------------------------------------
diff --git a/test/Fortran/test_transpose_multiply_complex_single_2stage.F90 b/test/Fortran/test_transpose_multiply_complex_single_2stage.F90
deleted file mode 100644
index e9bb669f2425851535cb3053ad005c31ec9b27d5..0000000000000000000000000000000000000000
--- a/test/Fortran/test_transpose_multiply_complex_single_2stage.F90
+++ /dev/null
@@ -1,316 +0,0 @@
-!    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), formerly 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 Naturwissenschaften,
-!      Leipzig, Abt. Komplexe Strukutren in Biologie und Kognition,
-!      and
-!    - IBM Deutschland GmbH
-!
-!
-!    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.
-!
-!
-#include "config-f90.h"
-!>
-
-program test_transpose_multiply
-
-   use precision
-   use elpa1
-   use elpa_utilities, only : error_unit
-#ifdef WITH_OPENMP
-   use test_util
-#endif
-
-   use mod_read_input_parameters
-   use mod_check_correctness
-   use mod_setup_mpi
-   use mod_blacs_infrastructure
-   use mod_prepare_matrix
-
-   use elpa_mpi
-#ifdef HAVE_REDIRECT
-   use redirect
-#endif
-#ifdef HAVE_DETAILED_TIMINGS
-  use timings
-#endif
-  use output_types
-
-   implicit none
-
-   !-------------------------------------------------------------------------------
-   ! Please set system size parameters below!
-   ! na:   System size
-   ! nev:  Number of eigenvectors to be calculated
-   ! nblk: Blocking factor in block cyclic distribution
-   !-------------------------------------------------------------------------------
-   integer(kind=ik)           :: nblk
-   integer(kind=ik)           :: na, nev
-
-   integer(kind=ik)           :: np_rows, np_cols, na_rows, na_cols
-
-   integer(kind=ik)           :: myid, nprocs, my_prow, my_pcol, mpi_comm_rows, mpi_comm_cols
-   integer(kind=ik)           :: i, mpierr, my_blacs_ctxt, sc_desc(9), info, nprow, npcol
-
-   integer, external          :: numroc
-
-   real(kind=rk4), allocatable    :: ev(:)
-   complex(kind=ck4), allocatable :: a(:,:), b(:,:), c(:,:), z(:,:), tmp1(:,:), tmp2(:,:), as(:,:)
-   complex(kind=ck4), parameter   :: CZERO = (0.0_rk4,0.0_rk4), CONE = (1.0_rk4,0.0_rk4)
-   real(kind=rk4)              :: norm, normmax
-#ifdef WITH_MPI
-   real(kind=rk4)              :: pclange
-#else
-   real(kind=rk4)              :: clange
-#endif
-   integer(kind=ik)           :: STATUS
-#ifdef WITH_OPENMP
-   integer(kind=ik)           :: omp_get_max_threads,  required_mpi_thread_level, &
-                                 provided_mpi_thread_level
-#endif
-   type(output_t)             :: write_to_file
-   logical                    :: success
-   character(len=8)           :: task_suffix
-   integer(kind=ik)           :: j
-   !-------------------------------------------------------------------------------
-
-   success = .true.
-
-   call read_input_parameters_traditional(na, nev, nblk, write_to_file)
-
-   !-------------------------------------------------------------------------------
-   !  MPI Initialization
-   call setup_mpi(myid, nprocs)
-
-   STATUS = 0
-
-#ifdef HAVE_DETAILED_TIMINGS
-
-   ! initialise the timing functionality
-
-#ifdef HAVE_LIBPAPI
-   call timer%measure_flops(.true.)
-#endif
-
-   call timer%measure_allocated_memory(.true.)
-   call timer%measure_virtual_memory(.true.)
-   call timer%measure_max_allocated_memory(.true.)
-
-   call timer%set_print_options(&
-#ifdef HAVE_LIBPAPI
-                print_flop_count=.true., &
-                print_flop_rate=.true., &
-#endif
-                print_allocated_memory = .true. , &
-                print_virtual_memory=.true., &
-                print_max_allocated_memory=.true.)
-
-
-  call timer%enable()
-
-  call timer%start("program")
-#endif
-
-   do np_cols = NINT(SQRT(REAL(nprocs))),2,-1
-      if(mod(nprocs,np_cols) == 0 ) exit
-   enddo
-
-   ! at the end of the above loop, nprocs is always divisible by np_cols
-
-   np_rows = nprocs/np_cols
-
-   if(myid==0) then
-      print '(3(a,i0))','Matrix size=',na,', Block size=',nblk
-      print '(3(a,i0))','Number of processor rows=',np_rows,', cols=',np_cols,', total=',nprocs
-      print *
-   endif
-
-   !-------------------------------------------------------------------------------
-   ! Set up BLACS context and MPI communicators
-   !
-   ! The BLACS context is only necessary for using Scalapack.
-   !
-   ! For ELPA, the MPI communicators along rows/cols are sufficient,
-   ! and the grid setup may be done in an arbitrary way as long as it is
-   ! consistent (i.e. 0<=my_prow<np_rows, 0<=my_pcol<np_cols and every
-   ! process has a unique (my_prow,my_pcol) pair).
-
-   call set_up_blacsgrid(mpi_comm_world, my_blacs_ctxt, np_rows, np_cols, &
-                         nprow, npcol, my_prow, my_pcol)
-
-   if (myid==0) then
-     print '(a)','| Past BLACS_Gridinfo.'
-   end if
-
-   ! All ELPA routines need MPI communicators for communicating within
-   ! rows or columns of processes, these are set in elpa_get_communicators.
-
-   mpierr = elpa_get_communicators(mpi_comm_world, my_prow, my_pcol, &
-                                   mpi_comm_rows, mpi_comm_cols)
-
-   if (myid==0) then
-     print '(a)','| Past split communicator setup for rows and columns.'
-   end if
-
-   call set_up_blacs_descriptor(na ,nblk, my_prow, my_pcol, np_rows, np_cols, &
-                                na_rows, na_cols, sc_desc, my_blacs_ctxt, info)
-
-   if (myid==0) then
-     print '(a)','| Past scalapack descriptor setup.'
-   end if
-
-   !-------------------------------------------------------------------------------
-   ! Allocate matrices and set up a test matrix for the eigenvalue problem
-#ifdef HAVE_DETAILED_TIMINGS
-   call timer%start("set up matrix")
-#endif
-   allocate(a (na_rows,na_cols))
-   allocate(b (na_rows,na_cols))
-   allocate(c (na_rows,na_cols))
-
-   allocate(z (na_rows,na_cols))
-   allocate(as(na_rows,na_cols))
-
-   allocate(ev(na))
-   call prepare_matrix(na, myid, sc_desc, a, z, as)
-   b(:,:) = 2.0_ck4 * a(:,:)
-   c(:,:) = 0.0_ck4
-
-#ifdef HAVE_DETAILED_TIMINGS
-   call timer%stop("set up matrix")
-#endif
-
-   !-------------------------------------------------------------------------------
-   ! Calculate eigenvalues/eigenvectors
-
-   if (myid==0) then
-     print '(a)','| Compute c= a**T * b ... '
-     print *
-   end if
-#ifdef WITH_MPI
-   call mpi_barrier(mpi_comm_world, mpierr) ! for correct timings only
-#endif
-
-   success = elpa_mult_ah_b_complex_single("F","F", na, na, a, na_rows, na_cols, b, na_rows, na_cols, &
-                                           nblk, mpi_comm_rows, mpi_comm_cols, c, na_rows, na_cols)
-
-   if (.not.(success)) then
-      write(error_unit,*) " elpa_mult_at_b_complex produced an error! Aborting..."
-#ifdef WITH_MPI
-      call MPI_ABORT(mpi_comm_world, 1, mpierr)
-#endif
-   endif
-
-
-   if (myid==0) then
-     print '(a)','| Solve c = a**T * b complete.'
-     print *
-   end if
-
-
-   !-------------------------------------------------------------------------------
-   ! Test correctness of result (using plain scalapack routines)
-   allocate(tmp1(na_rows,na_cols))
-   allocate(tmp2(na_rows,na_cols))
-
-   tmp1(:,:) = 0.0_ck4
-
-   ! tmp1 = a**T
-#ifdef WITH_MPI
-   call pctranc(na, na, CONE, a, 1, 1, sc_desc, CZERO, tmp1, 1, 1, sc_desc)
-#else
-   tmp1 = transpose(conjg(a))
-#endif
-   ! tmp2 = tmp1 * b
-#ifdef WITH_MPI
-   call pcgemm("N","N", na, na, na, CONE, tmp1, 1, 1, sc_desc, b, 1, 1, &
-               sc_desc, CZERO, tmp2, 1, 1, sc_desc)
-#else
-   call cgemm("N","N", na, na, na, CONE, tmp1, na, b, na, CZERO, tmp2, na)
-#endif
-
-   ! compare tmp2 with c
-   tmp2(:,:) = tmp2(:,:) - c(:,:)
-
-#ifdef WITH_MPI
-   norm = pclange("M",na, na, tmp2, 1, 1, sc_desc, tmp1)
-#else
-   norm = clange("M",na, na, tmp2, na_rows, tmp1)
-#endif
-#ifdef WITH_MPI
-   call mpi_allreduce(norm,normmax,1,MPI_REAL4,MPI_MAX,MPI_COMM_WORLD,mpierr)
-#else
-   normmax = norm
-#endif
-   if (myid .eq. 0) then
-     print *," Maximum error of result: ", normmax
-   endif
-
-   if (normmax .gt. 5e-2_rk4) then
-        status = 1
-   endif
-
-   deallocate(a)
-   deallocate(b)
-   deallocate(c)
-
-   deallocate(as)
-
-   deallocate(z)
-   deallocate(tmp1)
-   deallocate(tmp2)
-   deallocate(ev)
-
-#ifdef HAVE_DETAILED_TIMINGS
-   call timer%stop("program")
-   print *," "
-   print *,"Timings program:"
-   print *," "
-   call timer%print("program")
-   print *," "
-   print *,"End timings program"
-   print *," "
-#endif
-
-#ifdef WITH_MPI
-   call blacs_gridexit(my_blacs_ctxt)
-   call mpi_finalize(mpierr)
-#endif
-
-   call EXIT(STATUS)
-
-
-end
-
-!-------------------------------------------------------------------------------
diff --git a/test/Fortran/test_transpose_multiply_real_single_2stage.F90 b/test/Fortran/test_transpose_multiply_real_single_2stage.F90
deleted file mode 100644
index aa877d21f067a0689dda3023ddd02c79161ebe55..0000000000000000000000000000000000000000
--- a/test/Fortran/test_transpose_multiply_real_single_2stage.F90
+++ /dev/null
@@ -1,320 +0,0 @@
-!    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), formerly 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 Naturwissenschaften,
-!      Leipzig, Abt. Komplexe Strukutren in Biologie und Kognition,
-!      and
-!    - IBM Deutschland GmbH
-!
-!
-!    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.
-!
-!
-#include "config-f90.h"
-!>
-
-program test_transpose_multiply
-
-   use precision
-   use elpa1
-   use elpa_utilities, only : error_unit
-#ifdef WITH_OPENMP
-   use test_util
-#endif
-
-   use mod_read_input_parameters
-   use mod_check_correctness
-   use mod_setup_mpi
-   use mod_blacs_infrastructure
-   use mod_prepare_matrix
-
-   use elpa_mpi
-#ifdef HAVE_REDIRECT
-   use redirect
-#endif
-#ifdef HAVE_DETAILED_TIMINGS
-  use timings
-#endif
-  use output_types
-
-   implicit none
-
-   !-------------------------------------------------------------------------------
-   ! Please set system size parameters below!
-   ! na:   System size
-   ! nev:  Number of eigenvectors to be calculated
-   ! nblk: Blocking factor in block cyclic distribution
-   !-------------------------------------------------------------------------------
-   integer(kind=ik)           :: nblk
-   integer(kind=ik)           :: na, nev
-
-   integer(kind=ik)           :: np_rows, np_cols, na_rows, na_cols
-
-   integer(kind=ik)           :: myid, nprocs, my_prow, my_pcol, mpi_comm_rows, mpi_comm_cols
-   integer(kind=ik)           :: i, mpierr, my_blacs_ctxt, sc_desc(9), info, nprow, npcol
-
-   integer, external          :: numroc
-
-   real(kind=rk4), allocatable :: a(:,:), b(:,:), c(:,:), z(:,:), tmp1(:,:), tmp2(:,:), as(:,:), ev(:)
-
-   real(kind=rk4)              :: norm, normmax
-#ifdef WITH_MPI
-   real(kind=rk4)              :: pslange
-#else
-   real(kind=rk4)              :: slange
-#endif
-
-   integer(kind=ik)           :: STATUS
-#ifdef WITH_OPENMP
-   integer(kind=ik)           :: omp_get_max_threads,  required_mpi_thread_level, &
-                                 provided_mpi_thread_level
-#endif
-   type(output_t)             :: write_to_file
-   logical                    :: success
-   character(len=8)           :: task_suffix
-   integer(kind=ik)           :: j
-   !-------------------------------------------------------------------------------
-
-   success = .true.
-
-   call read_input_parameters_traditional(na, nev, nblk, write_to_file)
-
-   !-------------------------------------------------------------------------------
-   !  MPI Initialization
-   call setup_mpi(myid, nprocs)
-
-   STATUS = 0
-
-#ifdef HAVE_DETAILED_TIMINGS
-
-   ! initialise the timing functionality
-
-#ifdef HAVE_LIBPAPI
-   call timer%measure_flops(.true.)
-#endif
-
-   call timer%measure_allocated_memory(.true.)
-   call timer%measure_virtual_memory(.true.)
-   call timer%measure_max_allocated_memory(.true.)
-
-   call timer%set_print_options(&
-#ifdef HAVE_LIBPAPI
-                print_flop_count=.true., &
-                print_flop_rate=.true., &
-#endif
-                print_allocated_memory = .true. , &
-                print_virtual_memory=.true., &
-                print_max_allocated_memory=.true.)
-
-
-  call timer%enable()
-
-  call timer%start("program")
-#endif
-
-   do np_cols = NINT(SQRT(REAL(nprocs))),2,-1
-      if(mod(nprocs,np_cols) == 0 ) exit
-   enddo
-
-   ! at the end of the above loop, nprocs is always divisible by np_cols
-
-   np_rows = nprocs/np_cols
-
-   if(myid==0) then
-      print '(3(a,i0))','Matrix size=',na,', Block size=',nblk
-      print '(3(a,i0))','Number of processor rows=',np_rows,', cols=',np_cols,', total=',nprocs
-      print *
-   endif
-
-   !-------------------------------------------------------------------------------
-   ! Set up BLACS context and MPI communicators
-   !
-   ! The BLACS context is only necessary for using Scalapack.
-   !
-   ! For ELPA, the MPI communicators along rows/cols are sufficient,
-   ! and the grid setup may be done in an arbitrary way as long as it is
-   ! consistent (i.e. 0<=my_prow<np_rows, 0<=my_pcol<np_cols and every
-   ! process has a unique (my_prow,my_pcol) pair).
-
-   call set_up_blacsgrid(mpi_comm_world, my_blacs_ctxt, np_rows, np_cols, &
-                         nprow, npcol, my_prow, my_pcol)
-
-   if (myid==0) then
-     print '(a)','| Past BLACS_Gridinfo.'
-   end if
-
-   ! All ELPA routines need MPI communicators for communicating within
-   ! rows or columns of processes, these are set in elpa_get_communicators.
-
-   mpierr = elpa_get_communicators(mpi_comm_world, my_prow, my_pcol, &
-                                   mpi_comm_rows, mpi_comm_cols)
-
-   if (myid==0) then
-     print '(a)','| Past split communicator setup for rows and columns.'
-   end if
-
-   call set_up_blacs_descriptor(na ,nblk, my_prow, my_pcol, np_rows, np_cols, &
-                                na_rows, na_cols, sc_desc, my_blacs_ctxt, info)
-
-   if (myid==0) then
-     print '(a)','| Past scalapack descriptor setup.'
-   end if
-
-   !-------------------------------------------------------------------------------
-   ! Allocate matrices and set up a test matrix for the eigenvalue problem
-#ifdef HAVE_DETAILED_TIMINGS
-   call timer%start("set up matrix")
-#endif
-   allocate(a (na_rows,na_cols))
-   allocate(b (na_rows,na_cols))
-   allocate(c (na_rows,na_cols))
-
-   allocate(z (na_rows,na_cols))
-   allocate(as(na_rows,na_cols))
-
-   allocate(ev(na))
-
-   call prepare_matrix(na, myid, sc_desc, a, z, as)
-
-   b(:,:) = 2.0_rk4 * a(:,:)
-   c(:,:) = 0.0_rk4
-
-#ifdef HAVE_DETAILED_TIMINGS
-   call timer%stop("set up matrix")
-#endif
-
-   !-------------------------------------------------------------------------------
-   ! Calculate eigenvalues/eigenvectors
-
-   if (myid==0) then
-     print '(a)','| Compute c= a**T * b ... '
-     print *
-   end if
-#ifdef WITH_MPI
-   call mpi_barrier(mpi_comm_world, mpierr) ! for correct timings only
-#endif
-
-   success = elpa_mult_at_b_real_single("F","F", na, na, a, na_rows, na_cols, b, na_rows, &
-                                        na_cols, nblk, mpi_comm_rows, mpi_comm_cols, c,   &
-                                        na_rows, na_cols)
-
-   if (.not.(success)) then
-      write(error_unit,*) "elpa_mult_at_b_real produced an error! Aborting..."
-#ifdef WITH_MPI
-      call MPI_ABORT(mpi_comm_world, 1, mpierr)
-#endif
-   endif
-
-
-   if (myid==0) then
-     print '(a)','| Solve c = a**T * b complete.'
-     print *
-   end if
-
-
-   !-------------------------------------------------------------------------------
-   ! Test correctness of result (using plain scalapack routines)
-   allocate(tmp1(na_rows,na_cols))
-   allocate(tmp2(na_rows,na_cols))
-
-   tmp1(:,:) = 0.0_rk4
-
-   ! tmp1 = a**T
-#ifdef WITH_MPI
-   call pstran(na, na, 1.0_rk4, a, 1, 1, sc_desc, 0.0_rk4, tmp1, 1, 1, sc_desc)
-#else
-   tmp1 = transpose(a)
-#endif
-   ! tmp2 = tmp1 * b
-#ifdef WITH_MPI
-   call psgemm("N","N", na, na, na, 1.0_rk4, tmp1, 1, 1, sc_desc, b, 1, 1, &
-               sc_desc, 0.0_rk4, tmp2, 1, 1, sc_desc)
-#else
-   call sgemm("N","N", na, na, na, 1.0_rk4, tmp1, na, b, na, 0.0_rk4, tmp2, na)
-#endif
-
-   ! compare tmp2 with c
-   tmp2(:,:) = tmp2(:,:) - c(:,:)
-
-#ifdef WITH_MPI
-   norm = pslange("M", na, na, tmp2, 1, 1, sc_desc, tmp1)
-#else
-   norm = slange("M", na, na, tmp2, na_rows, tmp1)
-#endif
-
-#ifdef WITH_MPI
-   call mpi_allreduce(norm,normmax,1,MPI_REAL4,MPI_MAX,MPI_COMM_WORLD,mpierr)
-#else
-   normmax = norm
-#endif
-   if (myid .eq. 0) then
-     print *," Maximum error of result: ", normmax
-   endif
-
-   if (normmax .gt. 5e-2_rk4) then
-        status = 1
-   endif
-
-   deallocate(a)
-   deallocate(b)
-   deallocate(c)
-
-   deallocate(as)
-
-   deallocate(z)
-   deallocate(tmp1)
-   deallocate(tmp2)
-   deallocate(ev)
-
-#ifdef HAVE_DETAILED_TIMINGS
-   call timer%stop("program")
-   print *," "
-   print *,"Timings program:"
-   print *," "
-   call timer%print("program")
-   print *," "
-   print *,"End timings program"
-   print *," "
-#endif
-
-#ifdef WITH_MPI
-   call blacs_gridexit(my_blacs_ctxt)
-   call mpi_finalize(mpierr)
-#endif
-
-   call EXIT(STATUS)
-
-
-end
-
-!-------------------------------------------------------------------------------
diff --git a/test/shared/call_elpa1.c b/test/shared/call_elpa1.c
index f34c67e447f172c5b2856ab964042179621747dd..392745caa73933feec17bcf4b4252191663d587d 100644
--- a/test/shared/call_elpa1.c
+++ b/test/shared/call_elpa1.c
@@ -60,7 +60,7 @@ int call_elpa1_complex_solver_from_c_double(int na, int nev, complex double *a,
   return elpa_solve_evp_complex_1stage_double_precision(na, nev, a, lda, ev, q, ldq, nblk, ncols, mpi_comm_rows, mpi_comm_cols, mpi_comm_all, useGPU);
 }
 #ifdef WANT_SINGLE_PRECISION_COMPLEX
-int call_elpa1_complex_solver_from_c_single(int na, int nev, complex  *a, int lda, float *ev, complex  *q, int ldq, int nblk, int ncols, int mpi_comm_rows, int mpi_comm_cols, int mpi_comm_all, int useGPU) {
+int call_elpa1_complex_solver_from_c_single(int na, int nev, complex float *a, int lda, float *ev, complex float *q, int ldq, int nblk, int ncols, int mpi_comm_rows, int mpi_comm_cols, int mpi_comm_all, int useGPU) {
   return elpa_solve_evp_complex_1stage_single_precision(na, nev, a, lda, ev, q, ldq, nblk, ncols, mpi_comm_rows, mpi_comm_cols, mpi_comm_all, useGPU);
 }
 #endif
diff --git a/test/shared/prepare_matrix_template.X90 b/test/shared/prepare_matrix_template.X90
index 036926c8894f617e7609ccc855c2c3a0680c42e7..94ee647cf8c2306543fad09230fd7b8f531a6997 100644
--- a/test/shared/prepare_matrix_template.X90
+++ b/test/shared/prepare_matrix_template.X90
@@ -166,7 +166,7 @@
 #else
     !c> void prepare_matrix_complex_single_f(int na, int myid, int na_rows, int na_cols,
     !c>                                       int sc_desc[9],
-    !c>                                       complex *a, complex *z, complex *as);
+    !c>                                       complex float *a, complex float *z, complex float *as);
 #endif
 #endif /* COMPLEXCASE */