10
0
mirror of https://github.com/LCPQ/quantum_package synced 2024-12-22 20:35:19 +01:00

Restored PUSH/PULL

This commit is contained in:
Anthony Scemama 2017-05-09 21:34:01 +02:00
parent 92832b8ed6
commit cbafcb5f55
6 changed files with 48 additions and 48 deletions

View File

@ -113,8 +113,8 @@ subroutine push_pt2_results(zmq_socket_push, N, index, pt2_detail, task_id, ntas
if(rc /= 4*ntask) stop "push" if(rc /= 4*ntask) stop "push"
! Activate is zmq_socket_push is a REQ ! Activate is zmq_socket_push is a REQ
character*(2) :: ok ! character*(2) :: ok
rc = f77_zmq_recv( zmq_socket_push, ok, 2, 0) ! rc = f77_zmq_recv( zmq_socket_push, ok, 2, 0)
end subroutine end subroutine
@ -144,7 +144,7 @@ subroutine pull_pt2_results(zmq_socket_pull, N, index, pt2_detail, task_id, ntas
if(rc /= 4*ntask) stop "pull" if(rc /= 4*ntask) stop "pull"
! Activate is zmq_socket_pull is a REP ! Activate is zmq_socket_pull is a REP
rc = f77_zmq_send( zmq_socket_pull, 'ok', 2, 0) ! rc = f77_zmq_send( zmq_socket_pull, 'ok', 2, 0)
end subroutine end subroutine

View File

@ -110,7 +110,7 @@ subroutine push_selection_results(zmq_socket_push, pt2, b, task_id, ntask)
if(rc /= 4*ntask) stop "push" if(rc /= 4*ntask) stop "push"
! Activate is zmq_socket_push is a REQ ! Activate is zmq_socket_push is a REQ
rc = f77_zmq_recv( zmq_socket_push, task_id(1), ntask*4, 0) ! rc = f77_zmq_recv( zmq_socket_push, task_id(1), ntask*4, 0)
end subroutine end subroutine
@ -144,7 +144,7 @@ subroutine pull_selection_results(zmq_socket_pull, pt2, val, det, N, task_id, nt
if(rc /= 4*ntask) stop "pull" if(rc /= 4*ntask) stop "pull"
! Activate is zmq_socket_pull is a REP ! Activate is zmq_socket_pull is a REP
rc = f77_zmq_send( zmq_socket_pull, task_id(1), ntask*4, 0) ! rc = f77_zmq_send( zmq_socket_pull, task_id(1), ntask*4, 0)
end subroutine end subroutine

View File

@ -168,12 +168,12 @@ subroutine davidson_push_results(zmq_socket_push, v_0, s_0, task_id)
if(rc /= 4) stop "davidson_push_results failed to push task_id" if(rc /= 4) stop "davidson_push_results failed to push task_id"
! Activate is zmq_socket_push is a REQ ! Activate is zmq_socket_push is a REQ
integer :: idummy ! integer :: idummy
rc = f77_zmq_recv( zmq_socket_push, idummy, 4, 0) ! rc = f77_zmq_recv( zmq_socket_push, idummy, 4, 0)
if (rc /= 4) then ! if (rc /= 4) then
print *, irp_here, ': f77_zmq_send( zmq_socket_push, idummy, 4, 0)' ! print *, irp_here, ': f77_zmq_send( zmq_socket_push, idummy, 4, 0)'
stop 'error' ! stop 'error'
endif ! endif
end subroutine end subroutine
@ -200,11 +200,11 @@ subroutine davidson_pull_results(zmq_socket_pull, v_0, s_0, task_id)
if(rc /= 4) stop "davidson_pull_results failed to pull task_id" if(rc /= 4) stop "davidson_pull_results failed to pull task_id"
! Activate if zmq_socket_pull is a REP ! Activate if zmq_socket_pull is a REP
rc = f77_zmq_send( zmq_socket_pull, 0, 4, 0) ! rc = f77_zmq_send( zmq_socket_pull, 0, 4, 0)
if (rc /= 4) then ! if (rc /= 4) then
print *, irp_here, ' : f77_zmq_send (zmq_socket_pull,...' ! print *, irp_here, ' : f77_zmq_send (zmq_socket_pull,...'
stop 'error' ! stop 'error'
endif ! endif
end subroutine end subroutine

View File

@ -362,12 +362,12 @@ subroutine push_pt2(zmq_socket_push,pt2,norm_pert,H_pert_diag,i_generator,N_st,t
endif endif
! Activate if zmq_socket_push is a REQ ! Activate if zmq_socket_push is a REQ
integer :: idummy ! integer :: idummy
rc = f77_zmq_recv( zmq_socket_push, idummy, 4, 0) ! rc = f77_zmq_recv( zmq_socket_push, idummy, 4, 0)
if (rc /= 4) then ! if (rc /= 4) then
print *, irp_here, 'f77_zmq_send( zmq_socket_push, idummy, 4, 0)' ! print *, irp_here, 'f77_zmq_send( zmq_socket_push, idummy, 4, 0)'
stop 'error' ! stop 'error'
endif ! endif
end end
subroutine pull_pt2(zmq_socket_pull,pt2,norm_pert,H_pert_diag,i_generator,N_st,n,task_id) subroutine pull_pt2(zmq_socket_pull,pt2,norm_pert,H_pert_diag,i_generator,N_st,n,task_id)
@ -433,11 +433,11 @@ subroutine pull_pt2(zmq_socket_pull,pt2,norm_pert,H_pert_diag,i_generator,N_st,n
endif endif
! Activate if zmq_socket_pull is a REP ! Activate if zmq_socket_pull is a REP
rc = f77_zmq_send( zmq_socket_pull, 0, 4, 0) ! rc = f77_zmq_send( zmq_socket_pull, 0, 4, 0)
if (rc /= 4) then ! if (rc /= 4) then
print *, irp_here, 'f77_zmq_send( zmq_socket_pull, 0, 4, 0)' ! print *, irp_here, 'f77_zmq_send( zmq_socket_pull, 0, 4, 0)'
stop 'error' ! stop 'error'
endif ! endif
end end

View File

@ -57,12 +57,12 @@ subroutine push_integrals(zmq_socket_push, n_integrals, buffer_i, buffer_value,
endif endif
! Activate is zmq_socket_push is a REQ ! Activate is zmq_socket_push is a REQ
integer :: idummy ! integer :: idummy
rc = f77_zmq_recv( zmq_socket_push, idummy, 4, 0) ! rc = f77_zmq_recv( zmq_socket_push, idummy, 4, 0)
if (rc /= 4) then ! if (rc /= 4) then
print *, irp_here, ': f77_zmq_send( zmq_socket_push, idummy, 4, 0)' ! print *, irp_here, ': f77_zmq_send( zmq_socket_push, idummy, 4, 0)'
stop 'error' ! stop 'error'
endif ! endif
end end
@ -187,11 +187,11 @@ subroutine ao_bielec_integrals_in_map_collector
rc = f77_zmq_recv( zmq_socket_pull, task_id, 4, 0) rc = f77_zmq_recv( zmq_socket_pull, task_id, 4, 0)
! Activate if zmq_socket_pull is a REP ! Activate if zmq_socket_pull is a REP
rc = f77_zmq_send( zmq_socket_pull, 0, 4, 0) ! rc = f77_zmq_send( zmq_socket_pull, 0, 4, 0)
if (rc /= 4) then ! if (rc /= 4) then
print *, irp_here, ' : f77_zmq_send (zmq_socket_pull,...' ! print *, irp_here, ' : f77_zmq_send (zmq_socket_pull,...'
stop 'error' ! stop 'error'
endif ! endif
call insert_into_ao_integrals_map(n_integrals,buffer_i,buffer_value) call insert_into_ao_integrals_map(n_integrals,buffer_i,buffer_value)

View File

@ -180,14 +180,14 @@ function new_zmq_pair_socket(bind)
endif endif
rc = f77_zmq_setsockopt(new_zmq_pair_socket, ZMQ_SNDHWM, 1, 4) rc = f77_zmq_setsockopt(new_zmq_pair_socket, ZMQ_SNDHWM, 4, 4)
if (rc /= 0) then if (rc /= 0) then
stop 'f77_zmq_setsockopt(new_zmq_pair_socket, ZMQ_SNDHWM, 1, 4)' stop 'f77_zmq_setsockopt(new_zmq_pair_socket, ZMQ_SNDHWM, 4, 4)'
endif endif
rc = f77_zmq_setsockopt(new_zmq_pair_socket, ZMQ_RCVHWM, 1, 4) rc = f77_zmq_setsockopt(new_zmq_pair_socket, ZMQ_RCVHWM, 4, 4)
if (rc /= 0) then if (rc /= 0) then
stop 'f77_zmq_setsockopt(new_zmq_pair_socket, ZMQ_RCVHWM, 1, 4)' stop 'f77_zmq_setsockopt(new_zmq_pair_socket, ZMQ_RCVHWM, 4, 4)'
endif endif
rc = f77_zmq_setsockopt(new_zmq_pair_socket, ZMQ_IMMEDIATE, 1, 4) rc = f77_zmq_setsockopt(new_zmq_pair_socket, ZMQ_IMMEDIATE, 1, 4)
@ -232,8 +232,8 @@ function new_zmq_pull_socket()
if (zmq_context == 0_ZMQ_PTR) then if (zmq_context == 0_ZMQ_PTR) then
stop 'zmq_context is uninitialized' stop 'zmq_context is uninitialized'
endif endif
! new_zmq_pull_socket = f77_zmq_socket(zmq_context, ZMQ_PULL) new_zmq_pull_socket = f77_zmq_socket(zmq_context, ZMQ_PULL)
new_zmq_pull_socket = f77_zmq_socket(zmq_context, ZMQ_REP) ! new_zmq_pull_socket = f77_zmq_socket(zmq_context, ZMQ_REP)
call omp_unset_lock(zmq_lock) call omp_unset_lock(zmq_lock)
if (new_zmq_pull_socket == 0_ZMQ_PTR) then if (new_zmq_pull_socket == 0_ZMQ_PTR) then
stop 'Unable to create zmq pull socket' stop 'Unable to create zmq pull socket'
@ -249,7 +249,7 @@ function new_zmq_pull_socket()
stop 'Unable to set ZMQ_RCVBUF on pull socket' stop 'Unable to set ZMQ_RCVBUF on pull socket'
endif endif
rc = f77_zmq_setsockopt(new_zmq_pull_socket,ZMQ_RCVHWM,1,4) rc = f77_zmq_setsockopt(new_zmq_pull_socket,ZMQ_RCVHWM,4,4)
if (rc /= 0) then if (rc /= 0) then
stop 'Unable to set ZMQ_RCVHWM on pull socket' stop 'Unable to set ZMQ_RCVHWM on pull socket'
endif endif
@ -309,8 +309,8 @@ function new_zmq_push_socket(thread)
if (zmq_context == 0_ZMQ_PTR) then if (zmq_context == 0_ZMQ_PTR) then
stop 'zmq_context is uninitialized' stop 'zmq_context is uninitialized'
endif endif
! new_zmq_push_socket = f77_zmq_socket(zmq_context, ZMQ_PUSH) new_zmq_push_socket = f77_zmq_socket(zmq_context, ZMQ_PUSH)
new_zmq_push_socket = f77_zmq_socket(zmq_context, ZMQ_REQ) ! new_zmq_push_socket = f77_zmq_socket(zmq_context, ZMQ_REQ)
call omp_unset_lock(zmq_lock) call omp_unset_lock(zmq_lock)
if (new_zmq_push_socket == 0_ZMQ_PTR) then if (new_zmq_push_socket == 0_ZMQ_PTR) then
stop 'Unable to create zmq push socket' stop 'Unable to create zmq push socket'
@ -321,7 +321,7 @@ function new_zmq_push_socket(thread)
! stop 'Unable to set ZMQ_LINGER on push socket' ! stop 'Unable to set ZMQ_LINGER on push socket'
! endif ! endif
rc = f77_zmq_setsockopt(new_zmq_push_socket,ZMQ_SNDHWM,1,4) rc = f77_zmq_setsockopt(new_zmq_push_socket,ZMQ_SNDHWM,4,4)
if (rc /= 0) then if (rc /= 0) then
stop 'Unable to set ZMQ_SNDHWM on push socket' stop 'Unable to set ZMQ_SNDHWM on push socket'
endif endif