diff --git a/src/cipsi/pt2_stoch_routines.irp.f b/src/cipsi/pt2_stoch_routines.irp.f index e9a1f724..afa7a636 100644 --- a/src/cipsi/pt2_stoch_routines.irp.f +++ b/src/cipsi/pt2_stoch_routines.irp.f @@ -519,7 +519,7 @@ subroutine pt2_collector(zmq_socket_pull, E, relative_error, pt2, error, varianc else call pull_pt2_results(zmq_socket_pull, index, eI_task, vI_task, nI_task, task_id, n_tasks, b2) if (zmq_delete_tasks_async_send(zmq_to_qp_run_socket,task_id,n_tasks,sending) == -1) then - stop 'Unable to delete tasks' + stop 'PT2: Unable to delete tasks (send)' endif do i=1,n_tasks eI(1:N_states, index(i)) += eI_task(1:N_states,i) @@ -533,7 +533,7 @@ subroutine pt2_collector(zmq_socket_pull, E, relative_error, pt2, error, varianc call add_to_selection_buffer(b, b2%det(1,1,i), b2%val(i)) end do if (zmq_delete_tasks_async_recv(zmq_to_qp_run_socket,more,sending) == -1) then - stop 'Unable to delete tasks' + stop 'PT2: Unable to delete tasks (recv)' endif end if end do diff --git a/src/cipsi/run_pt2_slave.irp.f b/src/cipsi/run_pt2_slave.irp.f index b6545922..21def8f2 100644 --- a/src/cipsi/run_pt2_slave.irp.f +++ b/src/cipsi/run_pt2_slave.irp.f @@ -31,7 +31,7 @@ subroutine run_pt2_slave(thread,iproc,energy) double precision, intent(in) :: energy(N_states_diag) integer, intent(in) :: thread, iproc - if (N_det > 1000000) then + if (N_det > nproc*(elec_alpha_num * (mo_num-elec_alpha_num))**2) then call run_pt2_slave_large(thread,iproc,energy) else call run_pt2_slave_small(thread,iproc,energy) @@ -236,7 +236,7 @@ subroutine run_pt2_slave_large(thread,iproc,energy) call create_selection_buffer(bsize, bsize*2, b) buffer_ready = .True. else - ASSERT (N == b%N) + ASSERT (b%N == bsize) endif double precision :: time0, time1 diff --git a/src/davidson/davidson_parallel.irp.f b/src/davidson/davidson_parallel.irp.f index c615fae7..9e4402f6 100644 --- a/src/davidson/davidson_parallel.irp.f +++ b/src/davidson/davidson_parallel.irp.f @@ -359,7 +359,7 @@ subroutine davidson_collector(zmq_to_qp_run_socket, zmq_socket_pull, v0, s0, sze do while (more == 1) call davidson_pull_results(zmq_socket_pull, v_t, s_t, imin, imax, task_id) if (zmq_delete_task_async_send(zmq_to_qp_run_socket,task_id,sending) == -1) then - stop 'Unable to delete task' + stop 'davidson: Unable to delete task (send)' endif do j=1,N_st do i=imin,imax @@ -368,7 +368,7 @@ subroutine davidson_collector(zmq_to_qp_run_socket, zmq_socket_pull, v0, s0, sze enddo enddo if (zmq_delete_task_async_recv(zmq_to_qp_run_socket,more,sending) == -1) then - stop 'Unable to delete task' + stop 'davidson: Unable to delete task (recv)' endif end do deallocate(v_t,s_t) diff --git a/src/zmq/utils.irp.f b/src/zmq/utils.irp.f index 520be0d7..1205e09e 100644 --- a/src/zmq/utils.irp.f +++ b/src/zmq/utils.irp.f @@ -1127,6 +1127,7 @@ integer function zmq_delete_task_async_recv(zmq_to_qp_run_socket,more,sending) integer :: rc character*(512) :: message character*(64) :: reply + zmq_delete_task_async_recv = 0 if (.not.sending) return sending = .False. reply = '' @@ -1136,6 +1137,7 @@ integer function zmq_delete_task_async_recv(zmq_to_qp_run_socket,more,sending) else if (reply(16:19) == 'done') then more = 0 else + print *, reply(1:rc) zmq_delete_task_async_recv = -1 return endif