From 0d91b9310a7d580e8bc97a6a0af7a62a8506f8c0 Mon Sep 17 00:00:00 2001 From: Yann Garniron Date: Tue, 4 Sep 2018 14:35:04 +0200 Subject: [PATCH] timestamp of first pull --- plugins/dress_zmq/dress_stoch_routines.irp.f | 7 ++++++- plugins/dress_zmq/run_dress_slave.irp.f | 6 +++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/plugins/dress_zmq/dress_stoch_routines.irp.f b/plugins/dress_zmq/dress_stoch_routines.irp.f index 5be8f9df..6ef3b298 100644 --- a/plugins/dress_zmq/dress_stoch_routines.irp.f +++ b/plugins/dress_zmq/dress_stoch_routines.irp.f @@ -428,7 +428,8 @@ subroutine dress_collector(zmq_socket_pull, E, relative_error, delta, delta_s2, c = 0 S(:) = 0d0 S2(:) = 0d0 - time0 = omp_get_wtime() + time = omp_get_wtime() + time0 = -1d0 ! omp_get_wtime() more = 1 do while (.not. found) @@ -464,6 +465,10 @@ subroutine dress_collector(zmq_socket_pull, E, relative_error, delta, delta_s2, else do call pull_dress_results(zmq_socket_pull, m_task, f, edI_task, edI_index, breve_delta_m, task_id, n_tasks) + if(time0 == -1d0) then + print *, "first pull", omp_get_wtime()-time + time0 = omp_get_wtime() + end if if(m_task == 0) then if (zmq_delete_tasks(zmq_to_qp_run_socket,zmq_socket_pull,task_id,n_tasks,more) == -1) then stop 'Unable to delete tasks' diff --git a/plugins/dress_zmq/run_dress_slave.irp.f b/plugins/dress_zmq/run_dress_slave.irp.f index f5398025..ea1d2709 100644 --- a/plugins/dress_zmq/run_dress_slave.irp.f +++ b/plugins/dress_zmq/run_dress_slave.irp.f @@ -87,9 +87,13 @@ double precision :: time, time0 stop "WORKER -1" end if iproc = omp_get_thread_num()+1 - allocate(breve_delta_m(N_states,N_det,2)) + allocate(breve_delta_m(N_states,N_det,2)) allocate(task_buf(pt2_n_tasks_max)) ntask_buf = 0 + + if(iproc==1) then + call push_dress_results(zmq_socket_push, 0, 0, edI_task, edI_index, breve_delta_m, task_buf, ntask_buf) + end if do while(cp_done > cp_sent .or. m /= dress_N_cp+1) call omp_set_lock(getting_task)