From f28bc742a86ef75c4a7805e30e3ab95ce037e417 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Fri, 21 Dec 2018 01:02:07 +0100 Subject: [PATCH] Fixing travis --- config/travis.cfg | 4 +- src/ao_basis/aos_transp.irp.f | 2 +- .../density_matrices_in_real_space.irp.f | 8 +- src/dft_utils_one_body/exc_sr_lda.irp.f | 156 +++++++++--------- .../mo_bi_integrals_erf.irp.f | 2 +- 5 files changed, 87 insertions(+), 85 deletions(-) diff --git a/config/travis.cfg b/config/travis.cfg index 9ee8742e..3566f97b 100644 --- a/config/travis.cfg +++ b/config/travis.cfg @@ -35,7 +35,7 @@ OPENMP : 1 ; Append OpenMP flags # -ffast-math and the Fortran-specific # -fno-protect-parens and -fstack-arrays. [OPT] -FCFLAGS : -Ofast -march=native -fimplicit-none +FCFLAGS : -Ofast -march=native # Profiling flags @@ -53,7 +53,7 @@ FCFLAGS : -Ofast -fimplicit-none # -g : Extra debugging information # [DEBUG] -FCFLAGS : -Ofast -fcheck=all -g -Waliasing -Wampersand -Wconversion -Wsurprising -Wintrinsics-std -Wno-tabs -Wintrinsic-shadow -Wline-truncation -Wreal-q-constant -fimplicit-none +FCFLAGS : -Ofast -fcheck=all -g -Waliasing -Wampersand -Wconversion -Wsurprising -Wintrinsics-std -Wno-tabs -Wintrinsic-shadow -Wline-truncation -Wreal-q-constant # OpenMP flags diff --git a/src/ao_basis/aos_transp.irp.f b/src/ao_basis/aos_transp.irp.f index f88938a2..ae6193bf 100644 --- a/src/ao_basis/aos_transp.irp.f +++ b/src/ao_basis/aos_transp.irp.f @@ -30,7 +30,7 @@ BEGIN_PROVIDER [double precision, ao_expo_ordered_transp_per_nucl, (ao_prim_num_ END_PROVIDER -BEGIN_PROVIDER [ double precision, ao_power_ordered_transp_per_nucl, (3,N_AOs_max,nucl_num) ] +BEGIN_PROVIDER [ integer, ao_power_ordered_transp_per_nucl, (3,N_AOs_max,nucl_num) ] implicit none integer :: i,j,k,l do i = 1, nucl_num diff --git a/src/dft_utils_on_grid/density_matrices_in_real_space.irp.f b/src/dft_utils_on_grid/density_matrices_in_real_space.irp.f index ed632ca8..888573cd 100644 --- a/src/dft_utils_on_grid/density_matrices_in_real_space.irp.f +++ b/src/dft_utils_on_grid/density_matrices_in_real_space.irp.f @@ -121,10 +121,12 @@ end r(2) = grid_points_per_atom(2,l,k,j) r(3) = grid_points_per_atom(3,l,k,j) - double precision :: dm_a,dm_b + double precision :: dm_a(N_states),dm_b(N_states) call dm_dft_alpha_beta_at_r(r,dm_a,dm_b) - one_body_dm_mo_alpha_at_grid_points(l,k,j,1) = dm_a - one_body_dm_mo_beta_at_grid_points(l,k,j,1) = dm_b + do istate=1,N_states + one_body_dm_mo_alpha_at_grid_points(l,k,j,istate) = dm_a(istate) + one_body_dm_mo_beta_at_grid_points(l,k,j,istate) = dm_b(istate) + enddo enddo enddo diff --git a/src/dft_utils_one_body/exc_sr_lda.irp.f b/src/dft_utils_one_body/exc_sr_lda.irp.f index 36162b93..8dad0e18 100644 --- a/src/dft_utils_one_body/exc_sr_lda.irp.f +++ b/src/dft_utils_one_body/exc_sr_lda.irp.f @@ -339,84 +339,84 @@ end subroutine ecorrlr(rs,z,mu,eclr) -!cc Hartree atomic units used -!cc for given density parameter rs, spin polarization z -!cc and cutoff parameter mu -!cc gives the correlation energy of the LR gas -!cc => eclr - implicit none - double precision rs,z,mu,eclr,ec,ecd,ecz - double precision pi,alpha,cf,phi - double precision g0f,dpol,d2anti,d3anti,Qrpa - double precision coe2,coe3,coe4,coe5 - double precision a1,a2,a3,a4,b0 - double precision q1a,q2a,q3a,t1a,t2a,t3a,adib -!SCD - double precision ecdd,eczd -!SCF - pi=dacos(-1.d0) - alpha=(4.d0/9.d0/pi)**(1.d0/3.d0) - cf=1.d0/alpha - - phi=((1.d0+z)**(2.d0/3.d0)+(1.d0-z)**(2.d0/3.d0))/2.d0 -!c parameters from the fit - adib = 0.784949d0 - q1a = -0.388d0 - q2a = 0.676d0 - q3a = 0.547d0 - t1a = -4.95d0 - t2a = 1.d0 - t3a = 0.31d0 - - b0=adib*rs - - d2anti=(q1a*rs+q2a*rs**2)*exp(-abs(q3a)*rs)/rs**2 - d3anti=(t1a*rs+t2a*rs**2)*exp(-abs(t3a)*rs)/rs**3 - - coe2=-3.d0/8.d0/rs**3*(1.d0-z**2)*(g0f(rs)-0.5d0) - - coe3=-(1.d0-z**2)*g0f(rs)/(sqrt(2.d0*pi)*rs**3) - - if(abs(z).eq.1.d0) then - - coe4=-9.d0/64.d0/rs**3*(dpol(rs) -cf**2*2d0**(5.d0/3.d0)/5.d0/rs**2) - coe5=-9.d0/40.d0/(sqrt(2.d0*pi)*rs**3)*dpol(rs) - - else - - coe4=-9.d0/64.d0/rs**3*(((1.d0+z)/2.d0)**2* & - dpol(rs*(2d0/(1.d0+z))**(1.d0/3.d0))+((1.d0-z)/2.d0)**2 & - *dpol(rs*(2.d0/(1.d0-z))**(1.d0/3.d0))+ & - (1.-z**2)*d2anti-cf**2/10.d0*((1.d0+z)**(8.d0/3.d0) & - +(1.-z)**(8.d0/3.d0))/rs**2) - - coe5=-9.d0/40.d0/(sqrt(2.d0*pi)*rs**3)*(((1.d0+z)/2.d0)**2 & - *dpol(rs*(2.d0/(1.d0+z))**(1.d0/3.d0))+((1.d0-z)/2.d0)**2 & - *dpol(rs*(2.d0/(1.d0-z))**(1.d0/3.d0))+(1.d0-z**2)* & - d3anti) - end if - -! call ecPW(rs,z,ec,ecd,ecz) -!SCD - call ecPW(rs,z,ec,ecd,ecz,ecdd,eczd) -!SCF - - a1=4.d0*b0**6*coe3+b0**8*coe5 - a2=4.d0*b0**6*coe2+b0**8*coe4+6.d0*b0**4*ec - a3=b0**8*coe3 - a4=b0**6*(b0**2*coe2+4.d0*ec) - - if(mu*sqrt(rs)/phi.lt.0.d0)then - print*,'phi',phi - print*,'mu ',mu - print*,'rs ',rs - pause - endif - eclr=(phi**3*Qrpa(mu*sqrt(rs)/phi)+a1*mu**3+a2*mu**4+a3*mu**5+ & - a4*mu**6+b0**8*mu**8*ec)/((1.d0+b0**2*mu**2)**4) - - return - end + !cc Hartree atomic units used + !cc for given density parameter rs, spin polarization z + !cc and cutoff parameter mu + !cc gives the correlation energy of the LR gas + !cc => eclr + implicit none + double precision rs,z,mu,eclr,ec,ecd,ecz + double precision pi,alpha,cf,phi + double precision g0f,dpol,d2anti,d3anti,Qrpa + double precision coe2,coe3,coe4,coe5 + double precision a1,a2,a3,a4,b0 + double precision q1a,q2a,q3a,t1a,t2a,t3a,adib + !SCD + double precision ecdd,eczd + !SCF + pi=dacos(-1.d0) + alpha=(4.d0/9.d0/pi)**(1.d0/3.d0) + cf=1.d0/alpha + + phi=((1.d0+z)**(2.d0/3.d0)+(1.d0-z)**(2.d0/3.d0))/2.d0 + !c parameters from the fit + adib = 0.784949d0 + q1a = -0.388d0 + q2a = 0.676d0 + q3a = 0.547d0 + t1a = -4.95d0 + t2a = 1.d0 + t3a = 0.31d0 + + b0=adib*rs + + d2anti=(q1a*rs+q2a*rs**2)*exp(-abs(q3a)*rs)/rs**2 + d3anti=(t1a*rs+t2a*rs**2)*exp(-abs(t3a)*rs)/rs**3 + + coe2=-3.d0/8.d0/rs**3*(1.d0-z**2)*(g0f(rs)-0.5d0) + + coe3=-(1.d0-z**2)*g0f(rs)/(sqrt(2.d0*pi)*rs**3) + + if(abs(z).eq.1.d0) then + + coe4=-9.d0/64.d0/rs**3*(dpol(rs) -cf**2*2d0**(5.d0/3.d0)/5.d0/rs**2) + coe5=-9.d0/40.d0/(sqrt(2.d0*pi)*rs**3)*dpol(rs) + + else + + coe4=-9.d0/64.d0/rs**3*(((1.d0+z)/2.d0)**2* & + dpol(rs*(2d0/(1.d0+z))**(1.d0/3.d0))+((1.d0-z)/2.d0)**2 & + *dpol(rs*(2.d0/(1.d0-z))**(1.d0/3.d0))+ & + (1.-z**2)*d2anti-cf**2/10.d0*((1.d0+z)**(8.d0/3.d0) & + +(1.-z)**(8.d0/3.d0))/rs**2) + + coe5=-9.d0/40.d0/(sqrt(2.d0*pi)*rs**3)*(((1.d0+z)/2.d0)**2 & + *dpol(rs*(2.d0/(1.d0+z))**(1.d0/3.d0))+((1.d0-z)/2.d0)**2 & + *dpol(rs*(2.d0/(1.d0-z))**(1.d0/3.d0))+(1.d0-z**2)* & + d3anti) + end if + + ! call ecPW(rs,z,ec,ecd,ecz) + !SCD + call ecPW(rs,z,ec,ecd,ecz,ecdd,eczd) + !SCF + + a1=4.d0*b0**6*coe3+b0**8*coe5 + a2=4.d0*b0**6*coe2+b0**8*coe4+6.d0*b0**4*ec + a3=b0**8*coe3 + a4=b0**6*(b0**2*coe2+4.d0*ec) + + if(mu*sqrt(rs)/phi.lt.0.d0)then + print*,'phi',phi + print*,'mu ',mu + print*,'rs ',rs + stop -1 + endif + eclr=(phi**3*Qrpa(mu*sqrt(rs)/phi)+a1*mu**3+a2*mu**4+a3*mu**5+ & + a4*mu**6+b0**8*mu**8*ec)/((1.d0+b0**2*mu**2)**4) + + return +end subroutine vcorrlr(rs,z,mu,vclrup,vclrdown,vclrupd,vclrdownd) !SCF diff --git a/src/mo_two_e_integrals/mo_bi_integrals_erf.irp.f b/src/mo_two_e_integrals/mo_bi_integrals_erf.irp.f index d7a5de2c..f7fed284 100644 --- a/src/mo_two_e_integrals/mo_bi_integrals_erf.irp.f +++ b/src/mo_two_e_integrals/mo_bi_integrals_erf.irp.f @@ -55,7 +55,7 @@ BEGIN_PROVIDER [ logical, mo_bielec_integrals_erf_in_map ] if (write_mo_integrals_erf) then call ezfio_set_work_empty(.False.) call map_save_to_disk(trim(ezfio_filename)//'/work/mo_ints_erf',mo_integrals_erf_map) - call ezfio_set_integrals_bielec_erf_disk_access_mo_integrals_erf("Read") + call ezfio_set_mo_two_e_integrals_disk_access_mo_integrals_erf("Read") endif END_PROVIDER