10
0
mirror of https://github.com/LCPQ/quantum_package synced 2024-09-27 03:51:01 +02:00

Merge pull request #52 from scemama/master

merge
This commit is contained in:
Emmanuel Giner 2019-01-09 15:34:21 +01:00 committed by GitHub
commit 119150710e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 80 additions and 52 deletions

View File

@ -3,8 +3,7 @@
export IRPF90=${QP_ROOT}/bin/irpf90
# Load irpman shell completion
(
irpman=$(tail -1 "${QP_ROOT}/bin/irpman" | cut --delimiter " " --field=2)
source $(dirname ${irpman})/../irpman-completions.bash
)
irpman=$(tail -1 "${QP_ROOT}/bin/irpman" | cut --delimiter " " --field=2)
source $(dirname ${irpman})/../irpman-completions.bash

View File

@ -3,12 +3,18 @@
# Maximum allowed memory per node
# export QP_MAXMEM=64
# Target number of threads for Davidson's algorithm
# Target number of threads for Davidson's algorithm (Hyperthreading is useful)
# export QP_NTHREADS_DAVIDSON=32
# Target number of threads for the computation of the PT2
# Target number of threads for the computation of the PT2 (Hyperthreading is useful)
# export QP_NTHREADS_PT2=32
# Number of threads for MKL
# exort MKL_NUM_THREADS=16
# Number of threads for OpenMP
# exort OMP_NUM_THREADS=16
# Name of the network interface to be chosen
# export QP_NIC=ib0

View File

@ -4,7 +4,7 @@ if [[ -z $QP_PYTHON ]]
then
# Load dependencies
for i in ezfio.rc irpf90.rc network.rc ninja.rc ocaml.rc
for i in ezfio.rc irpf90.rc ninja.rc ocaml.rc
do
source $i
done

View File

@ -45,7 +45,11 @@ function qp()
shift
[[ -n $EZFIO_FILE ]] && ezfio unset_file
NAME=$(qp_create_ezfio_from_xyz $@)
ezfio set_file $NAME
if [[ -d $NAME ]] ; then
ezfio set_file $NAME
else
echo $NAME | more
fi
;;
"set_mo_class")

View File

@ -136,7 +136,8 @@ subroutine ZMQ_pt2(E, pt2,relative_error, error, variance, norm, N_in)
state_average_weight(pt2_stoch_istate) = 1.d0
TOUCH state_average_weight pt2_stoch_istate
provide nproc pt2_F mo_two_e_integrals_in_map mo_one_e_integrals pt2_w psi_selectors
PROVIDE nproc pt2_F mo_two_e_integrals_in_map mo_one_e_integrals pt2_w
PROVIDE psi_selectors pt2_u pt2_J pt2_R
call new_parallel_job(zmq_to_qp_run_socket, zmq_socket_pull, 'pt2')
integer, external :: zmq_put_psi
@ -239,6 +240,12 @@ subroutine ZMQ_pt2(E, pt2,relative_error, error, variance, norm, N_in)
+ 1.d0*pt2_n_tasks_max & ! i_generator, subset
+ 2.d0*(N_int*2.d0*N_in + N_in) & ! selection buffers
+ 1.d0*(N_int*2.d0*N_in + N_in) & ! sort/merge selection buffers
+ 1.d0*(N_int*2.d0*N_det) & ! preinteresting_det
+ 2.0d0*(N_det+1) & ! preinteresting, interesting,
! prefullinteresting, fullinteresting
+ 1.0d0*(N_int*2*N_det_selectors) & ! minilist
+ 1.0d0*(N_int*2*N_det) & ! fullminilist
+ 1.0d0*(N_states*mo_num*mo_num) & ! mat
) / 1024.d0**3
if (nproc_target == 0) then

View File

