From c9cf03479a8e061e23a7f6d55733c30278897fe4 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Thu, 20 Apr 2017 18:38:31 +0200 Subject: [PATCH] Merge some changes --- config/gfortran_avx.cfg | 2 +- configure | 2 +- ocaml/create_git_sha1.sh | 2 +- plugins/Full_CI/full_ci.irp.f | 5 +++++ plugins/Full_CI_ZMQ/selection.irp.f | 13 ++++++------- plugins/MRPT_Utils/new_way_second_order_coef.irp.f | 7 +++++-- scripts/compilation/qp_create_ninja.py | 2 +- scripts/module/module_handler.py | 2 +- src/Davidson/diagonalization.irp.f | 2 +- 9 files changed, 22 insertions(+), 15 deletions(-) diff --git a/config/gfortran_avx.cfg b/config/gfortran_avx.cfg index f065d133..7cbb0dc2 100644 --- a/config/gfortran_avx.cfg +++ b/config/gfortran_avx.cfg @@ -10,7 +10,7 @@ # # [COMMON] -FC : gfortran -ffree-line-length-none -I . -mavx -g +FC : gfortran -ffree-line-length-none -I . -mavx -g LAPACK_LIB : -llapack -lblas IRPF90 : irpf90 IRPF90_FLAGS : --ninja --align=32 diff --git a/configure b/configure index 86fff79f..c45569c2 100755 --- a/configure +++ b/configure @@ -102,7 +102,7 @@ curl = Info( default_path=join(QP_ROOT_BIN, "curl")) zlib = Info( - url='http://www.zlib.net/fossils/zlib-1.2.10.tar.gz', + url='http://www.zlib.net/fossils/zlib-1.2.11.tar.gz', description=' zlib', default_path=join(QP_ROOT_LIB, "libz.a")) diff --git a/ocaml/create_git_sha1.sh b/ocaml/create_git_sha1.sh index 7b47e96f..f1fb7fa6 100755 --- a/ocaml/create_git_sha1.sh +++ b/ocaml/create_git_sha1.sh @@ -2,7 +2,7 @@ SHA1=$(git log -1 | head -1 | cut -d ' ' -f 2) DATE=$(git log -1 | grep Date | cut -d ':' -f 2-) -MESSAGE=$(git log -1 | tail -1) +MESSAGE=$(git log -1 | tail -1 | sed 's/"/\\"/g') cat << EOF > Git.ml open Core.Std let sha1 = "$SHA1" |> String.strip diff --git a/plugins/Full_CI/full_ci.irp.f b/plugins/Full_CI/full_ci.irp.f index a53064b4..0d816f3e 100644 --- a/plugins/Full_CI/full_ci.irp.f +++ b/plugins/Full_CI/full_ci.irp.f @@ -3,6 +3,11 @@ program full_ci integer :: i,k + print *, '====================================================================' + print *, 'This program is slow. Consider using the Full_CI_ZMQ module instead.' + print *, '====================================================================' + call sleep(2) + double precision, allocatable :: pt2(:), norm_pert(:), H_pert_diag(:) integer :: N_st, degree N_st = N_states diff --git a/plugins/Full_CI_ZMQ/selection.irp.f b/plugins/Full_CI_ZMQ/selection.irp.f index 47c8fa26..c277cf58 100644 --- a/plugins/Full_CI_ZMQ/selection.irp.f +++ b/plugins/Full_CI_ZMQ/selection.irp.f @@ -50,7 +50,7 @@ subroutine assert(cond, msg) print *, "assert failed: "//msg stop end if -end +end subroutine subroutine get_mask_phase(det, phasemask) @@ -72,7 +72,7 @@ subroutine get_mask_phase(det, phasemask) end do end do end do -end +end subroutine subroutine select_connected(i_generator,E0,pt2,b,subset) @@ -98,9 +98,9 @@ subroutine select_connected(i_generator,E0,pt2,b,subset) particle_mask(k,2) = iand(generators_bitmask(k,2,s_part,l), not(psi_det_generators(k,2,i_generator)) ) enddo - call select_doubles(i_generator,hole_mask,particle_mask,fock_diag_tmp,E0,pt2,b,subset) + call select_singles_and_doubles(i_generator,hole_mask,particle_mask,fock_diag_tmp,E0,pt2,b,subset) enddo -end +end subroutine double precision function get_phase_bi(phasemask, s1, s2, h1, p1, h2, p2) @@ -271,7 +271,7 @@ subroutine get_m0(gen, phasemask, bannedOrb, vect, mask, h, p, sp, coefs) end do end -subroutine select_doubles(i_generator,hole_mask,particle_mask,fock_diag_tmp,E0,pt2,buf,subset) +subroutine select_singles_and_doubles(i_generator,hole_mask,particle_mask,fock_diag_tmp,E0,pt2,buf,subset) use bitmasks use selection_types implicit none @@ -373,7 +373,6 @@ subroutine select_doubles(i_generator,hole_mask,particle_mask,fock_diag_tmp,E0,p integer :: nb_count do s1=1,2 do i1=N_holes(s1),1,-1 ! Generate low excitations first - h1 = hole_list(i1,s1) call apply_hole(psi_det_generators(1,1,i_generator), s1,h1, pmask, ok, N_int) @@ -491,7 +490,7 @@ subroutine select_doubles(i_generator,hole_mask,particle_mask,fock_diag_tmp,E0,p enddo enddo enddo -end +end subroutine diff --git a/plugins/MRPT_Utils/new_way_second_order_coef.irp.f b/plugins/MRPT_Utils/new_way_second_order_coef.irp.f index 781be55b..ce3a74c8 100644 --- a/plugins/MRPT_Utils/new_way_second_order_coef.irp.f +++ b/plugins/MRPT_Utils/new_way_second_order_coef.irp.f @@ -210,6 +210,10 @@ subroutine give_2h1p_contrib_sec_order(matrix_2h1p) ! < det_tmp | H | det_tmp_bis > = F_{aorb,borb} hab = (fock_operator_local(aorb,borb,kspin) ) * phase + if(hab /= hab)then ! check NaN + print*, '1' + stop + endif ! < jdet | H | det_tmp_bis > = phase * (ir|cv) call get_double_excitation(det_tmp_bis,psi_det(1,1,idx(jdet)),exc,phase,N_int) if(ispin == jspin)then @@ -251,8 +255,7 @@ subroutine give_2h1p_contrib_sec_order(matrix_2h1p) call get_mono_excitation(det_tmp,det_tmp_bis,exc,phase,N_int) ! ! < det_tmp | H | det_tmp_bis > = F_{aorb,borb} hab = fock_operator_local(aorb,borb,kspin) * phase -! if(isnan(hab))then - if(hab /= hab)then + if(hab /= hab)then ! check NaN print*, '2' stop endif diff --git a/scripts/compilation/qp_create_ninja.py b/scripts/compilation/qp_create_ninja.py index b495019a..780a7a91 100755 --- a/scripts/compilation/qp_create_ninja.py +++ b/scripts/compilation/qp_create_ninja.py @@ -476,7 +476,7 @@ def ninja_irpf90_make_build(path_module, l_needed_molule, d_irp): # ~#~#~#~#~#~ # l_creation = [join(path_module.abs, i) - for i in ["irpf90.make", "irpf90_entities", "tags", + for i in ["irpf90_entities", "tags", "IRPF90_temp/build.ninja"]] str_creation = " ".join(l_creation) diff --git a/scripts/module/module_handler.py b/scripts/module/module_handler.py index 0667c376..021fa27b 100755 --- a/scripts/module/module_handler.py +++ b/scripts/module/module_handler.py @@ -298,7 +298,7 @@ if __name__ == '__main__': # Don't update if we are not in the main repository from is_master_repository import is_master_repository if not is_master_repository: - sys.exit() + sys.exit(0) path = os.path.join(module_abs, ".gitignore") diff --git a/src/Davidson/diagonalization.irp.f b/src/Davidson/diagonalization.irp.f index 51728851..e4d51198 100644 --- a/src/Davidson/diagonalization.irp.f +++ b/src/Davidson/diagonalization.irp.f @@ -354,7 +354,7 @@ subroutine davidson_diag_hjj(dets_in,u_in,H_jj,energies,dim_in,sze,N_st,N_st_dia write(iunit,'(A)') trim(write_buffer) write_buffer = ' Iter' do i=1,N_st - write_buffer = trim(write_buffer)//' Energy Residual' + write_buffer = trim(write_buffer)//' Energy Residual' enddo write(iunit,'(A)') trim(write_buffer) write_buffer = '===== '