mirror of
https://github.com/LCPQ/quantum_package
synced 2024-12-23 04:43:50 +01:00
Repaired ZMQ
This commit is contained in:
parent
330de7b32f
commit
08e557dac4
@ -7,6 +7,11 @@ s.set_selection_pt2("epstein_nesbet_2x2")
|
|||||||
#s.unset_openmp()
|
#s.unset_openmp()
|
||||||
print s
|
print s
|
||||||
|
|
||||||
|
#s = H_apply("FCI_PT2")
|
||||||
|
#s.set_perturbation("epstein_nesbet_2x2")
|
||||||
|
#s.unset_openmp()
|
||||||
|
#print s
|
||||||
|
|
||||||
s = H_apply_zmq("FCI_PT2")
|
s = H_apply_zmq("FCI_PT2")
|
||||||
s.set_perturbation("epstein_nesbet_2x2")
|
s.set_perturbation("epstein_nesbet_2x2")
|
||||||
s.unset_openmp()
|
s.unset_openmp()
|
||||||
|
@ -65,8 +65,17 @@ subroutine run_pt2(N_st,energy)
|
|||||||
threshold_selectors = 1.d0
|
threshold_selectors = 1.d0
|
||||||
threshold_generators = 0.999d0
|
threshold_generators = 0.999d0
|
||||||
|
|
||||||
N_det_generators = lambda_mrcc_pt2(0)
|
N_det_generators = lambda_mrcc_pt2(0) + N_det_cas
|
||||||
do i=1,N_det_generators
|
do i=1,N_det_cas
|
||||||
|
do k=1,N_int
|
||||||
|
psi_det_generators(k,1,i) = psi_ref(k,1,i)
|
||||||
|
psi_det_generators(k,2,i) = psi_ref(k,2,i)
|
||||||
|
enddo
|
||||||
|
do k=1,N_st
|
||||||
|
psi_coef_generators(i,k) = psi_ref_coef(i,k)
|
||||||
|
enddo
|
||||||
|
enddo
|
||||||
|
do i=N_det_cas+1,N_det_generators
|
||||||
j = lambda_mrcc_pt2(i)
|
j = lambda_mrcc_pt2(i)
|
||||||
do k=1,N_int
|
do k=1,N_int
|
||||||
psi_det_generators(k,1,i) = psi_non_ref(k,1,j)
|
psi_det_generators(k,1,i) = psi_non_ref(k,1,j)
|
||||||
|
@ -25,11 +25,17 @@ print s
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
s = H_apply_zmq("mrcc_PT2")
|
s = H_apply("mrcc_PT2")
|
||||||
s.energy = "ci_electronic_energy_dressed"
|
s.energy = "ci_electronic_energy_dressed"
|
||||||
s.set_perturbation("epstein_nesbet_2x2")
|
s.set_perturbation("epstein_nesbet_2x2")
|
||||||
s.unset_openmp()
|
s.unset_openmp()
|
||||||
print s
|
print s
|
||||||
|
|
||||||
|
#s = H_apply_zmq("mrcc_PT2")
|
||||||
|
#s.energy = "ci_electronic_energy_dressed"
|
||||||
|
#s.set_perturbation("epstein_nesbet_2x2")
|
||||||
|
#s.unset_openmp()
|
||||||
|
#print s
|
||||||
|
|
||||||
END_SHELL
|
END_SHELL
|
||||||
|
|
||||||
|
@ -386,7 +386,11 @@ subroutine pull_pt2(zmq_socket_pull,pt2,norm_pert,H_pert_diag,N_st,n,task_id)
|
|||||||
|
|
||||||
rc = f77_zmq_recv( zmq_socket_pull, pt2(1), 8*N_st, 0)
|
rc = f77_zmq_recv( zmq_socket_pull, pt2(1), 8*N_st, 0)
|
||||||
if (rc /= 8*N_st) then
|
if (rc /= 8*N_st) then
|
||||||
print *, irp_here, 'f77_zmq_recv( zmq_socket_pull, pt2(1,1) , 8*N_st, 0)'
|
print *, ''
|
||||||
|
print *, ''
|
||||||
|
print *, ''
|
||||||
|
print *, irp_here, 'f77_zmq_recv( zmq_socket_pull, pt2(1) , 8*N_st, 0)'
|
||||||
|
print *, rc
|
||||||
stop 'error'
|
stop 'error'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -38,16 +38,16 @@ subroutine $subroutine($params_main)
|
|||||||
call add_task_to_taskserver(zmq_to_qp_run_socket,task)
|
call add_task_to_taskserver(zmq_to_qp_run_socket,task)
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
PROVIDE nproc
|
PROVIDE nproc N_states
|
||||||
!$OMP PARALLEL DEFAULT(NONE) &
|
!$OMP PARALLEL DEFAULT(NONE) &
|
||||||
!$OMP PRIVATE(i, pt2, norm_pert, H_pert_diag, N_st, n, task_id) &
|
!$OMP PRIVATE(i) &
|
||||||
!$OMP SHARED(zmq_socket_pair) &
|
!$OMP SHARED(zmq_socket_pair,N_states, pt2, norm_pert, H_pert_diag, n, task_id) &
|
||||||
!$OMP num_threads(nproc+1)
|
!$OMP num_threads(nproc+1)
|
||||||
i = omp_get_thread_num()
|
i = omp_get_thread_num()
|
||||||
if (i == 0) then
|
if (i == 0) then
|
||||||
call $subroutine_collector()
|
call $subroutine_collector()
|
||||||
integer :: n, task_id
|
integer :: n, task_id
|
||||||
call pull_pt2(zmq_socket_pair, pt2, norm_pert, H_pert_diag, N_st, n, task_id)
|
call pull_pt2(zmq_socket_pair, pt2, norm_pert, H_pert_diag, N_states, n, task_id)
|
||||||
else
|
else
|
||||||
call $subroutine_slave_inproc(i)
|
call $subroutine_slave_inproc(i)
|
||||||
endif
|
endif
|
||||||
|
Loading…
Reference in New Issue
Block a user