From 9ef173e0585d5d08cf0839f1cc136eefa82b5374 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Wed, 18 Jan 2017 16:06:23 +0100 Subject: [PATCH] Amazing new things --- plugins/Full_CI_ZMQ/fci_routines.irp.f | 4 ++++ plugins/Full_CI_ZMQ/pt2_stoch.irp.f | 2 +- plugins/Full_CI_ZMQ/pt2_stoch_routines.irp.f | 7 +++++-- plugins/Full_CI_ZMQ/target_pt2_ratio_zmq.irp.f | 4 ++++ plugins/mrcc_selected/ezfio_interface.irp.f | 2 +- src/Davidson/EZFIO.cfg | 6 ++++++ src/Davidson/diagonalization_hs2.irp.f | 7 +++++-- src/Integrals_Bielec/mo_bi_integrals.irp.f | 2 ++ 8 files changed, 28 insertions(+), 6 deletions(-) diff --git a/plugins/Full_CI_ZMQ/fci_routines.irp.f b/plugins/Full_CI_ZMQ/fci_routines.irp.f index 6eaabbd7..913bb0e8 100644 --- a/plugins/Full_CI_ZMQ/fci_routines.irp.f +++ b/plugins/Full_CI_ZMQ/fci_routines.irp.f @@ -42,9 +42,13 @@ subroutine ZMQ_selection(N_in, pt2) endif !$OMP END PARALLEL call end_parallel_job(zmq_to_qp_run_socket, 'selection') + do i=1,N_states + print *, 'E+PT2(', i, ') = ', ci_electronic_energy(i) + pt2(i) + enddo if (N_in > 0) then call fill_H_apply_buffer_no_selection(b%cur,b%det,N_int,0) !!! PAS DE ROBIN call copy_H_apply_buffer_to_wf() + call save_wavefunction endif end subroutine diff --git a/plugins/Full_CI_ZMQ/pt2_stoch.irp.f b/plugins/Full_CI_ZMQ/pt2_stoch.irp.f index a2ee5e20..71ebf357 100644 --- a/plugins/Full_CI_ZMQ/pt2_stoch.irp.f +++ b/plugins/Full_CI_ZMQ/pt2_stoch.irp.f @@ -28,7 +28,7 @@ subroutine run threshold_selectors = 1.d0 threshold_generators = 1d0 - relative_error = 1.d-3 + relative_error = 1.d-6 call ZMQ_pt2(pt2, relative_error) print *, 'Final step' print *, 'N_det = ', N_det diff --git a/plugins/Full_CI_ZMQ/pt2_stoch_routines.irp.f b/plugins/Full_CI_ZMQ/pt2_stoch_routines.irp.f index 47651e22..6423a1b1 100644 --- a/plugins/Full_CI_ZMQ/pt2_stoch_routines.irp.f +++ b/plugins/Full_CI_ZMQ/pt2_stoch_routines.irp.f @@ -151,7 +151,8 @@ subroutine pt2_collector(b, tbc, comb, Ncomb, computed, pt2_detail, sumabove, su integer, allocatable :: task_id(:) integer :: done, Nindex integer, allocatable :: index(:) - double precision :: time, time0, timeLast + double precision, save :: time0 = -1.d0 + double precision :: time, timeLast double precision, external :: omp_get_wtime integer :: tooth, firstTBDcomb, orgTBDcomb integer, allocatable :: parts_to_get(:) @@ -175,7 +176,9 @@ subroutine pt2_collector(b, tbc, comb, Ncomb, computed, pt2_detail, sumabove, su allocate(val(b%N), det(N_int, 2, b%N), task_id(N_det), index(N_det)) done = 0 more = 1 - time0 = omp_get_wtime() + if (time0 < 0.d0) then + time0 = omp_get_wtime() + endif timeLast = time0 pullLoop : do while (more == 1) diff --git a/plugins/Full_CI_ZMQ/target_pt2_ratio_zmq.irp.f b/plugins/Full_CI_ZMQ/target_pt2_ratio_zmq.irp.f index 77bbab03..04a1d9d4 100644 --- a/plugins/Full_CI_ZMQ/target_pt2_ratio_zmq.irp.f +++ b/plugins/Full_CI_ZMQ/target_pt2_ratio_zmq.irp.f @@ -78,6 +78,9 @@ program fci_zmq Nmin = N_det else Nmax = N_det + psi_coef_ref = psi_coef + psi_det_ref = psi_det + TOUCH psi_det psi_coef endif N_det = Nmin + (Nmax-Nmin)/2 print *, '-----' @@ -85,6 +88,7 @@ program fci_zmq print *, 'Ratio : ', ratio, ' ~ ', var_pt2_ratio print *, 'N_det = ', N_det print *, 'E = ', CI_energy(1) + call save_wavefunction enddo call ZMQ_selection(0, pt2) print *, '------' diff --git a/plugins/mrcc_selected/ezfio_interface.irp.f b/plugins/mrcc_selected/ezfio_interface.irp.f index 062af449..47e7cea5 100644 --- a/plugins/mrcc_selected/ezfio_interface.irp.f +++ b/plugins/mrcc_selected/ezfio_interface.irp.f @@ -1,6 +1,6 @@ ! DO NOT MODIFY BY HAND ! Created by $QP_ROOT/scripts/ezfio_interface/ei_handler.py -! from file /home/scemama/quantum_package/src/mrcc_selected/EZFIO.cfg +! from file /ccc/work/cont003/gen1738/scemama/quantum_package/src/mrcc_selected/EZFIO.cfg BEGIN_PROVIDER [ double precision, thresh_dressed_ci ] diff --git a/src/Davidson/EZFIO.cfg b/src/Davidson/EZFIO.cfg index 7724400f..20113732 100644 --- a/src/Davidson/EZFIO.cfg +++ b/src/Davidson/EZFIO.cfg @@ -28,3 +28,9 @@ doc: If true, disk space is used to store the vectors default: False interface: ezfio,provider,ocaml +[distributed_davidson] +type: logical +doc: If true, use the distributed algorithm +default: False +interface: ezfio,provider,ocaml + diff --git a/src/Davidson/diagonalization_hs2.irp.f b/src/Davidson/diagonalization_hs2.irp.f index dccc8ee5..1901525b 100644 --- a/src/Davidson/diagonalization_hs2.irp.f +++ b/src/Davidson/diagonalization_hs2.irp.f @@ -223,8 +223,11 @@ subroutine davidson_diag_hjj_sjj(dets_in,u_in,H_jj,S2_jj,energies,dim_in,sze,N_s ! ----------------------------------------- -! call H_S2_u_0_nstates_zmq(W(1,shift+1),S(1,shift+1),U(1,shift+1),H_jj,S2_jj,sze,dets_in,Nint,N_st_diag,sze_8) - call H_S2_u_0_nstates(W(1,shift+1),S(1,shift+1),U(1,shift+1),H_jj,S2_jj,sze,dets_in,Nint,N_st_diag,sze_8) + if (distributed_davidson) then + call H_S2_u_0_nstates_zmq(W(1,shift+1),S(1,shift+1),U(1,shift+1),H_jj,S2_jj,sze,dets_in,Nint,N_st_diag,sze_8) + else + call H_S2_u_0_nstates(W(1,shift+1),S(1,shift+1),U(1,shift+1),H_jj,S2_jj,sze,dets_in,Nint,N_st_diag,sze_8) + endif ! Compute h_kl = = diff --git a/src/Integrals_Bielec/mo_bi_integrals.irp.f b/src/Integrals_Bielec/mo_bi_integrals.irp.f index b56f3518..68c44210 100644 --- a/src/Integrals_Bielec/mo_bi_integrals.irp.f +++ b/src/Integrals_Bielec/mo_bi_integrals.irp.f @@ -35,6 +35,8 @@ BEGIN_PROVIDER [ logical, mo_bielec_integrals_in_map ] call map_load_from_disk(trim(ezfio_filename)//'/work/mo_ints',mo_integrals_map) print*, 'MO integrals provided' return + else + PROVIDE ao_bielec_integrals_in_map endif if(no_vvvv_integrals)then