mirror of
https://github.com/QuantumPackage/qp2.git
synced 2024-12-22 03:23:29 +01:00
Small optimizations
This commit is contained in:
parent
6683245273
commit
7033d61850
@ -781,6 +781,7 @@ subroutine calculate_preconditioner_cfg(diag_energies)
|
|||||||
real*8 :: meCC
|
real*8 :: meCC
|
||||||
real*8 :: ecore
|
real*8 :: ecore
|
||||||
|
|
||||||
|
PROVIDE h_core_ri
|
||||||
! initialize energies
|
! initialize energies
|
||||||
diag_energies = 0.d0
|
diag_energies = 0.d0
|
||||||
|
|
||||||
@ -929,6 +930,8 @@ subroutine obtain_connected_I_foralpha_fromfilterdlist(idxI, nconnectedJ, idslis
|
|||||||
integer :: Nsomo_alpha
|
integer :: Nsomo_alpha
|
||||||
logical :: isOKlistJ
|
logical :: isOKlistJ
|
||||||
|
|
||||||
|
PROVIDE DetToCSFTransformationMatrix
|
||||||
|
|
||||||
isOKlistJ = .False.
|
isOKlistJ = .False.
|
||||||
|
|
||||||
nconnectedI = 0
|
nconnectedI = 0
|
||||||
@ -1441,7 +1444,6 @@ subroutine calculate_sigma_vector_cfg_nst_naive_store(psi_out, psi_in, n_st, sze
|
|||||||
cnti = ii-starti+1
|
cnti = ii-starti+1
|
||||||
do jj = startj, endj
|
do jj = startj, endj
|
||||||
cntj = jj-startj+1
|
cntj = jj-startj+1
|
||||||
!meCC1 = AIJpqContainer(NSOMOI,extype,pmodel,qmodel,cnti,cntj)
|
|
||||||
meCC1 = AIJpqContainer(cnti,cntj,pmodel,qmodel,extype,NSOMOI)* h_core_ri(p,q)
|
meCC1 = AIJpqContainer(cnti,cntj,pmodel,qmodel,extype,NSOMOI)* h_core_ri(p,q)
|
||||||
call omp_set_lock(lock(jj))
|
call omp_set_lock(lock(jj))
|
||||||
do kk = 1,n_st
|
do kk = 1,n_st
|
||||||
@ -1629,18 +1631,24 @@ subroutine calculate_sigma_vector_cfg_nst_naive_store(psi_out, psi_in, n_st, sze
|
|||||||
|
|
||||||
! Add the diagonal contribution
|
! Add the diagonal contribution
|
||||||
!$OMP DO
|
!$OMP DO
|
||||||
do kk=1,n_st
|
|
||||||
do i = 1,n_CSF
|
do i = 1,n_CSF
|
||||||
|
do kk=1,n_st
|
||||||
psi_out(kk,i) += diag_energies(i)*psi_in(kk,i)
|
psi_out(kk,i) += diag_energies(i)*psi_in(kk,i)
|
||||||
enddo
|
enddo
|
||||||
enddo
|
enddo
|
||||||
!$OMP END DO
|
!$OMP END DO
|
||||||
|
|
||||||
!$OMP end parallel
|
!$OMP END PARALLEL
|
||||||
|
call omp_set_max_active_levels(4)
|
||||||
|
|
||||||
|
deallocate(diag_energies)
|
||||||
|
deallocate(bit_tmp)
|
||||||
|
|
||||||
end subroutine calculate_sigma_vector_cfg_nst_naive_store
|
end subroutine calculate_sigma_vector_cfg_nst_naive_store
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
subroutine calculate_sigma_vector_cfg_nst(psi_out, psi_in, n_st, sze, istart, iend, ishift, istep)
|
subroutine calculate_sigma_vector_cfg_nst(psi_out, psi_in, n_st, sze, istart, iend, ishift, istep)
|
||||||
implicit none
|
implicit none
|
||||||
use bitmasks
|
use bitmasks
|
||||||
|
@ -266,10 +266,10 @@ subroutine davidson_diag_csf_hjj(dets_in,u_in,H_jj,energies,dim_in,sze,sze_csf,N
|
|||||||
|
|
||||||
do k=N_st+1,N_st_diag
|
do k=N_st+1,N_st_diag
|
||||||
do i=1,sze
|
do i=1,sze
|
||||||
!call random_number(r1)
|
call random_number(r1)
|
||||||
!call random_number(r2)
|
call random_number(r2)
|
||||||
r1 = 0.5
|
!r1 = 0.5
|
||||||
r2 = 0.5
|
!r2 = 0.5
|
||||||
r1 = dsqrt(-2.d0*dlog(r1))
|
r1 = dsqrt(-2.d0*dlog(r1))
|
||||||
r2 = dtwo_pi*r2
|
r2 = dtwo_pi*r2
|
||||||
u_in(i,k) = r1*dcos(r2) * u_in(i,k-N_st)
|
u_in(i,k) = r1*dcos(r2) * u_in(i,k-N_st)
|
||||||
|
Loading…
Reference in New Issue
Block a user