From 52b5283fe6813b955b15440370e85635439108aa Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Wed, 19 Sep 2018 09:25:32 +0200 Subject: [PATCH] Minor changes --- plugins/Full_CI_ZMQ/pt2_stoch_routines.irp.f | 3 ++- plugins/Full_CI_ZMQ/zmq_selection.irp.f | 6 +++--- src/Determinants/density_matrix.irp.f | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/plugins/Full_CI_ZMQ/pt2_stoch_routines.irp.f b/plugins/Full_CI_ZMQ/pt2_stoch_routines.irp.f index aba1e587..f3c8d835 100644 --- a/plugins/Full_CI_ZMQ/pt2_stoch_routines.irp.f +++ b/plugins/Full_CI_ZMQ/pt2_stoch_routines.irp.f @@ -16,6 +16,7 @@ END_PROVIDER integer :: e e = elec_num - n_core_orb * 2 pt2_n_tasks_max = 1+min((e*(e-1))/2, int(dsqrt(dble(N_det_generators)))/10) + pt2_n_tasks_max = 1 do i=1,N_det_generators if (maxval(dabs(psi_coef_sorted_gen(i,1:N_states))) > 0.001d0) then pt2_F(i) = pt2_n_tasks_max @@ -178,7 +179,7 @@ subroutine ZMQ_pt2(E, pt2,relative_error, error) do j=1,pt2_F(pt2_J(i)) write(task(ipos:ipos+20),'(I9,1X,I9,''|'')') j, pt2_J(i) ipos += 20 - if (ipos > len(task)-20) then + if (ipos > 100000-20) then if (add_task_to_taskserver(zmq_to_qp_run_socket,trim(task(1:ipos))) == -1) then stop 'Unable to add task to task server' endif diff --git a/plugins/Full_CI_ZMQ/zmq_selection.irp.f b/plugins/Full_CI_ZMQ/zmq_selection.irp.f index 397bee82..d21d0a27 100644 --- a/plugins/Full_CI_ZMQ/zmq_selection.irp.f +++ b/plugins/Full_CI_ZMQ/zmq_selection.irp.f @@ -52,16 +52,16 @@ subroutine ZMQ_selection(N_in, pt2) endif integer, external :: add_task_to_taskserver - character(len=64000) :: task + character(len=100000) :: task integer :: j,k,ipos ipos=1 task = ' ' - do i= 1, N_det_generators + do i= 1, N_det_generators do j=1,pt2_F(pt2_J(i)) write(task(ipos:ipos+30),'(I9,1X,I9,1X,I9,''|'')') j, pt2_J(i), N ipos += 30 - if (ipos > 63970) then + if (ipos > 100000-30) then if (add_task_to_taskserver(zmq_to_qp_run_socket,trim(task(1:ipos))) == -1) then stop 'Unable to add task to task server' endif diff --git a/src/Determinants/density_matrix.irp.f b/src/Determinants/density_matrix.irp.f index c7afebc6..0511b455 100644 --- a/src/Determinants/density_matrix.irp.f +++ b/src/Determinants/density_matrix.irp.f @@ -398,7 +398,7 @@ BEGIN_PROVIDER [ double precision, c0_weight, (N_states) ] do i=1,N_states c0_weight(i) = 1.d-31 c = maxval(psi_coef(:,i) * psi_coef(:,i)) - c0_weight(i) = 1.d0/c + c0_weight(i) = 1.d0/(c+1.d-20) c0_weight(i) = min(c0_weight(i), 100.d0) enddo if (mpi_master) then