Commit 2192c381 authored by Uliana Alekseeva's avatar Uliana Alekseeva

bugfix for ELPA2015

parent b21297b1
...@@ -327,7 +327,11 @@ CONTAINS ...@@ -327,7 +327,11 @@ CONTAINS
hmat%data_c(n_row+1:hmat%matsize1,i) = ev_dist%data_c(n_row+1:ev_dist%matsize1,i) hmat%data_c(n_row+1:hmat%matsize1,i) = ev_dist%data_c(n_row+1:ev_dist%matsize1,i)
ENDIF ENDIF
ENDDO ENDDO
!print*, "matrix bfore diag"
!open(unit = 99+myid,file="devel_matr_"//achar(myid+48))
! write(99+myid,*) hmat%data_c
!close(unit = 99+myid)
! 3. Calculate eigenvalues/eigenvectors of U**-T * A * U**-1 ! 3. Calculate eigenvalues/eigenvectors of U**-T * A * U**-1
! Eigenvectors go to eigvec ! Eigenvectors go to eigvec
...@@ -393,6 +397,13 @@ CONTAINS ...@@ -393,6 +397,13 @@ CONTAINS
#endif #endif
#endif #endif
!print*, "eigenvalues"
!open(unit = 99+myid,file="devel_eigVal_"//achar(myid+48))
!do i = 1, size(eig2)
! write(99+myid,*)i, eig2(i)
!enddo
!close(unit = 99+myid)
! 4. Backtransform eigenvectors: Z = U**-1 * eigvec ! 4. Backtransform eigenvectors: Z = U**-1 * eigvec
...@@ -415,29 +426,33 @@ CONTAINS ...@@ -415,29 +426,33 @@ CONTAINS
ENDIF ENDIF
#elif defined (CPP_ELPA_201605004) #elif defined (CPP_ELPA_201605004)
IF (hmat%l_real) THEN IF (hmat%l_real) THEN
ok=elpa_mult_at_b_real('U', 'U',smat%global_size1,smat%global_size1,smat%data_r,smat%matsize1,smat%matsize2,& ok=elpa_mult_at_b_real('L', 'N',hmat%global_size1,num2,tmp2_r,hmat%matsize1,hmat%matsize2,&
tmp2_r,SIZE(tmp2_r,1),SIZE(tmp2_r,2),nb,mpi_comm_rows, mpi_comm_cols,& ev_dist%data_r,ev_dist%matsize1,ev_dist%matsize2,nb,mpi_comm_rows, mpi_comm_cols,&
hmat%data_r,hmat%matsize1,hmat%matsize2) hmat%data_r,hmat%matsize1,hmat%matsize2)
ELSE ELSE
ok=mult_ah_b_complex('U', 'U',smat%global_size1,smat%global_size1,smat%data_c,smat%matsize1,smat%matsize2,& ok=mult_ah_b_complex('L', 'N',hmat%global_size1,num2,tmp2_c,hmat%matsize1,hmat%matsize2,&
tmp2_c,SIZE(tmp2_c,1),SIZE(tmp2_c,2),nb,mpi_comm_rows, mpi_comm_cols,& ev_dist%data_c,ev_dist%matsize1,ev_dist%matsize2,nb,mpi_comm_rows, mpi_comm_cols,&
hmat%data_c,hmat%matsize1,hmat%matsize2) hmat%data_c,hmat%matsize1,hmat%matsize2)
ENDIF ENDIF
#elif defined (CPP_ELPA_201605003) #elif defined (CPP_ELPA_201605003)
IF (hmat%l_real) THEN IF (hmat%l_real) THEN
ok=elpa_mult_at_b_real('U', 'U',smat%global_size1,smat%global_size1,smat%data_r,smat%matsize1,& ok=elpa_mult_at_b_real('L', 'N',hmat%global_size1,num2,tmp2_r,hmat%matsize1,&
tmp2_r,SIZE(tmp2_r,1),nb,mpi_comm_rows, mpi_comm_cols,hmat%data_r,hmat%matsize1) ev_dist%data_r,ev_dist%matsize1,nb,mpi_comm_rows, mpi_comm_cols,&
hmat%data_r,hmat%matsize1)
ELSE ELSE
ok=mult_ah_b_complex('U', 'U',smat%global_size1,smat%global_size1,smat%data_c,smat%matsize1,& ok=mult_ah_b_complex('L', 'N',hmat%global_size1,num2,tmp2_c,hmat%matsize1,&
tmp2_c,SIZE(tmp2_c,1),,nb,mpi_comm_rows, mpi_comm_cols,hmat%data_c,hmat%matsize1) ev_dist%data_c,ev_dist%matsize1,nb,mpi_comm_rows, mpi_comm_cols,&
hmat%data_c,hmat%matsize1)
ENDIF ENDIF
#else #else
IF (hmat%l_real) THEN IF (hmat%l_real) THEN
CALL mult_at_b_real('U', 'U',smat%global_size1,smat%global_size1,smat%data_r,smat%matsize1,& CALL mult_at_b_real('L', 'N',hmat%global_size1,num2,tmp2_r,hmat%matsize1,&
tmp2_r,SIZE(tmp2_r,1),nb,mpi_comm_rows, mpi_comm_cols,hmat%data_r,hmat%matsize1) ev_dist%data_r,ev_dist%matsize1,nb,mpi_comm_rows, mpi_comm_cols,&
hmat%data_r,hmat%matsize1)
ELSE ELSE
CALL mult_ah_b_complex('U', 'U',smat%global_size1,smat%global_size1,smat%data_c,smat%matsize1,& CALL mult_ah_b_complex('L', 'N',hmat%global_size1,num2,tmp2_c,hmat%matsize1,&
tmp2_c,SIZE(tmp2_c,1),nb,mpi_comm_rows, mpi_comm_cols,hmat%data_c,hmat%matsize1) ev_dist%data_c,ev_dist%matsize1,nb,mpi_comm_rows, mpi_comm_cols,&
hmat%data_c,hmat%matsize1)
ENDIF ENDIF
#endif #endif
...@@ -447,8 +462,8 @@ CONTAINS ...@@ -447,8 +462,8 @@ CONTAINS
#endif #endif
! END of ELPA stuff ! END of ELPA stuff
#if ( !defined (CPP_ELPA_201705003)) #if ( !defined (CPP_ELPA_201705003))
CALL MPI_COMM_FREE(mpi_comm_rows,ierr) CALL MPI_COMM_FREE(mpi_comm_rows,err)
CALL MPI_COMM_FREE(mpi_comm_cols,ierr) CALL MPI_COMM_FREE(mpi_comm_cols,err)
#endif #endif
! !
! Put those eigenvalues expected by chani to eig, i.e. for ! Put those eigenvalues expected by chani to eig, i.e. for
......
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