Commit e28f5b44 authored by Victor Yu's avatar Victor Yu
Browse files

Disable Cannon's method in ELPA

Tests show that this new method is always slower than the existing code on
CPU-only platforms. And it does not support GPU acceleration at the moment.
If needed, it can be easily enabled in the future.
parent 6c10d681
......@@ -7,7 +7,7 @@ SET(elsi_URL "http://elsi-interchange.org")
SET(elsi_EMAIL "elsi-team@duke.edu")
SET(elsi_LICENSE "BSD 3")
SET(elsi_DESCRIPTION "Electronic Structure Infrastructure")
SET(elsi_DATESTAMP "20200422")
SET(elsi_DATESTAMP "20200424")
### CMake modules ###
LIST(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
......
### Source files ###
LIST(APPEND elpa_src
src/aligned_mem.f90
src/cannon.c
src/check_for_gpu.f90
src/elpa1_auxiliary.f90
src/elpa1_compute_private.f90
......@@ -35,11 +34,6 @@ LIST(APPEND elpa_src
src/time.c
src/virtual_memory.c)
IF(ADD_UNDERSCORE)
SET_SOURCE_FILES_PROPERTIES(src/cannon.c
PROPERTIES COMPILE_DEFINITIONS "Add_")
ENDIF()
IF(USE_MPI_MODULE)
LIST(APPEND elpa_src src/mod_mpi.f90)
ELSE()
......
This diff is collapsed.
......@@ -272,95 +272,4 @@ module elpa_generated_fortran_interfaces
end function
end interface
interface
subroutine cannons_reduction_d(A, U, local_rowsCast, local_colsCast, a_desc, Res, toStore, row_comm, col_comm) &
bind(C, name="cannons_reduction_c_d")
use precision
real(c_double) :: A(local_rowsCast, local_colsCast), U(local_rowsCast, local_colsCast)
real(c_double) :: Res(local_rowsCast, local_colsCast)
integer(kind=BLAS_KIND) :: a_desc(9)
integer(kind=c_int),value :: local_rowsCast, local_colsCast
integer(kind=MPI_KIND),value :: row_comm, col_comm, ToStore
end subroutine
end interface
interface
subroutine cannons_triang_rectangular_d(U, B, local_rowsCast, local_colsCast, u_desc, b_desc, Res, row_comm, col_comm) &
bind(C, name="cannons_triang_rectangular_c_d")
use precision
real(c_double) :: U(local_rowsCast, local_colsCast), B(local_rowsCast, local_colsCast)
real(c_double) :: Res(local_rowsCast, local_colsCast)
integer(kind=BLAS_KIND) :: u_desc(9), b_desc(9)
integer(kind=c_int),value :: local_rowsCast, local_colsCast
integer(kind=MPI_KIND),value :: row_comm, col_comm
end subroutine
end interface
interface
subroutine cannons_reduction_f(A, U, local_rowsCast, local_colsCast, a_desc, Res, toStore, row_comm, col_comm) &
bind(C, name="cannons_reduction_c_f")
use precision
real(c_float) :: A(local_rowsCast, local_colsCast), U(local_rowsCast, local_colsCast)
real(c_float) :: Res(local_rowsCast, local_colsCast)
!type(c_ptr), value :: A, U, Res
integer(kind=BLAS_KIND) :: a_desc(9)
integer(kind=c_int),value :: local_rowsCast, local_colsCast
integer(kind=MPI_KIND),value :: row_comm, col_comm, ToStore
end subroutine
end interface
interface
subroutine cannons_triang_rectangular_f(U, B, local_rowsCast, local_colsCast, u_desc, b_desc, Res, row_comm, col_comm) &
bind(C, name="cannons_triang_rectangular_c_f")
use precision
real(c_float) :: U(local_rowsCast, local_colsCast), B(local_rowsCast, local_colsCast)
real(c_float) :: Res(local_rowsCast, local_colsCast)
integer(kind=BLAS_KIND) :: u_desc(9), b_desc(9)
integer(kind=c_int),value :: local_rowsCast, local_colsCast
integer(kind=MPI_KIND),value :: row_comm, col_comm
end subroutine
end interface
interface
subroutine cannons_reduction_dc(A, U, local_rowsCast, local_colsCast, a_desc, Res, toStore, row_comm, col_comm) &
bind(C, name="cannons_reduction_c_dc")
use precision
complex(c_double) :: A(local_rowsCast, local_colsCast), U(local_rowsCast, local_colsCast)
complex(c_double) :: Res(local_rowsCast, local_colsCast)
integer(kind=BLAS_KIND) :: a_desc(9)
integer(kind=c_int),value :: local_rowsCast, local_colsCast
integer(kind=MPI_KIND),value :: row_comm, col_comm, ToStore
end subroutine
end interface
interface
subroutine cannons_triang_rectangular_dc(U, B, local_rowsCast, local_colsCast, u_desc, b_desc, Res, row_comm, col_comm) &
bind(C, name="cannons_triang_rectangular_c_dc")
use precision
complex(c_double) :: U(local_rowsCast, local_colsCast), B(local_rowsCast, local_colsCast)
complex(c_double) :: Res(local_rowsCast, local_colsCast)
integer(kind=BLAS_KIND) :: u_desc(9), b_desc(9)
integer(kind=c_int),value :: local_rowsCast, local_colsCast
integer(kind=MPI_KIND),value :: row_comm, col_comm
end subroutine
end interface
interface
subroutine cannons_reduction_fc(A, U, local_rowsCast, local_colsCast, a_desc, Res, toStore, row_comm, col_comm) &
bind(C, name="cannons_reduction_c_fc")
use precision
complex(c_float) :: A(local_rowsCast, local_colsCast), U(local_rowsCast, local_colsCast)
complex(c_float) :: Res(local_rowsCast, local_colsCast)
!type(c_ptr), value :: A, U, Res
integer(kind=BLAS_KIND) :: a_desc(9)
integer(kind=c_int),value :: local_rowsCast, local_colsCast
integer(kind=MPI_KIND),value :: row_comm, col_comm, ToStore
end subroutine
end interface
interface
subroutine cannons_triang_rectangular_fc(U, B, local_rowsCast, local_colsCast, u_desc, b_desc, Res, row_comm, col_comm) &
bind(C, name="cannons_triang_rectangular_c_fc")
use precision
complex(c_float) :: U(local_rowsCast, local_colsCast), B(local_rowsCast, local_colsCast)
complex(c_float) :: Res(local_rowsCast, local_colsCast)
integer(kind=BLAS_KIND) :: u_desc(9), b_desc(9)
integer(kind=c_int),value :: local_rowsCast, local_colsCast
integer(kind=MPI_KIND),value :: row_comm, col_comm
end subroutine
end interface
end module
......@@ -366,107 +366,4 @@ module elpa_generated_fortran_interfaces
end function
end interface
interface
subroutine cannons_reduction_d(A, U, local_rowsCast, local_colsCast, a_desc, Res, toStore, row_comm, col_comm) &
bind(C, name="cannons_reduction_c_d")
use precision
real(c_double) :: A(local_rowsCast, local_colsCast), U(local_rowsCast, local_colsCast)
real(c_double) :: Res(local_rowsCast, local_colsCast)
integer(kind=BLAS_KIND) :: a_desc(9)
integer(kind=c_int),value :: local_rowsCast, local_colsCast
integer(kind=MPI_KIND),value :: row_comm, col_comm, ToStore
end subroutine
end interface
interface
subroutine cannons_triang_rectangular_d(U, B, local_rowsCast, local_colsCast, u_desc, b_desc, Res, row_comm, col_comm) &
bind(C, name="cannons_triang_rectangular_c_d")
use precision
real(c_double) :: U(local_rowsCast, local_colsCast), B(local_rowsCast, local_colsCast)
real(c_double) :: Res(local_rowsCast, local_colsCast)
integer(kind=BLAS_KIND) :: u_desc(9), b_desc(9)
integer(kind=c_int),value :: local_rowsCast, local_colsCast
integer(kind=MPI_KIND),value :: row_comm, col_comm
end subroutine
end interface
interface
subroutine cannons_reduction_f(A, U, local_rowsCast, local_colsCast, a_desc, Res, toStore, row_comm, col_comm) &
bind(C, name="cannons_reduction_c_f")
use precision
real(c_float) :: A(local_rowsCast, local_colsCast), U(local_rowsCast, local_colsCast)
real(c_float) :: Res(local_rowsCast, local_colsCast)
!type(c_ptr), value :: A, U, Res
integer(kind=BLAS_KIND) :: a_desc(9)
integer(kind=c_int),value :: local_rowsCast, local_colsCast
integer(kind=MPI_KIND),value :: row_comm, col_comm, ToStore
end subroutine
end interface
interface
subroutine cannons_triang_rectangular_f(U, B, local_rowsCast, local_colsCast, u_desc, b_desc, Res, row_comm, col_comm) &
bind(C, name="cannons_triang_rectangular_c_f")
use precision
real(c_float) :: U(local_rowsCast, local_colsCast), B(local_rowsCast, local_colsCast)
real(c_float) :: Res(local_rowsCast, local_colsCast)
integer(kind=BLAS_KIND) :: u_desc(9), b_desc(9)
integer(kind=c_int),value :: local_rowsCast, local_colsCast
integer(kind=MPI_KIND),value :: row_comm, col_comm
end subroutine
end interface
interface
subroutine cannons_reduction_dc(A, U, local_rowsCast, local_colsCast, a_desc, Res, toStore, row_comm, col_comm) &
bind(C, name="cannons_reduction_c_dc")
use precision
complex(c_double) :: A(local_rowsCast, local_colsCast), U(local_rowsCast, local_colsCast)
complex(c_double) :: Res(local_rowsCast, local_colsCast)
integer(kind=BLAS_KIND) :: a_desc(9)
integer(kind=c_int),value :: local_rowsCast, local_colsCast
integer(kind=MPI_KIND),value :: row_comm, col_comm, ToStore
end subroutine
end interface
interface
subroutine cannons_triang_rectangular_dc(U, B, local_rowsCast, local_colsCast, u_desc, b_desc, Res, row_comm, col_comm) &
bind(C, name="cannons_triang_rectangular_c_dc")
use precision
complex(c_double) :: U(local_rowsCast, local_colsCast), B(local_rowsCast, local_colsCast)
complex(c_double) :: Res(local_rowsCast, local_colsCast)
integer(kind=BLAS_KIND) :: u_desc(9), b_desc(9)
integer(kind=c_int),value :: local_rowsCast, local_colsCast
integer(kind=MPI_KIND),value :: row_comm, col_comm
end subroutine
end interface
interface
subroutine cannons_reduction_fc(A, U, local_rowsCast, local_colsCast, a_desc, Res, toStore, row_comm, col_comm) &
bind(C, name="cannons_reduction_c_fc")
use precision
complex(c_float) :: A(local_rowsCast, local_colsCast), U(local_rowsCast, local_colsCast)
complex(c_float) :: Res(local_rowsCast, local_colsCast)
!type(c_ptr), value :: A, U, Res
integer(kind=BLAS_KIND) :: a_desc(9)
integer(kind=c_int),value :: local_rowsCast, local_colsCast
integer(kind=MPI_KIND),value :: row_comm, col_comm, ToStore
end subroutine
end interface
interface
subroutine cannons_triang_rectangular_fc(U, B, local_rowsCast, local_colsCast, u_desc, b_desc, Res, row_comm, col_comm) &
bind(C, name="cannons_triang_rectangular_c_fc")
use precision
complex(c_float) :: U(local_rowsCast, local_colsCast), B(local_rowsCast, local_colsCast)
complex(c_float) :: Res(local_rowsCast, local_colsCast)
integer(kind=BLAS_KIND) :: u_desc(9), b_desc(9)
integer(kind=c_int),value :: local_rowsCast, local_colsCast
integer(kind=MPI_KIND),value :: row_comm, col_comm
end subroutine
end interface
interface
subroutine test_c_bindings(A, local_rows, local_cols, np_rows, np_cols, my_prow, my_pcol, a_desc, &
Res, row_comm, col_comm) &
bind(C, name="d_test_c_bindings_c")
use, intrinsic :: iso_c_binding
real(c_double) :: A(local_rows, local_cols), Res(local_rows, local_cols)
!type(c_ptr), value :: A, Res
integer(kind=c_int) :: a_desc(9)
integer(kind=c_int),value :: local_rows, local_cols
integer(kind=c_int),value :: np_rows, np_cols, my_prow, my_pcol, row_comm, col_comm
end subroutine
end interface
end module
......@@ -366,107 +366,4 @@ module elpa_generated_fortran_interfaces
end function
end interface
interface
subroutine cannons_reduction_d(A, U, local_rowsCast, local_colsCast, a_desc, Res, toStore, row_comm, col_comm) &
bind(C, name="cannons_reduction_c_d")
use precision
real(c_double) :: A(local_rowsCast, local_colsCast), U(local_rowsCast, local_colsCast)
real(c_double) :: Res(local_rowsCast, local_colsCast)
integer(kind=BLAS_KIND) :: a_desc(9)
integer(kind=c_int),value :: local_rowsCast, local_colsCast
integer(kind=MPI_KIND),value :: row_comm, col_comm, ToStore
end subroutine
end interface
interface
subroutine cannons_triang_rectangular_d(U, B, local_rowsCast, local_colsCast, u_desc, b_desc, Res, row_comm, col_comm) &
bind(C, name="cannons_triang_rectangular_c_d")
use precision
real(c_double) :: U(local_rowsCast, local_colsCast), B(local_rowsCast, local_colsCast)
real(c_double) :: Res(local_rowsCast, local_colsCast)
integer(kind=BLAS_KIND) :: u_desc(9), b_desc(9)
integer(kind=c_int),value :: local_rowsCast, local_colsCast
integer(kind=MPI_KIND),value :: row_comm, col_comm
end subroutine
end interface
interface
subroutine cannons_reduction_f(A, U, local_rowsCast, local_colsCast, a_desc, Res, toStore, row_comm, col_comm) &
bind(C, name="cannons_reduction_c_f")
use precision
real(c_float) :: A(local_rowsCast, local_colsCast), U(local_rowsCast, local_colsCast)
real(c_float) :: Res(local_rowsCast, local_colsCast)
!type(c_ptr), value :: A, U, Res
integer(kind=BLAS_KIND) :: a_desc(9)
integer(kind=c_int),value :: local_rowsCast, local_colsCast
integer(kind=MPI_KIND),value :: row_comm, col_comm, ToStore
end subroutine
end interface
interface
subroutine cannons_triang_rectangular_f(U, B, local_rowsCast, local_colsCast, u_desc, b_desc, Res, row_comm, col_comm) &
bind(C, name="cannons_triang_rectangular_c_f")
use precision
real(c_float) :: U(local_rowsCast, local_colsCast), B(local_rowsCast, local_colsCast)
real(c_float) :: Res(local_rowsCast, local_colsCast)
integer(kind=BLAS_KIND) :: u_desc(9), b_desc(9)
integer(kind=c_int),value :: local_rowsCast, local_colsCast
integer(kind=MPI_KIND),value :: row_comm, col_comm
end subroutine
end interface
interface
subroutine cannons_reduction_dc(A, U, local_rowsCast, local_colsCast, a_desc, Res, toStore, row_comm, col_comm) &
bind(C, name="cannons_reduction_c_dc")
use precision
complex(c_double) :: A(local_rowsCast, local_colsCast), U(local_rowsCast, local_colsCast)
complex(c_double) :: Res(local_rowsCast, local_colsCast)
integer(kind=BLAS_KIND) :: a_desc(9)
integer(kind=c_int),value :: local_rowsCast, local_colsCast
integer(kind=MPI_KIND),value :: row_comm, col_comm, ToStore
end subroutine
end interface
interface
subroutine cannons_triang_rectangular_dc(U, B, local_rowsCast, local_colsCast, u_desc, b_desc, Res, row_comm, col_comm) &
bind(C, name="cannons_triang_rectangular_c_dc")
use precision
complex(c_double) :: U(local_rowsCast, local_colsCast), B(local_rowsCast, local_colsCast)
complex(c_double) :: Res(local_rowsCast, local_colsCast)
integer(kind=BLAS_KIND) :: u_desc(9), b_desc(9)
integer(kind=c_int),value :: local_rowsCast, local_colsCast
integer(kind=MPI_KIND),value :: row_comm, col_comm
end subroutine
end interface
interface
subroutine cannons_reduction_fc(A, U, local_rowsCast, local_colsCast, a_desc, Res, toStore, row_comm, col_comm) &
bind(C, name="cannons_reduction_c_fc")
use precision
complex(c_float) :: A(local_rowsCast, local_colsCast), U(local_rowsCast, local_colsCast)
complex(c_float) :: Res(local_rowsCast, local_colsCast)
!type(c_ptr), value :: A, U, Res
integer(kind=BLAS_KIND) :: a_desc(9)
integer(kind=c_int),value :: local_rowsCast, local_colsCast
integer(kind=MPI_KIND),value :: row_comm, col_comm, ToStore
end subroutine
end interface
interface
subroutine cannons_triang_rectangular_fc(U, B, local_rowsCast, local_colsCast, u_desc, b_desc, Res, row_comm, col_comm) &
bind(C, name="cannons_triang_rectangular_c_fc")
use precision
complex(c_float) :: U(local_rowsCast, local_colsCast), B(local_rowsCast, local_colsCast)
complex(c_float) :: Res(local_rowsCast, local_colsCast)
integer(kind=BLAS_KIND) :: u_desc(9), b_desc(9)
integer(kind=c_int),value :: local_rowsCast, local_colsCast
integer(kind=MPI_KIND),value :: row_comm, col_comm
end subroutine
end interface
interface
subroutine test_c_bindings(A, local_rows, local_cols, np_rows, np_cols, my_prow, my_pcol, a_desc, &
Res, row_comm, col_comm) &
bind(C, name="d_test_c_bindings_c")
use, intrinsic :: iso_c_binding
real(c_double) :: A(local_rows, local_cols), Res(local_rows, local_cols)
!type(c_ptr), value :: A, Res
integer(kind=c_int) :: a_desc(9)
integer(kind=c_int),value :: local_rows, local_cols
integer(kind=c_int),value :: np_rows, np_cols, my_prow, my_pcol, row_comm, col_comm
end subroutine
end interface
end module
......@@ -420,107 +420,4 @@ module elpa_generated_fortran_interfaces
end function
end interface
interface
subroutine cannons_reduction_d(A, U, local_rowsCast, local_colsCast, a_desc, Res, toStore, row_comm, col_comm) &
bind(C, name="cannons_reduction_c_d")
use precision
real(c_double) :: A(local_rowsCast, local_colsCast), U(local_rowsCast, local_colsCast)
real(c_double) :: Res(local_rowsCast, local_colsCast)
integer(kind=BLAS_KIND) :: a_desc(9)
integer(kind=c_int),value :: local_rowsCast, local_colsCast
integer(kind=MPI_KIND),value :: row_comm, col_comm, ToStore
end subroutine
end interface
interface
subroutine cannons_triang_rectangular_d(U, B, local_rowsCast, local_colsCast, u_desc, b_desc, Res, row_comm, col_comm) &
bind(C, name="cannons_triang_rectangular_c_d")
use precision
real(c_double) :: U(local_rowsCast, local_colsCast), B(local_rowsCast, local_colsCast)
real(c_double) :: Res(local_rowsCast, local_colsCast)
integer(kind=BLAS_KIND) :: u_desc(9), b_desc(9)
integer(kind=c_int),value :: local_rowsCast, local_colsCast
integer(kind=MPI_KIND),value :: row_comm, col_comm
end subroutine
end interface
interface
subroutine cannons_reduction_f(A, U, local_rowsCast, local_colsCast, a_desc, Res, toStore, row_comm, col_comm) &
bind(C, name="cannons_reduction_c_f")
use precision
real(c_float) :: A(local_rowsCast, local_colsCast), U(local_rowsCast, local_colsCast)
real(c_float) :: Res(local_rowsCast, local_colsCast)
!type(c_ptr), value :: A, U, Res
integer(kind=BLAS_KIND) :: a_desc(9)
integer(kind=c_int),value :: local_rowsCast, local_colsCast
integer(kind=MPI_KIND),value :: row_comm, col_comm, ToStore
end subroutine
end interface
interface
subroutine cannons_triang_rectangular_f(U, B, local_rowsCast, local_colsCast, u_desc, b_desc, Res, row_comm, col_comm) &
bind(C, name="cannons_triang_rectangular_c_f")
use precision
real(c_float) :: U(local_rowsCast, local_colsCast), B(local_rowsCast, local_colsCast)
real(c_float) :: Res(local_rowsCast, local_colsCast)
integer(kind=BLAS_KIND) :: u_desc(9), b_desc(9)
integer(kind=c_int),value :: local_rowsCast, local_colsCast
integer(kind=MPI_KIND),value :: row_comm, col_comm
end subroutine
end interface
interface
subroutine cannons_reduction_dc(A, U, local_rowsCast, local_colsCast, a_desc, Res, toStore, row_comm, col_comm) &
bind(C, name="cannons_reduction_c_dc")
use precision
complex(c_double) :: A(local_rowsCast, local_colsCast), U(local_rowsCast, local_colsCast)
complex(c_double) :: Res(local_rowsCast, local_colsCast)
integer(kind=BLAS_KIND) :: a_desc(9)
integer(kind=c_int),value :: local_rowsCast, local_colsCast
integer(kind=MPI_KIND),value :: row_comm, col_comm, ToStore
end subroutine
end interface
interface
subroutine cannons_triang_rectangular_dc(U, B, local_rowsCast, local_colsCast, u_desc, b_desc, Res, row_comm, col_comm) &
bind(C, name="cannons_triang_rectangular_c_dc")
use precision
complex(c_double) :: U(local_rowsCast, local_colsCast), B(local_rowsCast, local_colsCast)
complex(c_double) :: Res(local_rowsCast, local_colsCast)
integer(kind=BLAS_KIND) :: u_desc(9), b_desc(9)
integer(kind=c_int),value :: local_rowsCast, local_colsCast
integer(kind=MPI_KIND),value :: row_comm, col_comm
end subroutine
end interface
interface
subroutine cannons_reduction_fc(A, U, local_rowsCast, local_colsCast, a_desc, Res, toStore, row_comm, col_comm) &
bind(C, name="cannons_reduction_c_fc")
use precision
complex(c_float) :: A(local_rowsCast, local_colsCast), U(local_rowsCast, local_colsCast)
complex(c_float) :: Res(local_rowsCast, local_colsCast)
!type(c_ptr), value :: A, U, Res
integer(kind=BLAS_KIND) :: a_desc(9)
integer(kind=c_int),value :: local_rowsCast, local_colsCast
integer(kind=MPI_KIND),value :: row_comm, col_comm, ToStore
end subroutine
end interface
interface
subroutine cannons_triang_rectangular_fc(U, B, local_rowsCast, local_colsCast, u_desc, b_desc, Res, row_comm, col_comm) &
bind(C, name="cannons_triang_rectangular_c_fc")
use precision
complex(c_float) :: U(local_rowsCast, local_colsCast), B(local_rowsCast, local_colsCast)
complex(c_float) :: Res(local_rowsCast, local_colsCast)
integer(kind=BLAS_KIND) :: u_desc(9), b_desc(9)
integer(kind=c_int),value :: local_rowsCast, local_colsCast
integer(kind=MPI_KIND),value :: row_comm, col_comm
end subroutine
end interface
interface
subroutine test_c_bindings(A, local_rows, local_cols, np_rows, np_cols, my_prow, my_pcol, a_desc, &
Res, row_comm, col_comm) &
bind(C, name="d_test_c_bindings_c")
use, intrinsic :: iso_c_binding
real(c_double) :: A(local_rows, local_cols), Res(local_rows, local_cols)
!type(c_ptr), value :: A, Res
integer(kind=c_int) :: a_desc(9)
integer(kind=c_int),value :: local_rows, local_cols
integer(kind=c_int),value :: np_rows, np_cols, my_prow, my_pcol, row_comm, col_comm
end subroutine
end interface
end module
This diff is collapsed.
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