@ -137,6 +137,11 @@ subroutine H_S2_u_0_nstates_openmp_work_$N_int(v_t,s_t,u_t,N_st,sze,istart,iend,
integer, allocatable :: idx(:), idx0(:)
integer :: maxab, n_singles_a, n_singles_b, kcol_prev
integer*8 :: k8
logical :: compute_singles
!TODO
compute_singles = .True.
maxab = max(N_det_alpha_unique, N_det_beta_unique)+1
allocate(idx0(maxab))
@ -161,7 +166,7 @@ subroutine H_S2_u_0_nstates_openmp_work_$N_int(v_t,s_t,u_t,N_st,sze,istart,iend,
!$OMP psi_bilinear_matrix_columns_loc, &
!$OMP psi_bilinear_matrix_transp_rows_loc, &
!$OMP istart, iend, istep, irp_here, v_t, s_t, &
!$OMP ishift, idx0, u_t, maxab) &
!$OMP ishift, idx0, u_t, maxab, save_singles) &
!$OMP PRIVATE(krow, kcol, tmp_det, spindet, k_a, k_b, i, &
!$OMP lcol, lrow, l_a, l_b, &
!$OMP buffer, doubles, n_doubles, &
@ -196,11 +201,13 @@ subroutine H_S2_u_0_nstates_openmp_work_$N_int(v_t,s_t,u_t,N_st,sze,istart,iend,
tmp_det(1:$N_int,1) = psi_det_alpha_unique(1:$N_int, krow)
if (kcol /= kcol_prev) then
tmp_det(1:$N_int,2) = psi_det_beta_unique (1:$N_int, kcol)
call get_all_spin_singles_$N_int( &
psi_det_beta_unique, idx0, &
tmp_det(1,2), N_det_beta_unique, &
singles_b, n_singles_b)
if (compute_singles) then
tmp_det(1:$N_int,2) = psi_det_beta_unique (1:$N_int, kcol)
call get_all_spin_singles_$N_int( &
psi_det_beta_unique, idx0, &
tmp_det(1,2), N_det_beta_unique, &
singles_b, n_singles_b)
endif
endif
kcol_prev = kcol
@ -215,21 +222,23 @@ subroutine H_S2_u_0_nstates_openmp_work_$N_int(v_t,s_t,u_t,N_st,sze,istart,iend,
l_a = psi_bilinear_matrix_columns_loc(lcol)
ASSERT (l_a <= N_det)
do j=1,psi_bilinear_matrix_columns_loc(lcol+1) - psi_bilinear_matrix_columns_loc(lcol)
lrow = psi_bilinear_matrix_rows(l_a)
ASSERT (lrow <= N_det_alpha_unique)
if (compute_singles) then
do j=1,psi_bilinear_matrix_columns_loc(lcol+1) - psi_bilinear_matrix_columns_loc(lcol)
lrow = psi_bilinear_matrix_rows(l_a)
ASSERT (lrow <= N_det_alpha_unique)
buffer(1:$N_int,j) = psi_det_alpha_unique(1:$N_int, lrow) ! hot spot
buffer(1:$N_int,j) = psi_det_alpha_unique(1:$N_int, lrow) ! hot spot
ASSERT (l_a <= N_det)
idx(j) = l_a
l_a = l_a+1
enddo
j = j-1
ASSERT (l_a <= N_det)
idx(j) = l_a
l_a = l_a+1
enddo
j = j-1
call get_all_spin_singles_$N_int( &
buffer, idx, tmp_det(1,1), j, &
singles_a, n_singles_a )
call get_all_spin_singles_$N_int( &
buffer, idx, tmp_det(1,1), j, &
singles_a, n_singles_a )
endif
! Loop over alpha singles
! -----------------------

View File

@ -129,6 +129,8 @@ BEGIN_TEMPLATE
enddo
N_det_$alpha_unique = j
call write_int(6,N_det_$alpha_unique,'Number of unique $alpha determinants')
deallocate (iorder, bit_tmp, duplicate)
END_PROVIDER
@ -1002,14 +1004,15 @@ subroutine get_all_spin_singles_1(buffer, idx, spindet, size_buffer, singles, n_
integer, intent(out) :: singles(size_buffer)
integer, intent(out) :: n_singles
integer :: i
integer(bit_kind) :: v
integer :: degree
include 'utils/constants.include.F'
n_singles = 1
do i=1,size_buffer
degree = popcnt(xor( spindet, buffer(i) ))
singles(n_singles) = idx(i)
if (degree == 2) then
singles(n_singles) = idx(i)
n_singles = n_singles+1
endif
enddo

View File

@ -12,7 +12,7 @@ function run() {
ezfio set davidson threshold_davidson 1.e-10
ezfio set davidson n_states_diag 8
qp_run fci $1
energy1="$(ezfio get fci energy_pt2 | tr '[]' ' ' | cut -d ',' -f 1)"
energy1="$(ezfio get fci energy | tr '[]' ' ' | cut -d ',' -f 1)"
eq $energy1 $2 $thresh
}
@ -21,120 +21,120 @@ function run() {
@test "NH3" { # 10.6657s
qp_set_mo_class nh3.ezfio -core "[1-4]" -act "[5-72]"
run nh3.ezfio -56.2447484821590 1.e-8
run nh3.ezfio -56.2447484821590 1.e-5
}
@test "DHNO" { # 11.4721s
qp_set_mo_class dhno.ezfio -core "[1-7]" -act "[8-64]"
run dhno.ezfio -130.459030395165 1.e-8
run dhno.ezfio -130.45902272485 1.e-5
}
@test "HCO" { # 12.2868s
run hco.ezfio -113.311549734862 1.444e-05
run hco.ezfio -113.297580169167 1.444e-05
}
@test "H2O2" { # 12.9214s
qp_set_mo_class h2o2.ezfio -core "[1-2]" -act "[3-24]" -del "[25-38]"
run h2o2.ezfio -151.024844964871 0.00011948
run h2o2.ezfio -151.004593814816 0.00011948
}
@test "HBO" { # 13.3144s
run hbo.ezfio -100.221374036381 1.36e-05
run hbo.ezfio -100.213113590746 1.36e-05
}
@test "H2O" { # 11.3727s
run h2o.ezfio -76.2412334158826 1.988e-05
run h2o.ezfio -76.2358876720796 1.988e-05
}
@test "ClO" { # 13.3755s
run clo.ezfio -534.572693465448 0.00019344
run clo.ezfio -534.545851735243 0.00019344
}
@test "SO" { # 13.4952s
run so.ezfio -26.0465405831268 0.00014494
run so.ezfio -26.0118045926651 0.00014494
}
@test "H2S" { # 13.6745s
[[ -n $TRAVIS ]] && skip
run h2s.ezfio -398.865096897874 8.46e-06
run h2s.ezfio -398.859198067009 8.46e-06
}
@test "OH" { # 13.865s
[[ -n $TRAVIS ]] && skip
run oh.ezfio -75.6188293682445 1.744e-05
run oh.ezfio -75.6120973654659 1.744e-05
}
@test "SiH2_3B1" { # 13.938ss
[[ -n $TRAVIS ]] && skip
run sih2_3b1.ezfio -290.017547995946 1.e-8
run sih2_3b1.ezfio -290.017547995946 1.e-5
}
@test "H3COH" { # 14.7299s
[[ -n $TRAVIS ]] && skip
run h3coh.ezfio -115.223624478701 0.00018132
run h3coh.ezfio -115.200348295051 0.00018132
}
@test "SiH3" { # 15.99s
[[ -n $TRAVIS ]] && skip
run sih3.ezfio -5.57759237300615 1.116e-05
run sih3.ezfio -5.57259338826877 1.116e-05
}
@test "CH4" { # 16.1612s
[[ -n $TRAVIS ]] && skip
qp_set_mo_class ch4.ezfio -core "[1]" -act "[2-30]" -del "[31-59]"
run ch4.ezfio -40.2418916955354 3.02e-06
run ch4.ezfio -40.2410273920655 3.02e-06
}
@test "ClF" { # 16.8864s
[[ -n $TRAVIS ]] && skip
run clf.ezfio -559.19410640102 0.00021062
run clf.ezfio -559.171627972338 0.00021062
}
@test "SO2" { # 17.5645s
[[ -n $TRAVIS ]] && skip
qp_set_mo_class so2.ezfio -core "[1-8]" -act "[9-87]"
run so2.ezfio -41.5746738710646 1.e-8
run so2.ezfio -41.5746738710646 1.e-5
}
@test "C2H2" { # 17.6827s
[[ -n $TRAVIS ]] && skip
qp_set_mo_class c2h2.ezfio -act "[1-30]" -del "[31-36]"
run c2h2.ezfio -12.3844530031717 9.402e-05
run c2h2.ezfio -12.3681909988587 9.402e-05
}
@test "N2" { # 18.0198s
[[ -n $TRAVIS ]] && skip
qp_set_mo_class n2.ezfio -core "[1,2]" -act "[3-40]" -del "[41-60]"
run n2.ezfio -109.312048711981 0.00010052
run n2.ezfio -109.291407960731 0.00010052
}
@test "N2H4" { # 18.5006s
[[ -n $TRAVIS ]] && skip
qp_set_mo_class n2h4.ezfio -core "[1-2]" -act "[3-24]" -del "[25-48]"
run n2h4.ezfio -111.382145310854 0.00010255
run n2h4.ezfio -111.367266319251 0.00010255
}
@test "CO2" { # 21.1748s
[[ -n $TRAVIS ]] && skip
qp_set_mo_class co2.ezfio -core "[1,2]" -act "[3-30]" -del "[31-42]"
run co2.ezfio -188.002445507874 0.00028902
run co2.ezfio -187.968251806361 0.00028902
}
@test "F2" { # 21.331s
[[ -n $TRAVIS ]] && skip
qp_set_mo_class f2.ezfio -core "[1,2]" -act "[3-30]" -del "[31-62]"
run f2.ezfio -199.084484583825 0.00014534
run f2.ezfio -199.068698950474 0.00014534
}
@test "[Cu(NH3)4]2+" { # 25.0417s
[[ -n $TRAVIS ]] && skip
qp_set_mo_class cu_nh3_4_2plus.ezfio -core "[1-24]" -act "[25-45]" -del "[46-87]"
run cu_nh3_4_2plus.ezfio -1862.98649500346 5.e-07
run cu_nh3_4_2plus.ezfio -1862.98632761077 5.e-07
}
@test "HCN" { # 20.3273s
[[ -n $TRAVIS ]] && skip
qp_set_mo_class hcn.ezfio -core "[1,2]" -act "[3-40]" -del "[41-55]"
run hcn.ezfio -93.0959693071658 0.00016522
run hcn.ezfio -93.0774580352237 0.00016522
}