From 99cbe9cfe3b892ad2315f7729cbed729eea3ed86 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Mon, 27 Nov 2017 02:04:05 +0100 Subject: [PATCH] Stabilized parallel calculations --- src/Determinants/determinants.irp.f | 2 +- src/ZMQ/utils.irp.f | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/Determinants/determinants.irp.f b/src/Determinants/determinants.irp.f index b7a9b2a0..fdf5c555 100644 --- a/src/Determinants/determinants.irp.f +++ b/src/Determinants/determinants.irp.f @@ -511,8 +511,8 @@ subroutine save_wavefunction_general(ndet,nstates,psidet,dim_psicoef,psicoef) enddo call ezfio_set_determinants_psi_coef(psi_coef_save) - call write_int(output_determinants,ndet,'Saved determinants') deallocate (psi_coef_save) + call write_int(output_determinants,ndet,'Saved determinants') end diff --git a/src/ZMQ/utils.irp.f b/src/ZMQ/utils.irp.f index b6a0f4b2..b868761f 100644 --- a/src/ZMQ/utils.irp.f +++ b/src/ZMQ/utils.irp.f @@ -599,6 +599,7 @@ subroutine end_parallel_job(zmq_to_qp_run_socket,name_in) stop 'Wrong end of job' endif + call sleep(1) rc = f77_zmq_send(zmq_to_qp_run_socket, 'end_job '//trim(zmq_state),8+len(trim(zmq_state)),0) rc = f77_zmq_recv(zmq_to_qp_run_socket, zmq_state, 2, 0) if (rc /= 2) then @@ -925,9 +926,9 @@ subroutine zmq_delete_task(zmq_to_qp_run_socket,zmq_socket_pull,task_id,more) character*(512) :: msg write(msg,*) 'del_task ', zmq_state, task_id - rc = f77_zmq_send(zmq_to_qp_run_socket,msg,512,0) - if (rc /= 512) then - print *, 'f77_zmq_send(zmq_to_qp_run_socket,task_id,4,0)' + rc = f77_zmq_send(zmq_to_qp_run_socket,trim(msg),len(trim(msg)),0) + if (rc /= len(trim(msg))) then + print *, irp_here stop 'error' endif @@ -946,7 +947,7 @@ subroutine zmq_delete_task(zmq_to_qp_run_socket,zmq_socket_pull,task_id,more) ! endif else print *, reply - print *, 'f77_zmq_recv(zmq_to_qp_run_socket,reply,64,0)' + print *, irp_here stop 'error' endif end