Skip to content

Instantly share code, notes, and snippets.

@marcindulak
Created February 20, 2017 14:14
Show Gist options
  • Save marcindulak/b7ce5902a946b3d554edaa2c476140ae to your computer and use it in GitHub Desktop.
Save marcindulak/b7ce5902a946b3d554edaa2c476140ae to your computer and use it in GitHub Desktop.
diff -up openmx3.8/source/get_elpa_row_col_comms.f90.elpa openmx3.8/source/get_elpa_row_col_comms.f90
--- openmx3.8/source/get_elpa_row_col_comms.f90.elpa 2016-03-27 08:53:28.000000000 +0200
+++ openmx3.8/source/get_elpa_row_col_comms.f90 2017-02-18 10:31:36.804541488 +0100
@@ -23,7 +23,7 @@ subroutine get_elpa_row_col_comms(mpi_co
!
!-------------------------------------------------------------------------------
- use ELPA1
+ use ELPA1, ignore_me => get_elpa_row_col_comms
implicit none
diff -up openmx3.8/source/makefile.elpa openmx3.8/source/makefile
--- openmx3.8/source/makefile.elpa 2016-04-02 14:43:42.000000000 +0200
+++ openmx3.8/source/makefile 2017-02-18 10:31:36.804541488 +0100
@@ -213,7 +213,7 @@ OBJS = openmx.o openmx_common.o Input
TRAN_Calc_OneTransmission.o TRAN_Main_Analysis.o TRAN_Main_Analysis_NC.o \
MTRAN_EigenChannel.o TRAN_Channel_Functions.o TRAN_Channel_Output.o \
TRAN_Calc_CurrentDensity.o TRAN_CDen_Main.o \
- elpa1.o solve_evp_real.o solve_evp_complex.o \
+ solve_evp_real.o solve_evp_complex.o \
NBO_Cluster.o NBO_Krylov.o \
# PROG = openmx.exe
diff -up openmx3.8/source/solve_evp_complex.f90.elpa openmx3.8/source/solve_evp_complex.f90
--- openmx3.8/source/solve_evp_complex.f90.elpa 2016-03-27 08:53:28.000000000 +0200
+++ openmx3.8/source/solve_evp_complex.f90 2017-02-18 10:36:55.266181419 +0100
@@ -1,7 +1,7 @@
!-------------------------------------------------------------------------------
-subroutine solve_evp_complex(na, nev, a, lda, ev, q, ldq, nblk, mpi_comm_rows, mpi_comm_cols)
+subroutine solve_evp_complex(na, nev, a, lda, ev, q, ldq, nblk, matrixCols, mpi_comm_rows, mpi_comm_cols)
!-------------------------------------------------------------------------------
! solve_evp_complex: Solves the complex eigenvalue problem
@@ -37,16 +37,22 @@ subroutine solve_evp_complex(na, nev, a,
!
!-------------------------------------------------------------------------------
- use ELPA1
+ use ELPA1, ignore_me => solve_evp_complex
+ use ELPA1_COMPUTE
+ use ELPA_utilities
implicit none
include 'mpif.h'
- integer, intent(in) :: na, nev, lda, ldq, nblk, mpi_comm_rows, mpi_comm_cols
+ integer, intent(in) :: na, nev, lda, ldq, nblk, matrixCols, mpi_comm_rows, mpi_comm_cols
complex*16 :: a(lda,*), q(ldq,*)
real*8 :: ev(na)
+ logical :: success
+ logical :: wantDebug
+ logical :: useGPU = .false.
+
integer my_prow, my_pcol, np_rows, np_cols, mpierr
integer l_rows, l_cols, l_cols_nev
real*8, allocatable :: q_real(:,:), e(:)
@@ -67,13 +73,14 @@ subroutine solve_evp_complex(na, nev, a,
allocate(q_real(l_rows,l_cols))
ttt0 = MPI_Wtime()
- call tridiag_complex(na, a, lda, nblk, mpi_comm_rows, mpi_comm_cols, ev, e, tau)
+ call tridiag_complex(na, a, lda, nblk, matrixCols, mpi_comm_rows, mpi_comm_cols, ev, e, tau, useGPU)
ttt1 = MPI_Wtime()
if(my_prow==0 .and. my_pcol==0 .and. elpa_print_times) print *,'Time tridiag_complex :',ttt1-ttt0
time_evp_fwd = ttt1-ttt0
ttt0 = MPI_Wtime()
- call solve_tridi(na, nev, ev, e, q_real, l_rows, nblk, mpi_comm_rows, mpi_comm_cols)
+ call solve_tridi_double(na, nev, ev, e, q_real, l_rows, nblk, matrixCols, mpi_comm_rows, &
+ mpi_comm_cols, wantDebug, success)
ttt1 = MPI_Wtime()
if(my_prow==0 .and. my_pcol==0 .and. elpa_print_times) print *,'Time solve_tridi :',ttt1-ttt0
time_evp_solve = ttt1-ttt0
@@ -81,7 +88,7 @@ subroutine solve_evp_complex(na, nev, a,
ttt0 = MPI_Wtime()
q(1:l_rows,1:l_cols_nev) = q_real(1:l_rows,1:l_cols_nev)
- call trans_ev_complex(na, nev, a, lda, tau, q, ldq, nblk, mpi_comm_rows, mpi_comm_cols)
+ call trans_ev_complex(na, nev, a, lda, tau, q, ldq, nblk, matrixCols, mpi_comm_rows, mpi_comm_cols, useGPU)
ttt1 = MPI_Wtime()
if(my_prow==0 .and. my_pcol==0 .and. elpa_print_times) print *,'Time trans_ev_complex:',ttt1-ttt0
time_evp_back = ttt1-ttt0
diff -up openmx3.8/source/solve_evp_real.f90.elpa openmx3.8/source/solve_evp_real.f90
--- openmx3.8/source/solve_evp_real.f90.elpa 2016-03-27 08:53:28.000000000 +0200
+++ openmx3.8/source/solve_evp_real.f90 2017-02-18 10:37:02.927268314 +0100
@@ -1,7 +1,7 @@
!-------------------------------------------------------------------------------
-subroutine solve_evp_real(na, nev, a, lda, ev, q, ldq, nblk, mpi_comm_rows, mpi_comm_cols)
+subroutine solve_evp_real(na, nev, a, lda, ev, q, ldq, nblk, matrixCols, mpi_comm_rows, mpi_comm_cols)
!-------------------------------------------------------------------------------
! solve_evp_real: Solves the real eigenvalue problem
@@ -37,15 +37,20 @@ subroutine solve_evp_real(na, nev, a, ld
!
!-------------------------------------------------------------------------------
- use ELPA1
+ use ELPA1, ignore_me => solve_evp_real
+ use ELPA1_COMPUTE
implicit none
include 'mpif.h'
- integer, intent(in) :: na, nev, lda, ldq, nblk, mpi_comm_rows, mpi_comm_cols
+ integer, intent(in) :: na, nev, lda, ldq, nblk, matrixCols, mpi_comm_rows, mpi_comm_cols
real*8 :: a(lda,*), ev(na), q(ldq,*)
+ logical :: success
+ logical :: wantDebug
+ logical :: useGPU = .false.
+
integer my_prow, my_pcol, mpierr, i,j
real*8, allocatable :: e(:), tau(:)
real*8 ttt0, ttt1,sum1,sum2
@@ -56,19 +61,20 @@ subroutine solve_evp_real(na, nev, a, ld
allocate(e(na), tau(na))
ttt0 = MPI_Wtime()
- call tridiag_real(na, a, lda, nblk, mpi_comm_rows, mpi_comm_cols, ev, e, tau)
+ call tridiag_real(na, a, lda, nblk, matrixCols, mpi_comm_rows, mpi_comm_cols, ev, e, tau, useGPU)
ttt1 = MPI_Wtime()
if(my_prow==0 .and. my_pcol==0 .and. elpa_print_times) print *,'Time tridiag_real :',ttt1-ttt0
time_evp_fwd = ttt1-ttt0
ttt0 = MPI_Wtime()
- call solve_tridi(na, nev, ev, e, q, ldq, nblk, mpi_comm_rows, mpi_comm_cols)
+ call solve_tridi_double(na, nev, ev, e, q, ldq, nblk, matrixCols, mpi_comm_rows, &
+ mpi_comm_cols, wantDebug, success)
ttt1 = MPI_Wtime()
if(my_prow==0 .and. my_pcol==0 .and. elpa_print_times) print *,'Time solve_tridi :',ttt1-ttt0
time_evp_solve = ttt1-ttt0
ttt0 = MPI_Wtime()
- call trans_ev_real(na, nev, a, lda, tau, q, ldq, nblk, mpi_comm_rows, mpi_comm_cols)
+ call trans_ev_real(na, nev, a, lda, tau, q, ldq, nblk, matrixCols, mpi_comm_rows, mpi_comm_cols, useGPU)
ttt1 = MPI_Wtime()
if(my_prow==0 .and. my_pcol==0 .and. elpa_print_times) print *,'Time trans_ev_real:',ttt1-ttt0
time_evp_back = ttt1-ttt0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment