Commit a953004b authored by Andreas Marek's avatar Andreas Marek

Fix errors in tests for new interface

Actually, the complex cases have not been checked so far.
Furthermore, there has been an inconsistency between setting

set("gpu",1)

and *NOT* setting a GPU kernel via the set mechanism. Then, the
default kernel (which is *NOT* GPU) has been used
parent 5177b0e8
......@@ -73,9 +73,9 @@ program test_interface
integer :: my_blacs_ctxt, sc_desc(9), info, nprow, npcol
! The Matrix
real(kind=C_DOUBLE_COMPLEX), allocatable :: a(:,:), as(:,:)
complex(kind=C_DOUBLE_COMPLEX), allocatable :: a(:,:), as(:,:)
! eigenvectors
real(kind=C_DOUBLE_COMPLEX), allocatable :: z(:,:)
complex(kind=C_DOUBLE_COMPLEX), allocatable :: z(:,:)
! eigenvalues
real(kind=C_DOUBLE), allocatable :: ev(:)
......@@ -133,9 +133,6 @@ program test_interface
call e%set("solver", ELPA_SOLVER_1STAGE, success)
assert(success == ELPA_OK)
call e%set("complex_kernel", ELPA_2STAGE_COMPLEX_GENERIC, success)
assert(success == ELPA_OK)
call e%solve(a, ev, z, success)
assert(success == ELPA_OK)
......
......@@ -73,9 +73,9 @@ program test_interface
integer :: my_blacs_ctxt, sc_desc(9), info, nprow, npcol
! The Matrix
real(kind=C_DOUBLE_COMPLEX), allocatable :: a(:,:), as(:,:)
complex(kind=C_DOUBLE_COMPLEX), allocatable :: a(:,:), as(:,:)
! eigenvectors
real(kind=C_DOUBLE_COMPLEX), allocatable :: z(:,:)
complex(kind=C_DOUBLE_COMPLEX), allocatable :: z(:,:)
! eigenvalues
real(kind=C_DOUBLE), allocatable :: ev(:)
......@@ -136,9 +136,6 @@ program test_interface
call e%set("gpu", 1, success)
assert(success == ELPA_OK)
call e%set("complex_kernel", ELPA_2STAGE_COMPLEX_GENERIC, success)
assert(success == ELPA_OK)
call e%solve(a, ev, z, success)
assert(success == ELPA_OK)
......
......@@ -73,9 +73,9 @@ program test_interface
integer :: my_blacs_ctxt, sc_desc(9), info, nprow, npcol
! The Matrix
real(kind=C_DOUBLE_COMPLEX), allocatable :: a(:,:), as(:,:)
complex(kind=C_DOUBLE_COMPLEX), allocatable :: a(:,:), as(:,:)
! eigenvectors
real(kind=C_DOUBLE_COMPLEX), allocatable :: z(:,:)
complex(kind=C_DOUBLE_COMPLEX), allocatable :: z(:,:)
! eigenvalues
real(kind=C_DOUBLE), allocatable :: ev(:)
......
......@@ -73,9 +73,9 @@ program test_interface
integer :: my_blacs_ctxt, sc_desc(9), info, nprow, npcol
! The Matrix
real(kind=C_DOUBLE_COMPLEX), allocatable :: a(:,:), as(:,:)
complex(kind=C_DOUBLE_COMPLEX), allocatable :: a(:,:), as(:,:)
! eigenvectors
real(kind=C_DOUBLE_COMPLEX), allocatable :: z(:,:)
complex(kind=C_DOUBLE_COMPLEX), allocatable :: z(:,:)
! eigenvalues
real(kind=C_DOUBLE), allocatable :: ev(:)
......
......@@ -73,9 +73,9 @@ program test_interface
integer :: my_blacs_ctxt, sc_desc(9), info, nprow, npcol
! The Matrix
real(kind=C_FLOAT_COMPLEX), allocatable :: a(:,:), as(:,:)
complex(kind=C_FLOAT_COMPLEX), allocatable :: a(:,:), as(:,:)
! eigenvectors
real(kind=C_FLOAT_COMPLEX), allocatable :: z(:,:)
complex(kind=C_FLOAT_COMPLEX), allocatable :: z(:,:)
! eigenvalues
real(kind=C_FLOAT), allocatable :: ev(:)
......@@ -127,15 +127,11 @@ program test_interface
assert(success == ELPA_OK)
solver = e%get("solver", success)
print *, "solver =", solver
assert(success == ELPA_OK)
call e%set("solver", ELPA_SOLVER_1STAGE, success)
assert(success == ELPA_OK)
call e%set("complex_kernel", ELPA_2STAGE_COMPLEX_GENERIC, success)
assert(success == ELPA_OK)
call e%solve(a, ev, z, success)
assert(success == ELPA_OK)
......
......@@ -73,9 +73,9 @@ program test_interface
integer :: my_blacs_ctxt, sc_desc(9), info, nprow, npcol
! The Matrix
real(kind=C_FLOAT_COMPLEX), allocatable :: a(:,:), as(:,:)
complex(kind=C_FLOAT_COMPLEX), allocatable :: a(:,:), as(:,:)
! eigenvectors
real(kind=C_FLOAT_COMPLEX), allocatable :: z(:,:)
complex(kind=C_FLOAT_COMPLEX), allocatable :: z(:,:)
! eigenvalues
real(kind=C_FLOAT), allocatable :: ev(:)
......@@ -135,9 +135,6 @@ program test_interface
call e%set("gpu", 1, success)
assert(success == ELPA_OK)
call e%set("complex_kernel", ELPA_2STAGE_COMPLEX_GENERIC, success)
assert(success == ELPA_OK)
call e%solve(a, ev, z, success)
assert(success == ELPA_OK)
......
......@@ -73,9 +73,9 @@ program test_interface
integer :: my_blacs_ctxt, sc_desc(9), info, nprow, npcol
! The Matrix
real(kind=C_FLOAT_COMPLEX), allocatable :: a(:,:), as(:,:)
complex(kind=C_FLOAT_COMPLEX), allocatable :: a(:,:), as(:,:)
! eigenvectors
real(kind=C_FLOAT_COMPLEX), allocatable :: z(:,:)
complex(kind=C_FLOAT_COMPLEX), allocatable :: z(:,:)
! eigenvalues
real(kind=C_FLOAT), allocatable :: ev(:)
......@@ -127,7 +127,6 @@ program test_interface
assert(success == ELPA_OK)
solver = e%get("solver", success)
print *, "solver =", solver
assert(success == ELPA_OK)
call e%set("solver", ELPA_SOLVER_2STAGE, success)
......
......@@ -73,9 +73,9 @@ program test_interface
integer :: my_blacs_ctxt, sc_desc(9), info, nprow, npcol
! The Matrix
real(kind=C_FLOAT_COMPLEX), allocatable :: a(:,:), as(:,:)
complex(kind=C_FLOAT_COMPLEX), allocatable :: a(:,:), as(:,:)
! eigenvectors
real(kind=C_FLOAT_COMPLEX), allocatable :: z(:,:)
complex(kind=C_FLOAT_COMPLEX), allocatable :: z(:,:)
! eigenvalues
real(kind=C_FLOAT), allocatable :: ev(:)
......@@ -135,7 +135,7 @@ program test_interface
call e%set("gpu", 1, success)
assert(success == ELPA_OK)
call e%set("complex_kernel", ELPA_2STAGE_COMPLEX_GPU, success)
assert(success == ELPA_OK)
......
......@@ -133,12 +133,6 @@ program test_interface
call e%set("solver", ELPA_SOLVER_1STAGE, success)
assert(success == ELPA_OK)
call e%set("real_kernel", ELPA_2STAGE_REAL_GENERIC, success)
assert(success == ELPA_OK)
call e%set("complex_kernel", ELPA_2STAGE_COMPLEX_GENERIC, success)
assert(success == ELPA_OK)
call e%solve(a, ev, z, success)
assert(success == ELPA_OK)
......
......@@ -136,12 +136,6 @@ program test_interface
call e%set("gpu", 1, success)
assert(success == ELPA_OK)
call e%set("real_kernel", ELPA_2STAGE_REAL_GENERIC, success)
assert(success == ELPA_OK)
call e%set("complex_kernel", ELPA_2STAGE_COMPLEX_GENERIC, success)
assert(success == ELPA_OK)
call e%solve(a, ev, z, success)
assert(success == ELPA_OK)
......
......@@ -139,9 +139,6 @@ program test_interface
call e%set("real_kernel", ELPA_2STAGE_REAL_GPU, success)
assert(success == ELPA_OK)
call e%set("complex_kernel", ELPA_2STAGE_COMPLEX_GENERIC, success)
assert(success == ELPA_OK)
call e%solve(a, ev, z, success)
assert(success == ELPA_OK)
......
......@@ -136,12 +136,6 @@ program test_interface
call e%set("gpu", 1, success)
assert(success == ELPA_OK)
call e%set("real_kernel", ELPA_2STAGE_REAL_GENERIC, success)
assert(success == ELPA_OK)
call e%set("complex_kernel", ELPA_2STAGE_COMPLEX_GENERIC, success)
assert(success == ELPA_OK)
call e%solve(a, ev, z, success)
assert(success == ELPA_OK)
......
......@@ -135,11 +135,8 @@ program test_interface
call e%set("gpu", 1, success)
assert(success == ELPA_OK)
call e%set("real_kernel", ELPA_2STAGE_REAL_GPU, success)
assert(success == ELPA_OK)
call e%set("complex_kernel", ELPA_2STAGE_COMPLEX_GENERIC, success)
call e%set("real_kernel", ELPA_2STAGE_REAL_GPU, success)
assert(success == ELPA_OK)
call e%solve(a, ev, z, success)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment