mirror of
https://github.com/QuantumPackage/qp2.git
synced 2024-12-22 03:23:29 +01:00
openmp version of state average dm work
This commit is contained in:
parent
cac0146fe9
commit
244831673d
@ -52,6 +52,7 @@
|
|||||||
! Therefore you don't necessayr have symmetry between electron 1 and 2
|
! Therefore you don't necessayr have symmetry between electron 1 and 2
|
||||||
END_DOC
|
END_DOC
|
||||||
integer :: ispin
|
integer :: ispin
|
||||||
|
double precision :: wall_1, wall_2
|
||||||
! condition for alpha/beta spin
|
! condition for alpha/beta spin
|
||||||
print*,''
|
print*,''
|
||||||
print*,''
|
print*,''
|
||||||
@ -60,8 +61,11 @@
|
|||||||
ispin = 3
|
ispin = 3
|
||||||
print*,'ispin = ',ispin
|
print*,'ispin = ',ispin
|
||||||
all_states_act_two_rdm_alpha_beta_mo = 0.d0
|
all_states_act_two_rdm_alpha_beta_mo = 0.d0
|
||||||
|
call wall_time(wall_1)
|
||||||
call orb_range_all_states_two_rdm(all_states_act_two_rdm_alpha_beta_mo,n_act_orb,n_act_orb,list_act,list_act_reverse,ispin,psi_coef,size(psi_coef,2),size(psi_coef,1))
|
call orb_range_all_states_two_rdm(all_states_act_two_rdm_alpha_beta_mo,n_act_orb,n_act_orb,list_act,list_act_reverse,ispin,psi_coef,size(psi_coef,2),size(psi_coef,1))
|
||||||
|
|
||||||
|
call wall_time(wall_2)
|
||||||
|
print*,'Wall time to provide all_states_act_two_rdm_alpha_beta_mo',wall_2 - wall_1
|
||||||
END_PROVIDER
|
END_PROVIDER
|
||||||
|
|
||||||
|
|
||||||
|
@ -12,7 +12,11 @@
|
|||||||
! condition for alpha/beta spin
|
! condition for alpha/beta spin
|
||||||
ispin = 1
|
ispin = 1
|
||||||
state_av_act_two_rdm_openmp_alpha_alpha_mo = 0.D0
|
state_av_act_two_rdm_openmp_alpha_alpha_mo = 0.D0
|
||||||
|
call wall_time(wall_1)
|
||||||
|
double precision :: wall_1, wall_2
|
||||||
call orb_range_two_rdm_state_av_openmp(state_av_act_two_rdm_openmp_alpha_alpha_mo,n_act_orb,n_act_orb,list_act,state_weights,ispin,psi_coef,size(psi_coef,2),size(psi_coef,1))
|
call orb_range_two_rdm_state_av_openmp(state_av_act_two_rdm_openmp_alpha_alpha_mo,n_act_orb,n_act_orb,list_act,state_weights,ispin,psi_coef,size(psi_coef,2),size(psi_coef,1))
|
||||||
|
call wall_time(wall_2)
|
||||||
|
print*,'Wall time to provide state_av_act_two_rdm_openmp_alpha_alpha_mo',wall_2 - wall_1
|
||||||
|
|
||||||
END_PROVIDER
|
END_PROVIDER
|
||||||
|
|
||||||
@ -29,7 +33,11 @@
|
|||||||
! condition for alpha/beta spin
|
! condition for alpha/beta spin
|
||||||
ispin = 2
|
ispin = 2
|
||||||
state_av_act_two_rdm_openmp_beta_beta_mo = 0.d0
|
state_av_act_two_rdm_openmp_beta_beta_mo = 0.d0
|
||||||
|
call wall_time(wall_1)
|
||||||
|
double precision :: wall_1, wall_2
|
||||||
call orb_range_two_rdm_state_av_openmp(state_av_act_two_rdm_openmp_beta_beta_mo,n_act_orb,n_act_orb,list_act,state_weights,ispin,psi_coef,size(psi_coef,2),size(psi_coef,1))
|
call orb_range_two_rdm_state_av_openmp(state_av_act_two_rdm_openmp_beta_beta_mo,n_act_orb,n_act_orb,list_act,state_weights,ispin,psi_coef,size(psi_coef,2),size(psi_coef,1))
|
||||||
|
call wall_time(wall_2)
|
||||||
|
print*,'Wall time to provide state_av_act_two_rdm_openmp_beta_beta_mo',wall_2 - wall_1
|
||||||
|
|
||||||
END_PROVIDER
|
END_PROVIDER
|
||||||
|
|
||||||
@ -51,7 +59,11 @@
|
|||||||
ispin = 3
|
ispin = 3
|
||||||
print*,'ispin = ',ispin
|
print*,'ispin = ',ispin
|
||||||
state_av_act_two_rdm_openmp_alpha_beta_mo = 0.d0
|
state_av_act_two_rdm_openmp_alpha_beta_mo = 0.d0
|
||||||
|
call wall_time(wall_1)
|
||||||
|
double precision :: wall_1, wall_2
|
||||||
call orb_range_two_rdm_state_av_openmp(state_av_act_two_rdm_openmp_alpha_beta_mo,n_act_orb,n_act_orb,list_act,state_weights,ispin,psi_coef,size(psi_coef,2),size(psi_coef,1))
|
call orb_range_two_rdm_state_av_openmp(state_av_act_two_rdm_openmp_alpha_beta_mo,n_act_orb,n_act_orb,list_act,state_weights,ispin,psi_coef,size(psi_coef,2),size(psi_coef,1))
|
||||||
|
call wall_time(wall_2)
|
||||||
|
print*,'Wall time to provide state_av_act_two_rdm_openmp_alpha_beta_mo',wall_2 - wall_1
|
||||||
|
|
||||||
END_PROVIDER
|
END_PROVIDER
|
||||||
|
|
||||||
@ -74,12 +86,12 @@
|
|||||||
ispin = 4
|
ispin = 4
|
||||||
state_av_act_two_rdm_openmp_spin_trace_mo = 0.d0
|
state_av_act_two_rdm_openmp_spin_trace_mo = 0.d0
|
||||||
integer :: i
|
integer :: i
|
||||||
double precision :: wall_0,wall_1
|
call wall_time(wall_1)
|
||||||
call wall_time(wall_0)
|
double precision :: wall_1, wall_2
|
||||||
print*,'providing the state average TWO-RDM ...'
|
print*,'providing state_av_act_two_rdm_openmp_spin_trace_mo '
|
||||||
call orb_range_two_rdm_state_av_openmp(state_av_act_two_rdm_openmp_spin_trace_mo,n_act_orb,n_act_orb,list_act,state_weights,ispin,psi_coef,size(psi_coef,2),size(psi_coef,1))
|
call orb_range_two_rdm_state_av_openmp(state_av_act_two_rdm_openmp_spin_trace_mo,n_act_orb,n_act_orb,list_act,state_weights,ispin,psi_coef,size(psi_coef,2),size(psi_coef,1))
|
||||||
|
|
||||||
call wall_time(wall_1)
|
call wall_time(wall_2)
|
||||||
print*,'Time to provide the state average TWO-RDM',wall_1 - wall_0
|
print*,'Time to provide state_av_act_two_rdm_openmp_spin_trace_mo',wall_2 - wall_1
|
||||||
END_PROVIDER
|
END_PROVIDER
|
||||||
|
|
||||||
|
@ -19,9 +19,11 @@ subroutine routine_active_only
|
|||||||
double precision :: accu_ab_omp,rdmab_omp
|
double precision :: accu_ab_omp,rdmab_omp
|
||||||
double precision :: accu_bb_omp,rdmbb_omp
|
double precision :: accu_bb_omp,rdmbb_omp
|
||||||
double precision :: accu_aa_omp,rdmaa_omp
|
double precision :: accu_aa_omp,rdmaa_omp
|
||||||
|
double precision :: accu_tot_omp,rdmtot_omp
|
||||||
accu_ab_omp = 0.d0
|
accu_ab_omp = 0.d0
|
||||||
accu_bb_omp = 0.d0
|
accu_bb_omp = 0.d0
|
||||||
accu_aa_omp = 0.d0
|
accu_aa_omp = 0.d0
|
||||||
|
accu_tot_omp = 0.d0
|
||||||
accu_aa = 0.d0
|
accu_aa = 0.d0
|
||||||
accu_ab = 0.d0
|
accu_ab = 0.d0
|
||||||
accu_bb = 0.d0
|
accu_bb = 0.d0
|
||||||
@ -43,6 +45,8 @@ subroutine routine_active_only
|
|||||||
rdmab_omp = state_av_act_two_rdm_openmp_alpha_beta_mo(l,k,j,i)
|
rdmab_omp = state_av_act_two_rdm_openmp_alpha_beta_mo(l,k,j,i)
|
||||||
rdmbb_omp = state_av_act_two_rdm_openmp_beta_beta_mo(l,k,j,i)
|
rdmbb_omp = state_av_act_two_rdm_openmp_beta_beta_mo(l,k,j,i)
|
||||||
rdmaa_omp = state_av_act_two_rdm_openmp_alpha_alpha_mo(l,k,j,i)
|
rdmaa_omp = state_av_act_two_rdm_openmp_alpha_alpha_mo(l,k,j,i)
|
||||||
|
rdmtot_omp = state_av_act_two_rdm_openmp_spin_trace_mo(l,k,j,i)
|
||||||
|
|
||||||
rdmaa = all_states_act_two_rdm_alpha_alpha_mo(l,k,j,i,istate)
|
rdmaa = all_states_act_two_rdm_alpha_alpha_mo(l,k,j,i,istate)
|
||||||
rdmbb = all_states_act_two_rdm_beta_beta_mo(l,k,j,i,istate)
|
rdmbb = all_states_act_two_rdm_beta_beta_mo(l,k,j,i,istate)
|
||||||
rdmab = all_states_act_two_rdm_alpha_beta_mo(l,k,j,i,istate)
|
rdmab = all_states_act_two_rdm_alpha_beta_mo(l,k,j,i,istate)
|
||||||
@ -51,6 +55,8 @@ subroutine routine_active_only
|
|||||||
accu_ab_omp += vijkl * rdmab_omp
|
accu_ab_omp += vijkl * rdmab_omp
|
||||||
accu_bb_omp += vijkl * rdmbb_omp
|
accu_bb_omp += vijkl * rdmbb_omp
|
||||||
accu_aa_omp += vijkl * rdmaa_omp
|
accu_aa_omp += vijkl * rdmaa_omp
|
||||||
|
accu_tot_omp += vijkl * rdmtot_omp
|
||||||
|
|
||||||
accu_ab(istate) += vijkl * rdmab
|
accu_ab(istate) += vijkl * rdmab
|
||||||
accu_aa(istate) += vijkl * rdmaa
|
accu_aa(istate) += vijkl * rdmaa
|
||||||
accu_bb(istate) += vijkl * rdmbb
|
accu_bb(istate) += vijkl * rdmbb
|
||||||
@ -70,6 +76,7 @@ subroutine routine_active_only
|
|||||||
print*,''
|
print*,''
|
||||||
print*,'sum (istate) = ',accu_aa(istate) + accu_bb(istate) + accu_ab(istate)
|
print*,'sum (istate) = ',accu_aa(istate) + accu_bb(istate) + accu_ab(istate)
|
||||||
print*,'accu_tot(istate) = ',accu_tot(istate)
|
print*,'accu_tot(istate) = ',accu_tot(istate)
|
||||||
|
print*,'accu_tot_omp = ',accu_tot_omp
|
||||||
print*,'psi_energy_two_e(istate) = ',psi_energy_two_e(istate)
|
print*,'psi_energy_two_e(istate) = ',psi_energy_two_e(istate)
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user