Fixed recently introduced memory leak, some cleanup,

removed useless "include mpif.h"


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@266 c92efa57-630b-4861-b058-cf58834340f0
This commit is contained in:
giannozz 2003-07-21 13:35:53 +00:00
parent 62f08b789f
commit 545a48b5d2
10 changed files with 20 additions and 48 deletions

View File

@ -54,7 +54,7 @@ cp: modules libs
( cd CPV; make all )
links:
( mkdir bin/; cd bin/ ; ln -fs ../PW/pw.x ../PW/memory.x ../PH/ph.x ../D3/d3.x ../Gamma/pwg.x ../Gamma/phcg.x ../CPV/cp.x ../FPMD/par2.x ../PP/average.x ../PP/bands.x ../PP/chdens.x ../PP/dos.x ../PP/plotrho.x ../PP/pp.x ../PP/projwfc.x ../PP/voronoy.x ../PP/plotband.x ../pwtools/band_plot.x ../pwtools/dynmat.x ../pwtools/fqha.x ../pwtools/matdyn.x ../pwtools/q2r.x . )
( mkdir bin/; cd bin/ ; ln -fs ../PW/pw.x ../PW/memory.x ../PH/ph.x ../D3/d3.x ../Gamma/pwg.x ../Gamma/phcg.x ../CPV/cp.x ../FPMD/par2.x ../PP/average.x ../PP/bands.x ../PP/chdens.x ../PP/dos.x ../PP/plotrho.x ../PP/pp.x ../PP/projwfc.x ../PP/voronoy.x ../PP/plotband.x ../pwtools/band_plot.x ../pwtools/dynmat.x ../pwtools/fqha.x ../pwtools/matdyn.x ../pwtools/q2r.x ../pwtools/dist.x . )
clean:
( cd PW ; make clean_ ) ; \

View File

@ -14,9 +14,6 @@ subroutine io_pattern (fildrho,nirr,npert,u,iflag)
use para
#endif
implicit none
#ifdef __PARA
include 'mpif.h'
#endif
!
! the i/o variables first
!

View File

