mirror of
https://github.com/LCPQ/quantum_package
synced 2024-12-22 20:35:19 +01:00
Removed all ipc between Fortran and OCaml
This commit is contained in:
parent
360d38a41d
commit
1185d70be7
@ -134,7 +134,7 @@ subroutine ZMQ_selection(N_in, pt2)
|
||||
|
||||
step = int(5000000.d0 / dble(N_int * N_states * elec_num * elec_num * mo_tot_num * mo_tot_num ))
|
||||
step = max(1,step)
|
||||
do i= 1,N_det_generators, step
|
||||
do i= N_det_generators, 1, -step
|
||||
i_generator_start = max(i-step+1,1)
|
||||
i_generator_max = i
|
||||
write(task,*) i_generator_start, i_generator_max, 1, N
|
||||
|
@ -554,7 +554,6 @@ END_PROVIDER
|
||||
do k=1,N_det_non_ref
|
||||
|
||||
call i_h_j(psi_ref(1,1,j), psi_non_ref(1,1,k),N_int,Hjk)
|
||||
! call i_h_j(psi_non_ref(1,1,k),psi_ref(1,1,i), N_int,Hki)
|
||||
|
||||
delta_cas(i,j,i_state) += Hjk * dij(i, k, i_state) ! * Hki * lambda_mrcc(i_state, k)
|
||||
!print *, Hjk * get_dij(psi_ref(1,1,i), psi_non_ref(1,1,k), N_int), Hki * get_dij(psi_ref(1,1,j), psi_non_ref(1,1,k), N_int)
|
||||
|
@ -501,7 +501,7 @@ subroutine davidson_miniserver_end()
|
||||
integer rc
|
||||
character*(64) buf
|
||||
|
||||
address = trim(qp_run_address_tcp)//':11223'
|
||||
address = trim(qp_run_address)//':11223'
|
||||
requester = f77_zmq_socket(zmq_context, ZMQ_REQ)
|
||||
rc = f77_zmq_connect(requester,address)
|
||||
|
||||
@ -520,7 +520,7 @@ subroutine davidson_miniserver_get()
|
||||
character*(20) buffer
|
||||
integer rc
|
||||
|
||||
address = trim(qp_run_address_tcp)//':11223'
|
||||
address = trim(qp_run_address)//':11223'
|
||||
|
||||
requester = f77_zmq_socket(zmq_context, ZMQ_REQ)
|
||||
rc = f77_zmq_connect(requester,address)
|
||||
|
@ -17,8 +17,6 @@ END_PROVIDER
|
||||
|
||||
|
||||
BEGIN_PROVIDER [ character*(128), qp_run_address ]
|
||||
&BEGIN_PROVIDER [ character*(128), qp_run_address_ipc ]
|
||||
&BEGIN_PROVIDER [ character*(128), qp_run_address_tcp ]
|
||||
&BEGIN_PROVIDER [ integer, zmq_port_start ]
|
||||
use f77_zmq
|
||||
implicit none
|
||||
@ -36,22 +34,19 @@ END_PROVIDER
|
||||
integer :: i
|
||||
do i=len(buffer),1,-1
|
||||
if ( buffer(i:i) == ':') then
|
||||
qp_run_address_tcp = trim(buffer(1:i-1))
|
||||
qp_run_address = trim(buffer(1:i-1))
|
||||
read(buffer(i+1:), *) zmq_port_start
|
||||
exit
|
||||
endif
|
||||
enddo
|
||||
qp_run_address_ipc = 'ipc:///tmp/qp_run'
|
||||
qp_run_address = qp_run_address_ipc
|
||||
END_PROVIDER
|
||||
|
||||
|
||||
BEGIN_PROVIDER [ character*(128), zmq_socket_pull_tcp_address ]
|
||||
&BEGIN_PROVIDER [ character*(128), zmq_socket_pull_inproc_address ]
|
||||
&BEGIN_PROVIDER [ character*(128), zmq_socket_pair_inproc_address ]
|
||||
&BEGIN_PROVIDER [ character*(128), zmq_socket_push_tcp_address ]
|
||||
&BEGIN_PROVIDER [ character*(128), zmq_socket_pull_inproc_address ]
|
||||
&BEGIN_PROVIDER [ character*(128), zmq_socket_push_inproc_address ]
|
||||
&BEGIN_PROVIDER [ character*(128), zmq_socket_sub_address ]
|
||||
&BEGIN_PROVIDER [ character*(128), zmq_socket_sub_tcp_address ]
|
||||
use f77_zmq
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
@ -59,12 +54,12 @@ END_PROVIDER
|
||||
END_DOC
|
||||
character*(8), external :: zmq_port
|
||||
|
||||
zmq_socket_sub_tcp_address = trim(qp_run_address)//':'//zmq_port(1)//' '
|
||||
zmq_socket_pull_tcp_address = 'tcp://*:'//zmq_port(2)//' '
|
||||
zmq_socket_push_tcp_address = trim(qp_run_address)//':'//zmq_port(2)//' '
|
||||
zmq_socket_pull_inproc_address = 'inproc://'//zmq_port(2)//' '
|
||||
zmq_socket_pair_inproc_address = 'inproc://'//zmq_port(3)//' '
|
||||
zmq_socket_push_tcp_address = trim(qp_run_address_tcp)//':'//zmq_port(2)//' '
|
||||
zmq_socket_push_inproc_address = zmq_socket_pull_inproc_address
|
||||
zmq_socket_sub_address = trim(qp_run_address)//':'//zmq_port(1)//' '
|
||||
zmq_socket_pair_inproc_address = 'inproc://'//zmq_port(3)//' '
|
||||
|
||||
! /!\ Don't forget to change subroutine reset_zmq_addresses
|
||||
END_PROVIDER
|
||||
@ -77,13 +72,12 @@ subroutine reset_zmq_addresses
|
||||
END_DOC
|
||||
character*(8), external :: zmq_port
|
||||
|
||||
zmq_socket_sub_tcp_address = trim(qp_run_address)//':'//zmq_port(1)//' '
|
||||
zmq_socket_pull_tcp_address = 'tcp://*:'//zmq_port(2)//' '
|
||||
zmq_socket_push_tcp_address = trim(qp_run_address)//':'//zmq_port(2)//' '
|
||||
zmq_socket_pull_inproc_address = 'inproc://'//zmq_port(2)//' '
|
||||
zmq_socket_pair_inproc_address = 'inproc://'//zmq_port(3)//' '
|
||||
zmq_socket_push_tcp_address = trim(qp_run_address_tcp)//':'//zmq_port(2)//' '
|
||||
zmq_socket_push_inproc_address = zmq_socket_pull_inproc_address
|
||||
zmq_socket_sub_address = trim(qp_run_address)//':'//zmq_port(1)//' '
|
||||
|
||||
zmq_socket_pair_inproc_address = 'inproc://'//zmq_port(3)//' '
|
||||
end
|
||||
|
||||
|
||||
@ -111,7 +105,6 @@ subroutine switch_qp_run_to_master
|
||||
exit
|
||||
endif
|
||||
enddo
|
||||
qp_run_address_tcp = qp_run_address
|
||||
call reset_zmq_addresses
|
||||
|
||||
end
|
||||
@ -374,7 +367,7 @@ function new_zmq_sub_socket()
|
||||
stop 'Unable to subscribe new_zmq_sub_socket'
|
||||
endif
|
||||
|
||||
rc = f77_zmq_connect(new_zmq_sub_socket, zmq_socket_sub_address)
|
||||
rc = f77_zmq_connect(new_zmq_sub_socket, zmq_socket_sub_tcp_address)
|
||||
if (rc /= 0) then
|
||||
stop 'Unable to connect new_zmq_sub_socket'
|
||||
endif
|
||||
|
Loading…
Reference in New Issue
Block a user