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()
|
||||
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.set_perturbation("epstein_nesbet_2x2")
|
||||
s.unset_openmp()
|
||||
|
@ -65,8 +65,17 @@ subroutine run_pt2(N_st,energy)
|
||||
threshold_selectors = 1.d0
|
||||
threshold_generators = 0.999d0
|
||||
|
||||
N_det_generators = lambda_mrcc_pt2(0)
|
||||
do i=1,N_det_generators
|
||||
N_det_generators = lambda_mrcc_pt2(0) + N_det_cas
|
||||
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)
|
||||
do k=1,N_int
|
||||
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.set_perturbation("epstein_nesbet_2x2")
|
||||
s.unset_openmp()
|
||||
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
|
||||
|
||||
|
@ -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)
|
||||
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'
|
||||
endif
|
||||
|
||||
|
@ -38,16 +38,16 @@ subroutine $subroutine($params_main)
|
||||
call add_task_to_taskserver(zmq_to_qp_run_socket,task)
|
||||
enddo
|
||||
|
||||
PROVIDE nproc
|
||||
PROVIDE nproc N_states
|
||||
!$OMP PARALLEL DEFAULT(NONE) &
|
||||
!$OMP PRIVATE(i, pt2, norm_pert, H_pert_diag, N_st, n, task_id) &
|
||||
!$OMP SHARED(zmq_socket_pair) &
|
||||
!$OMP PRIVATE(i) &
|
||||
!$OMP SHARED(zmq_socket_pair,N_states, pt2, norm_pert, H_pert_diag, n, task_id) &
|
||||
!$OMP num_threads(nproc+1)
|
||||
i = omp_get_thread_num()
|
||||
if (i == 0) then
|
||||
call $subroutine_collector()
|
||||
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
|
||||
call $subroutine_slave_inproc(i)
|
||||
endif
|
||||
|
Loading…
Reference in New Issue
Block a user