From 27369e5df8c2bb8a1c286bd4bb2607584345c1ce Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Tue, 21 Apr 2020 23:30:37 +0200 Subject: [PATCH 1/2] Commented ZMH_HWM --- src/cipsi/selection_buffer.irp.f | 1 - src/determinants/prune_wf.irp.f | 2 +- src/zmq/utils.irp.f | 18 +++++++++--------- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/src/cipsi/selection_buffer.irp.f b/src/cipsi/selection_buffer.irp.f index cfa3b902..17b6e9a9 100644 --- a/src/cipsi/selection_buffer.irp.f +++ b/src/cipsi/selection_buffer.irp.f @@ -198,7 +198,6 @@ subroutine make_selection_buffer_s2(b) deallocate(b%det) - print*,'n_d = ',n_d call i8sort(bit_tmp,iorder,n_d) do i=1,n_d diff --git a/src/determinants/prune_wf.irp.f b/src/determinants/prune_wf.irp.f index c3cd8d12..7399945f 100644 --- a/src/determinants/prune_wf.irp.f +++ b/src/determinants/prune_wf.irp.f @@ -6,7 +6,7 @@ BEGIN_PROVIDER [ logical, pruned, (N_det) ] pruned(:) = .False. - if (pruning == 0.d0) then + if (pruning <= 0.d0) then return endif diff --git a/src/zmq/utils.irp.f b/src/zmq/utils.irp.f index fc6f2ba6..6b7aad7f 100644 --- a/src/zmq/utils.irp.f +++ b/src/zmq/utils.irp.f @@ -241,10 +241,10 @@ IRP_ENDIF stop 'Unable to set ZMQ_LINGER on pull socket' endif - rc = f77_zmq_setsockopt(new_zmq_pull_socket,ZMQ_RCVHWM,10,4) - if (rc /= 0) then - stop 'Unable to set ZMQ_RCVHWM on pull socket' - endif +! rc = f77_zmq_setsockopt(new_zmq_pull_socket,ZMQ_RCVHWM,10,4) +! if (rc /= 0) then +! stop 'Unable to set ZMQ_RCVHWM on pull socket' +! endif integer :: icount @@ -316,10 +316,10 @@ IRP_ENDIF stop 'Unable to set ZMQ_LINGER on push socket' endif - rc = f77_zmq_setsockopt(new_zmq_push_socket,ZMQ_SNDHWM,1,4) - if (rc /= 0) then - stop 'Unable to set ZMQ_SNDHWM on push socket' - endif +! rc = f77_zmq_setsockopt(new_zmq_push_socket,ZMQ_SNDHWM,1,4) +! if (rc /= 0) then +! stop 'Unable to set ZMQ_SNDHWM on push socket' +! endif rc = f77_zmq_setsockopt(new_zmq_push_socket,ZMQ_IMMEDIATE,1,4) if (rc /= 0) then @@ -585,7 +585,7 @@ subroutine end_parallel_job(zmq_to_qp_run_socket,zmq_socket_pull,name_in) stop 'Wrong end of job' endif - do i=3600,1,-1 + do i=1200,1,-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, message, 512, 0) if (trim(message(1:13)) == 'error waiting') then From f382a275a7d8bb62168ce9a6c97f81e08db20301 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Wed, 22 Apr 2020 01:56:00 +0200 Subject: [PATCH 2/2] Improved selection dynamic weights --- src/cipsi/selection.irp.f | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/cipsi/selection.irp.f b/src/cipsi/selection.irp.f index a4266497..e488b07c 100644 --- a/src/cipsi/selection.irp.f +++ b/src/cipsi/selection.irp.f @@ -32,7 +32,7 @@ subroutine update_pt2_and_variance_weights(pt2, variance, norm, N_st) double precision :: avg, rpt2(N_st), element, dt, x integer :: k integer, save :: i_iter=0 - integer, parameter :: i_itermax = 3 + integer, parameter :: i_itermax = 1 double precision, allocatable, save :: memo_variance(:,:), memo_pt2(:,:) if (i_iter == 0) then @@ -46,7 +46,7 @@ subroutine update_pt2_and_variance_weights(pt2, variance, norm, N_st) i_iter = 1 endif - dt = 4.d0 + dt = 0.5d0 do k=1,N_st rpt2(k) = pt2(k)/(1.d0 + norm(k)) @@ -58,7 +58,7 @@ subroutine update_pt2_and_variance_weights(pt2, variance, norm, N_st) element = min(1.5d0 , element) element = max(0.5d0 , element) memo_pt2(k,i_iter) = element - pt2_match_weight(k) = product(memo_pt2(k,:)) + pt2_match_weight(k) *= product(memo_pt2(k,:)) enddo avg = sum(variance(1:N_st)) / dble(N_st) + 1.d-32 ! Avoid future division by zero @@ -67,7 +67,7 @@ subroutine update_pt2_and_variance_weights(pt2, variance, norm, N_st) element = min(1.5d0 , element) element = max(0.5d0 , element) memo_variance(k,i_iter) = element - variance_match_weight(k) = product(memo_variance(k,:)) + variance_match_weight(k) *= product(memo_variance(k,:)) enddo threshold_davidson_pt2 = min(1.d-6, &