@ -8,8 +8,8 @@
!
!---------------------------------------------------------------------
subroutine set_irr_mode (nat, at, bg, xq, s, invs, nsym, rtau, &
irt, irgq, nsymq, minus_q, irotmq, t, tmq, max_irr_dim, u, npert, nirr, gi, &
gimq, iverbosity, modenum)
irt, irgq, nsymq, minus_q, irotmq, t, tmq, max_irr_dim, u, &
npert, nirr, gi, gimq, iverbosity, modenum)
!---------------------------------------------------------------------
!
! This routine computes the symmetry matrix of the mode defined
@ -20,13 +20,7 @@ subroutine set_irr_mode (nat, at, bg, xq, s, invs, nsym, rtau, &
!
#include "machine.h"
use parameters, only : DP
#ifdef __PARA
use para
#endif
implicit none
#ifdef __PARA
include 'mpif.h'
#endif
!
! first the dummy variables
!
@ -56,7 +50,7 @@ subroutine set_irr_mode (nat, at, bg, xq, s, invs, nsym, rtau, &
! output: [S(irotq)*q - q]
! output: [S(irotmq)*q + q]
complex(kind=DP) :: u (3 * nat, 3 * nat), t (max_irr_dim, max_irr_dim, 48, 3 * nat), &
complex(kind=DP) :: u(3*nat, 3*nat), t(max_irr_dim, max_irr_dim, 48, 3*nat),&
tmq (max_irr_dim, max_irr_dim, 3 * nat)
! output: the pattern vectors
! output: the symmetry matrices
@ -66,10 +60,7 @@ subroutine set_irr_mode (nat, at, bg, xq, s, invs, nsym, rtau, &
!
! here the local variables
!
real(kind=DP) :: tpi
parameter (tpi = 2.0d0 * 3.14159265358979d0)
real(kind=DP), parameter :: tpi = 2.0d0 * 3.14159265358979d0
integer :: na, imode, jmode, ipert, jpert, nsymtot, imode0, irr, &
ipol, jpol, isymq, irot, sna

View File

@ -7,25 +7,17 @@
!
!---------------------------------------------------------------------
subroutine set_irr_nosym (nat, at, bg, xq, s, invs, nsym, rtau, &
irt, irgq, nsymq, minus_q, irotmq, t, tmq, max_irr_dim, u, npert, nirr, gi, &
gimq, iverbosity)
irt, irgq, nsymq, minus_q, irotmq, t, tmq, max_irr_dim, u, &
npert, nirr, gi, gimq, iverbosity)
!---------------------------------------------------------------------
!
! This routine substitute set_irr when there are no symmetries.
! The irreducible representations are all one dimensional and
! we set them to the displacement of a single atom in one direction
!
!
!
#include "machine.h"
use parameters, only : DP
#ifdef __PARA
use para
#endif
implicit none
#ifdef __PARA
include 'mpif.h'
#endif
use parameters, only : DP
implicit none
!
! first the dummy variables
!
@ -53,7 +45,7 @@ include 'mpif.h'
! output: [S(irotq)*q - q]
! output: [S(irotmq)*q + q]
complex(kind=DP) :: u (3 * nat, 3 * nat), t (max_irr_dim, max_irr_dim, 48, 3 * nat), &
complex(kind=DP) :: u(3*nat, 3*nat), t(max_irr_dim, max_irr_dim, 48, 3*nat),&
tmq (max_irr_dim, max_irr_dim, 3 * nat)
! output: the pattern vectors
! output: the symmetry matrices

View File

@ -57,7 +57,6 @@ subroutine cft3s (f, n1, n2, n3, nx1, nx2, nx3, sign)
integer :: n1, n2, n3, nx1, nx2, nx3, sign
complex (kind=DP) :: f ( nxxs )
!
include 'mpif.h'
integer :: mc, i, j, ii, iproc, k, nppx
complex (kind=DP), allocatable :: aux (:)
integer :: planes ( nx1 )

View File

@ -47,5 +47,6 @@ subroutine output_tau
write (6,'(a3,3x,3f14.9)') atm(ityp(na)), (tau_out(i,na), i=1,3)
enddo
write (6, '(/)')
deallocate(tau_out)
return
end subroutine output_tau

View File

@ -7,8 +7,7 @@
!
!
!-----------------------------------------------------------------------
subroutine psymrho (rho, nrx1, nrx2, nrx3, nr1, nr2, nr3, nsym, s, &
ftau)
subroutine psymrho (rho, nrx1, nrx2, nrx3, nr1, nr2, nr3, nsym, s, ftau)
!-----------------------------------------------------------------------
! p-symmetrize the charge density.
!
@ -17,7 +16,6 @@ subroutine psymrho (rho, nrx1, nrx2, nrx3, nr1, nr2, nr3, nsym, s, &
use para
use parameters, only : DP
implicit none
include 'mpif.h'
integer :: nrx1, nrx2, nrx3, nr1, nr2, nr3, nsym, s, ftau
real (kind=DP) :: rho (nxx)

View File

@ -50,7 +50,7 @@ subroutine setup
!
real(kind=DP), parameter :: rcut = 10.d0, eps = 1.0d-12
!
integer :: na, ir, nt, input_nks, nrot, iter, ierr, irot, isym, &
integer :: na, ir, nt, nrot, iter, ierr, irot, isym, &
ipol, jpol, tipo
logical :: minus_q
integer, external ::n_atom_wfc, set_Hubbard_l
@ -245,8 +245,6 @@ subroutine setup
end if
end if
!
input_nks = nks
!
! allocate space for irt
!
allocate (irt( 48, nat))
@ -286,13 +284,6 @@ subroutine setup
ntetra = 0
end if
!
! In a non scf calculation we check if k-points are compatible
! with the symmetry of the crystal but do not change them
!
if ( iswitch == -1 .and. input_nks.ne.nks .and. .not.ltetra ) then
write (6, '(5x,"Warning: missing inequivalent points")')
nks = input_nks
endif
if (iswitch <= -2) call set_kplusq (xk, wk, xqq, nks, npk)
if (lsda) then

9
TODO
View File

@ -1,4 +1,4 @@
TODO LIST - 11 July 2003
TODO LIST - 16 July 2003
INSTALLATION
@ -60,8 +60,7 @@ PW
- add possibility to read atomic positions from file
- read a, b, c, cosab, cosbc, cosac instead of celldm
Use more standard choices for crystal axis
- Use more standard choices for crystal axis
- fix problem with j'_l(x)Y_lm(x) for x -> 0 and l=1
@ -90,6 +89,10 @@ POSTPROCESSING
- dos, projected dos, etc: input data should be more uniform
- non scf calculations: there must be an option to distinguish
the case of a few selected k-points (bands) from the case of
a grid of k-points covering the entire BZ (DOS, STM): nosym?
PH
- Tone: ntyp in input needed for phonon GUI ?

View File

@ -59,7 +59,7 @@
do i=1,len(line)
line(i:i) = capital(line(i:i))
end do
if (matches('ATOMIC_SPECIES',line)) then
if (matches('ATOMIC_POSITIONS',line)) then
if ( matches('ALAT', line) ) then
scale = 1.0
else if ( matches('BOHR', line) ) then