diff --git a/config/gfortran_avx.cfg b/config/gfortran_avx.cfg index 80bbbec9..f065d133 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 @@ -35,7 +35,7 @@ OPENMP : 1 ; Append OpenMP flags # -ffast-math and the Fortran-specific # -fno-protect-parens and -fstack-arrays. [OPT] -FCFLAGS : -Ofast +FCFLAGS : -Ofast -march=native # Profiling flags ################# diff --git a/plugins/Full_CI_ZMQ/energy.irp.f b/plugins/Full_CI_ZMQ/energy.irp.f index 7b7cc75b..5f9baf46 100644 --- a/plugins/Full_CI_ZMQ/energy.irp.f +++ b/plugins/Full_CI_ZMQ/energy.irp.f @@ -12,7 +12,7 @@ BEGIN_PROVIDER [ double precision, pt2_E0_denominator, (N_states) ] ! E0 in the denominator of the PT2 END_DOC if (initialize_pt2_E0_denominator) then - pt2_E0_denominator(1:N_states) = CI_electronic_energy(1:N_states) + pt2_E0_denominator(1:N_states) = psi_energy(1:N_states) ! pt2_E0_denominator(1:N_states) = HF_energy - nuclear_repulsion ! pt2_E0_denominator(1:N_states) = barycentric_electronic_energy(1:N_states) call write_double(6,pt2_E0_denominator(1)+nuclear_repulsion, 'PT2 Energy denominator') diff --git a/plugins/Full_CI_ZMQ/pt2_stoch.irp.f b/plugins/Full_CI_ZMQ/pt2_stoch.irp.f index 8ffd8e60..49902696 100644 --- a/plugins/Full_CI_ZMQ/pt2_stoch.irp.f +++ b/plugins/Full_CI_ZMQ/pt2_stoch.irp.f @@ -1,8 +1,7 @@ program pt2_stoch implicit none - initialize_pt2_E0_denominator = .False. read_wf = .True. - SOFT_TOUCH initialize_pt2_E0_denominator read_wf + SOFT_TOUCH read_wf PROVIDE mo_bielec_integrals_in_map call run end @@ -19,17 +18,12 @@ subroutine run double precision :: E_CI_before(N_states), relative_error - if (.true.) then - call ezfio_get_full_ci_zmq_energy(E_CI_before(1)) - pt2_e0_denominator(:) = E_CI_before(1) - nuclear_repulsion - SOFT_TOUCH pt2_e0_denominator read_wf - endif allocate (pt2(N_states)) pt2 = 0.d0 threshold_selectors = 1.d0 threshold_generators = 1d0 - relative_error = 1.d-6 + relative_error = 1.d-4 call ZMQ_pt2(pt2, relative_error) print *, 'Final step' print *, 'N_det = ', N_det diff --git a/src/Determinants/slater_rules.irp.f b/src/Determinants/slater_rules.irp.f index 62493ab9..a3a647ac 100644 --- a/src/Determinants/slater_rules.irp.f +++ b/src/Determinants/slater_rules.irp.f @@ -18,24 +18,33 @@ subroutine get_excitation_degree(key1,key2,degree,Nint) select case (Nint) case (1) - xorvec(1:2) = xor( key1(1:2), key2(1:2)) + xorvec(1) = xor( key1(1), key2(1)) + xorvec(2) = xor( key1(2), key2(2)) degree = sum(popcnt(xorvec(1:2))) case (2) - xorvec(1:4) = xor( key1(1:4), key2(1:4)) + xorvec(1) = xor( key1(1), key2(1)) + xorvec(2) = xor( key1(2), key2(2)) + xorvec(3) = xor( key1(3), key2(3)) + xorvec(4) = xor( key1(4), key2(4)) degree = sum(popcnt(xorvec(1:4))) case (3) - xorvec(1:6) = xor( key1(1:6), key2(1:6)) + do l=1,6 + xorvec(l) = xor( key1(l), key2(l)) + enddo degree = sum(popcnt(xorvec(1:6))) case (4) - xorvec(1:8) = xor( key1(1:8), key2(1:8)) + do l=1,8 + xorvec(l) = xor( key1(l), key2(l)) + enddo degree = sum(popcnt(xorvec(1:8))) case default - l = ishft(Nint,1) - xorvec(1:l) = xor( key1(1:l), key2(1:l)) + do l=1,ishft(Nint,1) + xorvec(l) = xor( key1(l), key2(l)) + enddo degree = sum(popcnt(xorvec(1:l))) end select @@ -2254,19 +2263,27 @@ subroutine get_excitation_degree_spin(key1,key2,degree,Nint) degree = popcnt(xorvec(1)) case (2) - xorvec(1:2) = xor( key1(1:2), key2(1:2)) - degree = sum(popcnt(xorvec(1:2))) + xorvec(1) = xor( key1(1), key2(1)) + xorvec(2) = xor( key1(2), key2(2)) + degree = popcnt(xorvec(1))+popcnt(xorvec(2)) case (3) - xorvec(1:3) = xor( key1(1:3), key2(1:3)) + xorvec(1) = xor( key1(1), key2(1)) + xorvec(2) = xor( key1(2), key2(2)) + xorvec(3) = xor( key1(3), key2(3)) degree = sum(popcnt(xorvec(1:3))) case (4) - xorvec(1:4) = xor( key1(1:4), key2(1:4)) + xorvec(1) = xor( key1(1), key2(1)) + xorvec(2) = xor( key1(2), key2(2)) + xorvec(3) = xor( key1(3), key2(3)) + xorvec(4) = xor( key1(4), key2(4)) degree = sum(popcnt(xorvec(1:4))) case default - xorvec(1:Nint) = xor( key1(1:Nint), key2(1:Nint)) + do l=1,N_int + xorvec(l) = xor( key1(l), key2(l)) + enddo degree = sum(popcnt(xorvec(1:Nint))) end select