mirror of
https://github.com/QuantumPackage/qp2.git
synced 2024-12-22 03:23:29 +01:00
Merge pull request #71 from QuantumPackage/bugfix
Fixed selection weight on slaves
This commit is contained in:
commit
98857368ee
7
configure
vendored
7
configure
vendored
@ -3,9 +3,6 @@
|
|||||||
# Quantum Package configuration script
|
# Quantum Package configuration script
|
||||||
#
|
#
|
||||||
|
|
||||||
unset CC
|
|
||||||
unset CXX
|
|
||||||
|
|
||||||
TEMP=$(getopt -o c:i:h -l config:,install:,help -n $0 -- "$@") || exit 1
|
TEMP=$(getopt -o c:i:h -l config:,install:,help -n $0 -- "$@") || exit 1
|
||||||
eval set -- "$TEMP"
|
eval set -- "$TEMP"
|
||||||
|
|
||||||
@ -14,6 +11,10 @@ echo "QP_ROOT="$QP_ROOT
|
|||||||
unset CC
|
unset CC
|
||||||
unset CCXX
|
unset CCXX
|
||||||
|
|
||||||
|
# Force GCC instead of ICC for dependencies
|
||||||
|
export CC=gcc
|
||||||
|
|
||||||
|
|
||||||
# When updating version, update also etc files
|
# When updating version, update also etc files
|
||||||
|
|
||||||
BATS_URL="https://github.com/bats-core/bats-core/archive/v1.1.0.tar.gz"
|
BATS_URL="https://github.com/bats-core/bats-core/archive/v1.1.0.tar.gz"
|
||||||
|
@ -77,6 +77,7 @@ logical function testTeethBuilding(minF, N)
|
|||||||
tilde_cW(i) = tilde_cW(i-1) + tilde_w(i)
|
tilde_cW(i) = tilde_cW(i-1) + tilde_w(i)
|
||||||
enddo
|
enddo
|
||||||
tilde_cW(:) = tilde_cW(:) + 1.d0
|
tilde_cW(:) = tilde_cW(:) + 1.d0
|
||||||
|
deallocate(tilde_w)
|
||||||
|
|
||||||
n0 = 0
|
n0 = 0
|
||||||
testTeethBuilding = .false.
|
testTeethBuilding = .false.
|
||||||
@ -89,19 +90,19 @@ logical function testTeethBuilding(minF, N)
|
|||||||
r = tilde_cW(n0 + minF)
|
r = tilde_cW(n0 + minF)
|
||||||
Wt = (1d0 - u0) * f
|
Wt = (1d0 - u0) * f
|
||||||
if (dabs(Wt) <= 1.d-3) then
|
if (dabs(Wt) <= 1.d-3) then
|
||||||
return
|
exit
|
||||||
endif
|
endif
|
||||||
if(Wt >= r - u0) then
|
if(Wt >= r - u0) then
|
||||||
testTeethBuilding = .true.
|
testTeethBuilding = .true.
|
||||||
return
|
exit
|
||||||
end if
|
end if
|
||||||
n0 += 1
|
n0 += 1
|
||||||
! if(N_det_generators - n0 < minF * N) then
|
|
||||||
if(n0 > minFN) then
|
if(n0 > minFN) then
|
||||||
return
|
exit
|
||||||
end if
|
end if
|
||||||
end do
|
end do
|
||||||
stop "exited testTeethBuilding"
|
deallocate(tilde_cW)
|
||||||
|
|
||||||
end function
|
end function
|
||||||
|
|
||||||
|
|
||||||
@ -768,7 +769,7 @@ END_PROVIDER
|
|||||||
tilde_cW(i) = tilde_cW(i-1) + tilde_w(i)
|
tilde_cW(i) = tilde_cW(i-1) + tilde_w(i)
|
||||||
enddo
|
enddo
|
||||||
tilde_cW(:) = tilde_cW(:) + 1.d0
|
tilde_cW(:) = tilde_cW(:) + 1.d0
|
||||||
|
|
||||||
pt2_n_0(1) = 0
|
pt2_n_0(1) = 0
|
||||||
do
|
do
|
||||||
pt2_u_0 = tilde_cW(pt2_n_0(1))
|
pt2_u_0 = tilde_cW(pt2_n_0(1))
|
||||||
|
@ -346,6 +346,7 @@ subroutine select_singles_and_doubles(i_generator,hole_mask,particle_mask,fock_d
|
|||||||
call isort(indices,iorder,nmax)
|
call isort(indices,iorder,nmax)
|
||||||
deallocate(iorder)
|
deallocate(iorder)
|
||||||
|
|
||||||
|
! Start with 32 elements. Size will double along with the filtering.
|
||||||
allocate(preinteresting(0:32), prefullinteresting(0:32), &
|
allocate(preinteresting(0:32), prefullinteresting(0:32), &
|
||||||
interesting(0:32), fullinteresting(0:32))
|
interesting(0:32), fullinteresting(0:32))
|
||||||
preinteresting(:) = 0
|
preinteresting(:) = 0
|
||||||
@ -477,7 +478,7 @@ subroutine select_singles_and_doubles(i_generator,hole_mask,particle_mask,fock_d
|
|||||||
if (nt > 4) exit
|
if (nt > 4) exit
|
||||||
endif
|
endif
|
||||||
end do
|
end do
|
||||||
case default
|
case default
|
||||||
mobMask(1:N_int,1) = iand(negMask(1:N_int,1), psi_det_sorted(1:N_int,1,preinteresting(ii)))
|
mobMask(1:N_int,1) = iand(negMask(1:N_int,1), psi_det_sorted(1:N_int,1,preinteresting(ii)))
|
||||||
mobMask(1:N_int,2) = iand(negMask(1:N_int,2), psi_det_sorted(1:N_int,2,preinteresting(ii)))
|
mobMask(1:N_int,2) = iand(negMask(1:N_int,2), psi_det_sorted(1:N_int,2,preinteresting(ii)))
|
||||||
nt = 0
|
nt = 0
|
||||||
|
@ -117,8 +117,12 @@ subroutine run_slave_main
|
|||||||
call mpi_print('zmq_get_dvector state_average_weight')
|
call mpi_print('zmq_get_dvector state_average_weight')
|
||||||
IRP_ENDIF
|
IRP_ENDIF
|
||||||
if (zmq_get_dvector(zmq_to_qp_run_socket,1,'state_average_weight',state_average_weight,N_states) == -1) cycle
|
if (zmq_get_dvector(zmq_to_qp_run_socket,1,'state_average_weight',state_average_weight,N_states) == -1) cycle
|
||||||
|
IRP_IF MPI_DEBUG
|
||||||
|
call mpi_print('zmq_get_dvector selection_weight')
|
||||||
|
IRP_ENDIF
|
||||||
|
if (zmq_get_dvector(zmq_to_qp_run_socket,1,'selection_weight',selection_weight,N_states) == -1) cycle
|
||||||
pt2_e0_denominator(1:N_states) = energy(1:N_states)
|
pt2_e0_denominator(1:N_states) = energy(1:N_states)
|
||||||
TOUCH pt2_e0_denominator state_average_weight threshold_generators
|
TOUCH pt2_e0_denominator state_average_weight threshold_generators selection_weight
|
||||||
|
|
||||||
if (mpi_master) then
|
if (mpi_master) then
|
||||||
print *, 'N_det', N_det
|
print *, 'N_det', N_det
|
||||||
@ -127,6 +131,7 @@ subroutine run_slave_main
|
|||||||
print *, 'pt2_e0_denominator', pt2_e0_denominator
|
print *, 'pt2_e0_denominator', pt2_e0_denominator
|
||||||
print *, 'pt2_stoch_istate', pt2_stoch_istate
|
print *, 'pt2_stoch_istate', pt2_stoch_istate
|
||||||
print *, 'state_average_weight', state_average_weight
|
print *, 'state_average_weight', state_average_weight
|
||||||
|
print *, 'selection_weight', selection_weight
|
||||||
endif
|
endif
|
||||||
call wall_time(t1)
|
call wall_time(t1)
|
||||||
call write_double(6,(t1-t0),'Broadcast time')
|
call write_double(6,(t1-t0),'Broadcast time')
|
||||||
|
@ -71,7 +71,7 @@ function run_stoch() {
|
|||||||
@test "HBO" { # 13.3144s
|
@test "HBO" { # 13.3144s
|
||||||
[[ -n $TRAVIS ]] && skip
|
[[ -n $TRAVIS ]] && skip
|
||||||
qp set_file hbo.ezfio
|
qp set_file hbo.ezfio
|
||||||
run -100.213733051634 1.e-4 100000
|
run -100.212721540746 1.e-3 100000
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "H2O" { # 11.3727s
|
@test "H2O" { # 11.3727s
|
||||||
@ -89,7 +89,7 @@ function run_stoch() {
|
|||||||
@test "SO" { # 13.4952s
|
@test "SO" { # 13.4952s
|
||||||
[[ -n $TRAVIS ]] && skip
|
[[ -n $TRAVIS ]] && skip
|
||||||
qp set_file so.ezfio
|
qp set_file so.ezfio
|
||||||
run -26.011918121362 3.e-4 100000
|
run -26.0060656855457 1.e-3 100000
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "H2S" { # 13.6745s
|
@test "H2S" { # 13.6745s
|
||||||
|
Loading…
Reference in New Issue
Block a user