9
1
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-11-07 05:53:37 +01:00

Fixing Davidson

This commit is contained in:
Anthony Scemama 2019-01-27 19:04:20 +01:00
parent 318b1af239
commit cd79047f1c
2 changed files with 4 additions and 7 deletions

View File

@ -53,7 +53,7 @@ subroutine run_slave_main
PROVIDE psi_det psi_coef threshold_generators state_average_weight mpi_master PROVIDE psi_det psi_coef threshold_generators state_average_weight mpi_master
PROVIDE zmq_state N_det_selectors pt2_stoch_istate N_det pt2_e0_denominator PROVIDE zmq_state N_det_selectors pt2_stoch_istate N_det pt2_e0_denominator
PROVIDE N_det_generators N_states N_states_diag pt2_e0_denominator PROVIDE N_det_generators N_states N_states_diag pt2_e0_denominator mpi_rank
IRP_IF MPI IRP_IF MPI
call MPI_BARRIER(MPI_COMM_WORLD, ierr) call MPI_BARRIER(MPI_COMM_WORLD, ierr)

View File

@ -13,7 +13,6 @@ end
subroutine davidson_slave_tcp(i) subroutine davidson_slave_tcp(i)
implicit none implicit none
integer, intent(in) :: i integer, intent(in) :: i
call sleep(1) ! Let the master start
call davidson_run_slave(0,i) call davidson_run_slave(0,i)
end end
@ -37,16 +36,15 @@ subroutine davidson_run_slave(thread,iproc)
integer, external :: connect_to_taskserver integer, external :: connect_to_taskserver
PROVIDE mpi_rank
zmq_to_qp_run_socket = new_zmq_to_qp_run_socket() zmq_to_qp_run_socket = new_zmq_to_qp_run_socket()
zmq_socket_push = new_zmq_push_socket(thread)
if (connect_to_taskserver(zmq_to_qp_run_socket,worker_id,thread) == -1) then if (connect_to_taskserver(zmq_to_qp_run_socket,worker_id,thread) == -1) then
call end_zmq_to_qp_run_socket(zmq_to_qp_run_socket)
return return
endif endif
zmq_socket_push = new_zmq_push_socket(thread)
call davidson_slave_work(zmq_to_qp_run_socket, zmq_socket_push, N_states_diag, N_det, worker_id) call davidson_slave_work(zmq_to_qp_run_socket, zmq_socket_push, N_states_diag, N_det, worker_id)
integer, external :: disconnect_from_taskserver integer, external :: disconnect_from_taskserver
@ -59,7 +57,6 @@ subroutine davidson_run_slave(thread,iproc)
endif endif
call end_zmq_to_qp_run_socket(zmq_to_qp_run_socket) call end_zmq_to_qp_run_socket(zmq_to_qp_run_socket)
call end_zmq_push_socket(zmq_socket_push,thread)
end subroutine end subroutine