mirror of
https://github.com/LCPQ/quantum_package
synced 2025-01-03 01:56:05 +01:00
Merge branch 'master' of github.com:scemama/quantum_package
Conflicts: plugins/mrcepa0/mrcc_stoch_routines.irp.f
This commit is contained in:
commit
7fe2ff4605
14
configure
vendored
14
configure
vendored
@ -480,11 +480,15 @@ def create_ninja_and_rc(l_installed):
|
||||
'export QP_PYTHON={0}'.format(":".join(l_python)), "",
|
||||
'export IRPF90={0}'.format(path_irpf90.replace(QP_ROOT,"${QP_ROOT}")),
|
||||
'export NINJA={0}'.format(path_ninja.replace(QP_ROOT,"${QP_ROOT}")),
|
||||
'export PYTHONPATH="${QP_EZFIO}/Python":"${QP_PYTHON}":"${PYTHONPATH}"',
|
||||
'export PATH="${QP_PYTHON}":"${QP_ROOT}"/bin:"${QP_ROOT}"/ocaml:"${PATH}"',
|
||||
'export LD_LIBRARY_PATH="${QP_ROOT}"/lib:"${QP_ROOT}"/lib64:"${LD_LIBRARY_PATH}"',
|
||||
'export LIBRARY_PATH="${QP_ROOT}"/lib:"${QP_ROOT}"/lib64:"${LIBRARY_PATH}"',
|
||||
'export C_INCLUDE_PATH="${C_INCLUDE_PATH}":"${QP_ROOT}"/include',
|
||||
'qp_append_export () {',
|
||||
' #Append path $2:${!1}. Add the semicolon only if ${!1} is defined',
|
||||
' echo ${2}${!1:+:${!1}}',
|
||||
'}',
|
||||
'export PYTHONPATH=$(qp_append_export "PYTHONPATH" "${QP_EZFIO}/Python":"${QP_PYTHON}")',
|
||||
'export PATH=$(qp_append_export "PATH" "${QP_PYTHON}":"${QP_ROOT}"/bin:"${QP_ROOT}"/ocaml)',
|
||||
'export LD_LIBRARY_PATH=$(qp_append_export "LD_LIBRARY_PATH" "${QP_ROOT}"/lib:"${QP_ROOT}"/lib64)',
|
||||
'export LIBRARY_PATH=$(qp_append_export "LIBRARY_PATH" "${QP_ROOT}"/lib:"${QP_ROOT}"/lib64)',
|
||||
'export C_INCLUDE_PATH=$(qp_append_export "C_INCLUDE_PATH" "${QP_ROOT}"/include)'
|
||||
'',
|
||||
'source ${QP_ROOT}/install/EZFIO/Bash/ezfio.sh',
|
||||
'',
|
||||
|
@ -925,7 +925,6 @@ end
|
||||
E_CI_before = mrcc_E0_denominator(1) + nuclear_repulsion
|
||||
threshold_selectors = 1.d0
|
||||
threshold_generators = 1d0
|
||||
!errr = errr / 2d0
|
||||
if(errr /= 0d0) then
|
||||
errr = errr / 2d0 ! (-mrcc_E0_denominator(1) + mrcc_previous_E(1)) / 1d1
|
||||
else
|
||||
@ -934,7 +933,7 @@ end
|
||||
relative_error = errr
|
||||
print *, "RELATIVE ERROR", relative_error
|
||||
call ZMQ_mrcc(E_CI_before, mrcc, delta_ij_mrcc_zmq, delta_ij_s2_mrcc_zmq, abs(relative_error))
|
||||
!errr =
|
||||
|
||||
mrcc_previous_E(:) = mrcc_E0_denominator(:)
|
||||
do i=N_det_non_ref,1,-1
|
||||
delta_ii_mrcc_zmq(:,1) -= delta_ij_mrcc_zmq(:, i, 1) / psi_ref_coef(1,1) * psi_non_ref_coef(i, 1)
|
||||
@ -950,7 +949,6 @@ END_PROVIDER
|
||||
use bitmasks
|
||||
implicit none
|
||||
integer :: i, j, i_state
|
||||
|
||||
!mrmode : 1=mrcepa0, 2=mrsc2 add, 3=mrcc
|
||||
if(mrmode == 4) then
|
||||
do i = 1, N_det_ref
|
||||
|
@ -516,7 +516,7 @@ end
|
||||
integer, external :: add_task_to_taskserver
|
||||
|
||||
integer :: KKsize = 1000000
|
||||
|
||||
integer, external :: add_task_to_taskserver
|
||||
|
||||
call new_parallel_job(zmq_to_qp_run_socket,zmq_socket_pull,'mrsc2')
|
||||
|
||||
|
@ -13,7 +13,7 @@ BEGIN_PROVIDER [ integer, mrcc_stoch_istate ]
|
||||
END_PROVIDER
|
||||
|
||||
subroutine ZMQ_mrcc(E, mrcc, delta, delta_s2, relative_error)
|
||||
use dress_types
|
||||
!use dress_types
|
||||
use f77_zmq
|
||||
|
||||
implicit none
|
||||
@ -32,14 +32,14 @@ subroutine ZMQ_mrcc(E, mrcc, delta, delta_s2, relative_error)
|
||||
|
||||
double precision, external :: omp_get_wtime
|
||||
double precision :: time
|
||||
double precision :: w(N_states)
|
||||
|
||||
double precision :: w!(N_states)
|
||||
integer, external :: add_task_to_taskserver
|
||||
|
||||
|
||||
provide nproc fragment_first fragment_count mo_bielec_integrals_in_map mo_mono_elec_integral mrcc_weight psi_selectors
|
||||
|
||||
w(:) = 0.d0
|
||||
w(mrcc_stoch_istate) = 1.d0
|
||||
w = 0.d0
|
||||
w = 1.d0
|
||||
call update_psi_average_norm_contrib(w)
|
||||
|
||||
|
||||
@ -56,7 +56,7 @@ subroutine ZMQ_mrcc(E, mrcc, delta, delta_s2, relative_error)
|
||||
integer, external :: zmq_put_N_det_generators
|
||||
integer, external :: zmq_put_N_det_selectors
|
||||
integer, external :: zmq_put_dvector
|
||||
|
||||
integer, external :: zmq_set_running
|
||||
if (zmq_put_psi(zmq_to_qp_run_socket,1) == -1) then
|
||||
stop 'Unable to put psi on ZMQ server'
|
||||
endif
|
||||
@ -107,7 +107,6 @@ subroutine ZMQ_mrcc(E, mrcc, delta, delta_s2, relative_error)
|
||||
stop 'Unable to add task to task server'
|
||||
endif
|
||||
endif
|
||||
|
||||
if (zmq_set_running(zmq_to_qp_run_socket) == -1) then
|
||||
print *, irp_here, ': Failed in zmq_set_running'
|
||||
endif
|
||||
@ -116,7 +115,7 @@ subroutine ZMQ_mrcc(E, mrcc, delta, delta_s2, relative_error)
|
||||
!$OMP PRIVATE(i)
|
||||
i = omp_get_thread_num()
|
||||
if (i==0) then
|
||||
call mrcc_collector(zmq_socket_pull,E(mrcc_stoch_istate), relative_error, delta, delta_s2, mrcc)
|
||||
call mrcc_collector(zmq_socket_pull,E, relative_error, delta, delta_s2, mrcc)
|
||||
|
||||
else
|
||||
call mrcc_slave_inproc(i)
|
||||
@ -175,6 +174,8 @@ subroutine mrcc_collector(zmq_socket_pull, E, relative_error, delta, delta_s2, m
|
||||
logical, allocatable :: actually_computed(:)
|
||||
integer :: total_computed
|
||||
|
||||
delta = 0d0
|
||||
delta_s2 = 0d0
|
||||
allocate(delta_det(N_states, N_det_non_ref, 0:comb_teeth+1, 2))
|
||||
allocate(cp(N_states, N_det_non_ref, N_cp, 2), mrcc_detail(N_states, N_det_generators))
|
||||
allocate(delta_loc(N_states, N_det_non_ref, 2))
|
||||
@ -269,7 +270,6 @@ subroutine mrcc_collector(zmq_socket_pull, E, relative_error, delta, delta_s2, m
|
||||
|
||||
do i=2,N_det_generators
|
||||
if(.not. actually_computed(mrcc_jobs(i))) then
|
||||
print *, "first not comp", i
|
||||
cur_cp = done_cp_at(i-1)
|
||||
exit
|
||||
end if
|
||||
@ -310,7 +310,6 @@ subroutine mrcc_collector(zmq_socket_pull, E, relative_error, delta, delta_s2, m
|
||||
print *, irp_here, ': Error in sending abort signal (2)'
|
||||
endif
|
||||
endif
|
||||
|
||||
else
|
||||
if (cur_cp > old_cur_cp) then
|
||||
old_cur_cp = cur_cp
|
||||
@ -323,7 +322,6 @@ subroutine mrcc_collector(zmq_socket_pull, E, relative_error, delta, delta_s2, m
|
||||
end do pullLoop
|
||||
|
||||
if(total_computed == N_det_generators) then
|
||||
print *, "TOTALLY COMPUTED"
|
||||
delta = 0d0
|
||||
delta_s2 = 0d0
|
||||
do i=comb_teeth+1,0,-1
|
||||
@ -332,21 +330,16 @@ subroutine mrcc_collector(zmq_socket_pull, E, relative_error, delta, delta_s2, m
|
||||
end do
|
||||
else
|
||||
|
||||
|
||||
delta = cp(:,:,cur_cp,1)
|
||||
delta_s2 = cp(:,:,cur_cp,2)
|
||||
|
||||
do i=cp_first_tooth(cur_cp)-1,0,-1
|
||||
delta += delta_det(:,:,i,1)
|
||||
delta_s2 += delta_det(:,:,i,2)
|
||||
end do
|
||||
|
||||
end if
|
||||
|
||||
mrcc(1) = E
|
||||
|
||||
call end_zmq_to_qp_run_socket(zmq_to_qp_run_socket)
|
||||
|
||||
end subroutine
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user