10
0
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-12-23 21:03:49 +01:00

fixed problem in davidson

previously got errors when compiling with -O2 and avx
seems to be fixed after removing check for dressing state
This commit is contained in:
Kevin Gasperich 2020-05-13 10:52:57 -05:00
parent 11ad53d1b0
commit 655af00b9c

View File

@ -1112,61 +1112,61 @@ subroutine davidson_diag_hjj_sjj_complex(dets_in,u_in,H_jj,s2_out,energies,dim_i
continue continue
endif endif
if (dressing_state > 0) then ! if (dressing_state > 0) then
!todo: implement for complex ! !todo: implement for complex
print*,irp_here,' not implemented for complex (dressed)' ! print*,irp_here,' not implemented for complex (dressed)'
stop -1 ! stop -1
! !!
! if (N_st == 1) then !! if (N_st == 1) then
! !!
! l = dressed_column_idx(1) !! l = dressed_column_idx(1)
! complex*16 :: f !! complex*16 :: f
! !todo: check for complex !! !todo: check for complex
! f = (1.0d0,0.d0)/psi_coef(l,1) !! f = (1.0d0,0.d0)/psi_coef(l,1)
! do istate=1,N_st_diag !! do istate=1,N_st_diag
! do i=1,sze !! do i=1,sze
! !todo: conjugate? !! !todo: conjugate?
! W(i,shift+istate) += dressing_column_h_complex(i,1) *f * U(l,shift+istate) !! W(i,shift+istate) += dressing_column_h_complex(i,1) *f * U(l,shift+istate)
! W(l,shift+istate) += dressing_column_h_complex(i,1) *f * U(i,shift+istate) !! W(l,shift+istate) += dressing_column_h_complex(i,1) *f * U(i,shift+istate)
! S(i,shift+istate) += cmplx(dressing_column_s_complex(i,1) *f * U(l,shift+istate)) !! S(i,shift+istate) += cmplx(dressing_column_s_complex(i,1) *f * U(l,shift+istate))
! S(l,shift+istate) += cmplx(dressing_column_s_complex(i,1) *f * U(i,shift+istate)) !! S(l,shift+istate) += cmplx(dressing_column_s_complex(i,1) *f * U(i,shift+istate))
! enddo !! enddo
! !!
! enddo !! enddo
! !!
! else !! else
! !!
! call dgemm('T','N', N_st, N_st_diag, sze, 1.d0, & !! call dgemm('T','N', N_st, N_st_diag, sze, 1.d0, &
! psi_coef, size(psi_coef,1), & !! psi_coef, size(psi_coef,1), &
! U(1,shift+1), size(U,1), 0.d0, s_tmp, size(s_tmp,1)) !! U(1,shift+1), size(U,1), 0.d0, s_tmp, size(s_tmp,1))
! !!
! call dgemm('N','N', sze, N_st_diag, N_st, 1.0d0, & !! call dgemm('N','N', sze, N_st_diag, N_st, 1.0d0, &
! dressing_column_h, size(dressing_column_h,1), s_tmp, size(s_tmp,1), & !! dressing_column_h, size(dressing_column_h,1), s_tmp, size(s_tmp,1), &
! 1.d0, W(1,shift+1), size(W,1)) !! 1.d0, W(1,shift+1), size(W,1))
! !!
! call dgemm('N','N', sze, N_st_diag, N_st, 1.0d0, & !! call dgemm('N','N', sze, N_st_diag, N_st, 1.0d0, &
! dressing_column_s, size(dressing_column_s,1), s_tmp, size(s_tmp,1), & !! dressing_column_s, size(dressing_column_s,1), s_tmp, size(s_tmp,1), &
! 1.d0, S_d, size(S_d,1)) !! 1.d0, S_d, size(S_d,1))
! !!
! !!
! call dgemm('T','N', N_st, N_st_diag, sze, 1.d0, & !! call dgemm('T','N', N_st, N_st_diag, sze, 1.d0, &
! dressing_column_h, size(dressing_column_h,1), & !! dressing_column_h, size(dressing_column_h,1), &
! U(1,shift+1), size(U,1), 0.d0, s_tmp, size(s_tmp,1)) !! U(1,shift+1), size(U,1), 0.d0, s_tmp, size(s_tmp,1))
! !!
! call dgemm('N','N', sze, N_st_diag, N_st, 1.0d0, & !! call dgemm('N','N', sze, N_st_diag, N_st, 1.0d0, &
! psi_coef, size(psi_coef,1), s_tmp, size(s_tmp,1), & !! psi_coef, size(psi_coef,1), s_tmp, size(s_tmp,1), &
! 1.d0, W(1,shift+1), size(W,1)) !! 1.d0, W(1,shift+1), size(W,1))
! !!
! call dgemm('T','N', N_st, N_st_diag, sze, 1.d0, & !! call dgemm('T','N', N_st, N_st_diag, sze, 1.d0, &
! dressing_column_s, size(dressing_column_s,1), & !! dressing_column_s, size(dressing_column_s,1), &
! U(1,shift+1), size(U,1), 0.d0, s_tmp, size(s_tmp,1)) !! U(1,shift+1), size(U,1), 0.d0, s_tmp, size(s_tmp,1))
! !!
! call dgemm('N','N', sze, N_st_diag, N_st, 1.0d0, & !! call dgemm('N','N', sze, N_st_diag, N_st, 1.0d0, &
! psi_coef, size(psi_coef,1), s_tmp, size(s_tmp,1), & !! psi_coef, size(psi_coef,1), s_tmp, size(s_tmp,1), &
! 1.d0, S_d, size(S_d,1)) !! 1.d0, S_d, size(S_d,1))
! !!
!! endif
! endif ! endif
endif
! Compute s_kl = <u_k | S_l> = <u_k| S2 |u_l> ! Compute s_kl = <u_k | S_l> = <u_k| S2 |u_l>
! ------------------------------------------- ! -------------------------------------------