mirror of
https://github.com/LCPQ/quantum_package
synced 2024-12-22 20:35:19 +01:00
Conditional compiling for ZMQ_PUSH
This commit is contained in:
parent
ae4d564839
commit
05df6784da
@ -111,7 +111,11 @@ 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)
|
IRP_IF ZMQ_PUSH
|
||||||
|
IRP_ELSE
|
||||||
|
rc = f77_zmq_recv( zmq_socket_push, task_id(1), ntask*4, 0)
|
||||||
|
IRP_ENDIF
|
||||||
|
|
||||||
end subroutine
|
end subroutine
|
||||||
|
|
||||||
|
|
||||||
@ -145,7 +149,11 @@ 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)
|
IRP_IF ZMQ_PUSH
|
||||||
|
IRP_ELSE
|
||||||
|
rc = f77_zmq_send( zmq_socket_pull, task_id(1), ntask*4, 0)
|
||||||
|
IRP_ENDIF
|
||||||
|
|
||||||
end subroutine
|
end subroutine
|
||||||
|
|
||||||
|
|
||||||
|
@ -112,7 +112,7 @@ double precision function get_phase_bi(phasemask, s1, s2, h1, p1, h2, p2)
|
|||||||
|
|
||||||
if(s1 == s2 .and. max(h1, p1) > min(h2, p2)) np = np + 1_1
|
if(s1 == s2 .and. max(h1, p1) > min(h2, p2)) np = np + 1_1
|
||||||
get_phase_bi = res(iand(np,1_1))
|
get_phase_bi = res(iand(np,1_1))
|
||||||
end subroutine
|
end function
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -113,8 +113,12 @@ 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
|
IRP_IF ZMQ_PUSH
|
||||||
! rc = f77_zmq_recv( zmq_socket_push, ok, 2, 0)
|
IRP_ELSE
|
||||||
|
character*(2) :: ok
|
||||||
|
rc = f77_zmq_recv( zmq_socket_push, ok, 2, 0)
|
||||||
|
IRP_ENDIF
|
||||||
|
|
||||||
end subroutine
|
end subroutine
|
||||||
|
|
||||||
|
|
||||||
@ -144,7 +148,11 @@ 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)
|
IRP_IF ZMQ_PUSH
|
||||||
|
IRP_ELSE
|
||||||
|
rc = f77_zmq_send( zmq_socket_pull, 'ok', 2, 0)
|
||||||
|
IRP_ENDIF
|
||||||
|
|
||||||
end subroutine
|
end subroutine
|
||||||
|
|
||||||
|
|
||||||
|
@ -132,7 +132,11 @@ subroutine push_selection_results(zmq_socket_push, pt2, b, task_id, ntask)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
! 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)
|
IRP_IF ZMQ_PUSH
|
||||||
|
IRP_ELSE
|
||||||
|
rc = f77_zmq_recv( zmq_socket_push, task_id(1), ntask*4, 0)
|
||||||
|
IRP_ENDIF
|
||||||
|
|
||||||
end subroutine
|
end subroutine
|
||||||
|
|
||||||
|
|
||||||
@ -182,7 +186,11 @@ subroutine pull_selection_results(zmq_socket_pull, pt2, val, det, N, task_id, nt
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
! 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)
|
IRP_IF ZMQ_PUSH
|
||||||
|
IRP_ELSE
|
||||||
|
rc = f77_zmq_send( zmq_socket_pull, task_id(1), ntask*4, 0)
|
||||||
|
IRP_ENDIF
|
||||||
|
|
||||||
end subroutine
|
end subroutine
|
||||||
|
|
||||||
|
|
||||||
|
@ -316,12 +316,16 @@ subroutine push_mrsc2_results(zmq_socket_push, I_i, J, delta, delta_s2, task_id)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
! Activate is zmq_socket_push is a REQ
|
! Activate is zmq_socket_push is a REQ
|
||||||
! integer :: idummy
|
IRP_IF ZMQ_PUSH
|
||||||
! rc = f77_zmq_recv( zmq_socket_push, idummy, 4, 0)
|
IRP_ELSE
|
||||||
! if (rc /= 4) then
|
integer :: idummy
|
||||||
! print *, irp_here, 'f77_zmq_send( zmq_socket_push, idummy, 4, 0)'
|
rc = f77_zmq_recv( zmq_socket_push, idummy, 4, 0)
|
||||||
! stop 'error'
|
if (rc /= 4) then
|
||||||
! endif
|
print *, irp_here, 'f77_zmq_send( zmq_socket_push, idummy, 4, 0)'
|
||||||
|
stop 'error'
|
||||||
|
endif
|
||||||
|
IRP_ENDIF
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
@ -390,12 +394,16 @@ subroutine pull_mrsc2_results(zmq_socket_pull, I_i, J, n, idx, delta, delta_s2,
|
|||||||
|
|
||||||
|
|
||||||
! Activate is zmq_socket_pull is a REP
|
! Activate is zmq_socket_pull is a REP
|
||||||
! integer :: idummy
|
IRP_IF ZMQ_PUSH
|
||||||
! rc = f77_zmq_send( zmq_socket_pull, idummy, 4, 0)
|
IRP_ELSE
|
||||||
! if (rc /= 4) then
|
integer :: idummy
|
||||||
! print *, irp_here, 'f77_zmq_send( zmq_socket_pull, idummy, 4, 0)'
|
rc = f77_zmq_send( zmq_socket_pull, idummy, 4, 0)
|
||||||
! stop 'error'
|
if (rc /= 4) then
|
||||||
! endif
|
print *, irp_here, 'f77_zmq_send( zmq_socket_pull, idummy, 4, 0)'
|
||||||
|
stop 'error'
|
||||||
|
endif
|
||||||
|
IRP_ENDIF
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
@ -169,12 +169,15 @@ 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
|
IRP_IF ZMQ_PUSH
|
||||||
! rc = f77_zmq_recv( zmq_socket_push, idummy, 4, 0)
|
IRP_ELSE
|
||||||
! if (rc /= 4) then
|
integer :: idummy
|
||||||
! print *, irp_here, ': f77_zmq_send( zmq_socket_push, idummy, 4, 0)'
|
rc = f77_zmq_recv( zmq_socket_push, idummy, 4, 0)
|
||||||
! stop 'error'
|
if (rc /= 4) then
|
||||||
! endif
|
print *, irp_here, ': f77_zmq_send( zmq_socket_push, idummy, 4, 0)'
|
||||||
|
stop 'error'
|
||||||
|
endif
|
||||||
|
IRP_ENDIF
|
||||||
|
|
||||||
end subroutine
|
end subroutine
|
||||||
|
|
||||||
@ -201,11 +204,14 @@ 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)
|
IRP_IF ZMQ_PUSH
|
||||||
! if (rc /= 4) then
|
IRP_ELSE
|
||||||
! print *, irp_here, ' : f77_zmq_send (zmq_socket_pull,...'
|
rc = f77_zmq_send( zmq_socket_pull, 0, 4, 0)
|
||||||
! stop 'error'
|
if (rc /= 4) then
|
||||||
! endif
|
print *, irp_here, ' : f77_zmq_send (zmq_socket_pull,...'
|
||||||
|
stop 'error'
|
||||||
|
endif
|
||||||
|
IRP_ENDIF
|
||||||
|
|
||||||
end subroutine
|
end subroutine
|
||||||
|
|
||||||
|
@ -362,12 +362,16 @@ 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
|
IRP_IF ZMQ_PUSH
|
||||||
! rc = f77_zmq_recv( zmq_socket_push, idummy, 4, 0)
|
IRP_ELSE
|
||||||
! if (rc /= 4) then
|
integer :: idummy
|
||||||
! print *, irp_here, 'f77_zmq_send( zmq_socket_push, idummy, 4, 0)'
|
rc = f77_zmq_recv( zmq_socket_push, idummy, 4, 0)
|
||||||
! stop 'error'
|
if (rc /= 4) then
|
||||||
! endif
|
print *, irp_here, 'f77_zmq_send( zmq_socket_push, idummy, 4, 0)'
|
||||||
|
stop 'error'
|
||||||
|
endif
|
||||||
|
IRP_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 +437,14 @@ 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)
|
IRP_IF ZMQ_PUSH
|
||||||
! if (rc /= 4) then
|
IRP_ELSE
|
||||||
! print *, irp_here, 'f77_zmq_send( zmq_socket_pull, 0, 4, 0)'
|
rc = f77_zmq_send( zmq_socket_pull, 0, 4, 0)
|
||||||
! stop 'error'
|
if (rc /= 4) then
|
||||||
! endif
|
print *, irp_here, 'f77_zmq_send( zmq_socket_pull, 0, 4, 0)'
|
||||||
|
stop 'error'
|
||||||
|
endif
|
||||||
|
IRP_ENDIF
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -57,12 +57,15 @@ 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
|
IRP_IF ZMQ_PUSH
|
||||||
! rc = f77_zmq_recv( zmq_socket_push, idummy, 4, 0)
|
IRP_ELSE
|
||||||
! if (rc /= 4) then
|
integer :: idummy
|
||||||
! print *, irp_here, ': f77_zmq_send( zmq_socket_push, idummy, 4, 0)'
|
rc = f77_zmq_recv( zmq_socket_push, idummy, 4, 0)
|
||||||
! stop 'error'
|
if (rc /= 4) then
|
||||||
! endif
|
print *, irp_here, ': f77_zmq_send( zmq_socket_push, idummy, 4, 0)'
|
||||||
|
stop 'error'
|
||||||
|
endif
|
||||||
|
IRP_ENDIF
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
@ -187,11 +190,14 @@ 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)
|
IRP_IF ZMQ_PUSH
|
||||||
! if (rc /= 4) then
|
IRP_ELSE
|
||||||
! print *, irp_here, ' : f77_zmq_send (zmq_socket_pull,...'
|
rc = f77_zmq_send( zmq_socket_pull, 0, 4, 0)
|
||||||
! stop 'error'
|
if (rc /= 4) then
|
||||||
! endif
|
print *, irp_here, ' : f77_zmq_send (zmq_socket_pull,...'
|
||||||
|
stop 'error'
|
||||||
|
endif
|
||||||
|
IRP_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)
|
||||||
|
@ -232,8 +232,11 @@ 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
|
||||||
|
IRP_IF ZMQ_PUSH
|
||||||
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)
|
IRP_ELSE
|
||||||
|
new_zmq_pull_socket = f77_zmq_socket(zmq_context, ZMQ_REP)
|
||||||
|
IRP_ENDIF
|
||||||
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'
|
||||||
@ -309,8 +312,11 @@ 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
|
||||||
|
IRP_IF ZMQ_PUSH
|
||||||
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)
|
IRP_ELSE
|
||||||
|
new_zmq_push_socket = f77_zmq_socket(zmq_context, ZMQ_REQ)
|
||||||
|
IRP_ENDIF
|
||||||
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'
|
||||||
|
Loading…
Reference in New Issue
Block a user