Commit a3a39fc9 authored by giannozz's avatar giannozz

Cleanup: uniform spelling for "Quantum ESPRESSO", removal of f_defs.h,

CMPLX is explicitly typed, blas/lapack are lowercase (consistently with
the convention: FORTRAN COMMANDS = uppercase, all the rest lowercase)


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/[email protected] c92efa57-630b-4861-b058-cf58834340f0
parent 7059811a
!
! Copyright (C) 2004-2007 Quantum-Espresso group
! Copyright (C) 2004-2007 Quantum ESPRESSO group
! This file is distributed under the terms of the
! GNU General Public License. See the file `License'
! in the root directory of the present distribution,
......
!
! Copyright (C) 2003-2005 Quantum-ESPRESSO group
! Copyright (C) 2003-2005 Quantum ESPRESSO group
! This file is distributed under the terms of the
! GNU General Public License. See the file `License'
! in the root directory of the present distribution,
! or http://www.gnu.org/copyleft/gpl.txt .
!
#include "f_defs.h"
!
!----------------------------------------------------------------------------
MODULE basic_algebra_routines
......@@ -60,10 +59,10 @@ MODULE basic_algebra_routines
REAL(DP), INTENT(IN) :: vec1(:), vec2(:)
REAL(DP) :: dot_product_
!
REAL(DP) :: DDOT
EXTERNAL DDOT
REAL(DP) :: ddot
EXTERNAL ddot
!
dot_product_ = DDOT( SIZE( vec1 ), vec1, 1, vec2, 1 )
dot_product_ = ddot( SIZE( vec1 ), vec1, 1, vec2, 1 )
!
END FUNCTION dot_product_
!
......@@ -92,10 +91,10 @@ MODULE basic_algebra_routines
REAL(DP), INTENT(IN) :: vec(:)
REAL(DP) :: norm
!
REAL(DP) :: DNRM2
EXTERNAL DNRM2
REAL(DP) :: dnrm2
EXTERNAL dnrm2
!
norm = DNRM2( SIZE( vec ), vec, 1 )
norm = dnrm2( SIZE( vec ), vec, 1 )
!
END FUNCTION norm
!
......
!
! Copyright (C) 2003-2007 Quantum-ESPRESSO group
! Copyright (C) 2003-2007 Quantum ESPRESSO group
! This file is distributed under the terms of the
! GNU General Public License. See the file `License'
! in the root directory of the present distribution,
......
!
! Copyright (C) 2002-2005 Quantum-ESPRESSO group
! Copyright (C) 2002-2005 Quantum ESPRESSO group
! This file is distributed under the terms of the
! GNU General Public License. See the file `License'
! in the root directory of the present distribution,
......
!
! Copyright (C) 2002-2005 Quantum-ESPRESSO group
! Copyright (C) 2002-2005 Quantum ESPRESSO group
! This file is distributed under the terms of the
! GNU General Public License. See the file `License'
! in the root directory of the present distribution,
......
!
! Copyright (C) 2001-2007 Quantum-Espresso group
! Copyright (C) 2001-2007 Quantum ESPRESSO group
! This file is distributed under the terms of the
! GNU General Public License. See the file `License'
! in the root directory of the present distribution,
......
!
! Copyright (C) 2002-2006 Quantum-Espresso group
! Copyright (C) 2002-2006 Quantum ESPRESSO group
! This file is distributed under the terms of the
! GNU General Public License. See the file `License'
! in the root directory of the present distribution,
......
!
! Copyright (C) 2002-2005 Quantum-ESPRESSO group
! Copyright (C) 2002-2005 Quantum ESPRESSO group
! This file is distributed under the terms of the
! GNU General Public License. See the file `License'
! in the root directory of the present distribution,
! or http://www.gnu.org/copyleft/gpl.txt .
!
#include "f_defs.h"
!
#define __REMOVE_CONSTRAINT_FORCE
!#define __DEBUG_CONSTRAINTS
#define __USE_PBC
......@@ -688,7 +686,7 @@ MODULE constraints_module
!
phase = k(:) .dot. dtau(:)
!
struc_fac = struc_fac + CMPLX( COS( phase ), SIN( phase ) )
struc_fac = struc_fac + CMPLX( COS(phase), SIN(phase), KIND=DP )
!
END DO
!
......@@ -787,7 +785,7 @@ MODULE constraints_module
REAL(DP) :: r0(3), ri(3), k(3), phase, ksin(3), norm_k, sinxx
COMPLEX(DP) :: struc_fac
!
REAL(DP), EXTERNAL :: DDOT
REAL(DP), EXTERNAL :: ddot
!
!
dg(:,:) = 0.0_DP
......@@ -991,7 +989,7 @@ MODULE constraints_module
!
phase = k(1)*dtau(1) + k(2)*dtau(2) + k(3)*dtau(3)
!
struc_fac = struc_fac + CMPLX( COS( phase ), SIN( phase ) )
struc_fac = struc_fac + CMPLX( COS(phase), SIN(phase), KIND=DP )
!
ri(:) = tau(:,i)
!
......@@ -1138,7 +1136,7 @@ MODULE constraints_module
LOGICAL :: global_test
INTEGER, PARAMETER :: maxiter = 100
!
REAL(DP), EXTERNAL :: DDOT
REAL(DP), EXTERNAL :: ddot
!
!
ALLOCATE( dgp( 3, nat ) )
......@@ -1190,7 +1188,7 @@ MODULE constraints_module
!
END DO
!
lambda = gp(idx) / DDOT( dim, dgp, 1, dg0(:,:,idx), 1 )
lambda = gp(idx) / ddot( dim, dgp, 1, dg0(:,:,idx), 1 )
!
DO na = 1, nat
!
......@@ -1267,7 +1265,7 @@ MODULE constraints_module
REAL(DP), ALLOCATABLE :: dg_matrix(:,:)
INTEGER, ALLOCATABLE :: iwork(:)
!
REAL(DP), EXTERNAL :: DDOT, DNRM2
REAL(DP), EXTERNAL :: ddot, dnrm2
!
!
dim = 3*nat
......@@ -1276,7 +1274,7 @@ MODULE constraints_module
!
#if defined (__REMOVE_CONSTRAINT_FORCE)
!
norm_before = DNRM2( 3*nat, force, 1 )
norm_before = dnrm2( 3*nat, force, 1 )
!
ALLOCATE( dg( 3, nat, nconstr ) )
!
......@@ -1285,9 +1283,9 @@ MODULE constraints_module
CALL constraint_grad( 1, nat, tau, &
if_pos, ityp, tau_units, g, dg(:,:,1) )
!
lagrange(1) = DDOT( dim, force, 1, dg(:,:,1), 1 )
lagrange(1) = ddot( dim, force, 1, dg(:,:,1), 1 )
!
ndg = DDOT( dim, dg(:,:,1), 1, dg(:,:,1), 1 )
ndg = ddot( dim, dg(:,:,1), 1, dg(:,:,1), 1 )
!
force(:,:) = force(:,:) - lagrange(1)*dg(:,:,1)/ndg
!
......@@ -1305,13 +1303,13 @@ MODULE constraints_module
!
DO i = 1, nconstr
!
dg_matrix(i,i) = DDOT( dim, dg(:,:,i), 1, dg(:,:,i), 1 )
dg_matrix(i,i) = ddot( dim, dg(:,:,i), 1, dg(:,:,i), 1 )
!
lagrange(i) = DDOT( dim, force, 1, dg(:,:,i), 1 )
lagrange(i) = ddot( dim, force, 1, dg(:,:,i), 1 )
!
DO j = i + 1, nconstr
!
dgidgj = DDOT( dim, dg(:,:,i), 1, dg(:,:,j), 1 )
dgidgj = ddot( dim, dg(:,:,i), 1, dg(:,:,j), 1 )
!
dg_matrix(i,j) = dgidgj
dg_matrix(j,i) = dgidgj
......@@ -1351,7 +1349,7 @@ MODULE constraints_module
!
#endif
!
norm_after = DNRM2( dim, force, 1 )
norm_after = dnrm2( dim, force, 1 )
!
IF ( norm_before < norm_after ) THEN
!
......@@ -1392,7 +1390,7 @@ MODULE constraints_module
REAL(DP), ALLOCATABLE :: dg(:,:,:), dg_matrix(:,:), lambda(:)
INTEGER, ALLOCATABLE :: iwork(:)
!
REAL(DP), EXTERNAL :: DDOT, DNRM2
REAL(DP), EXTERNAL :: ddot, dnrm2
!
!
dim = 3*nat
......@@ -1405,9 +1403,9 @@ MODULE constraints_module
CALL constraint_grad( 1, nat, tau, &
if_pos, ityp, tau_units, g, dg(:,:,1) )
!
lambda(1) = DDOT( dim, vec, 1, dg(:,:,1), 1 )
lambda(1) = ddot( dim, vec, 1, dg(:,:,1), 1 )
!
ndg = DDOT( dim, dg(:,:,1), 1, dg(:,:,1), 1 )
ndg = ddot( dim, dg(:,:,1), 1, dg(:,:,1), 1 )
!
vec(:,:) = vec(:,:) - lambda(1)*dg(:,:,1)/ndg
!
......@@ -1425,13 +1423,13 @@ MODULE constraints_module
!
DO i = 1, nconstr
!
dg_matrix(i,i) = DDOT( dim, dg(:,:,i), 1, dg(:,:,i), 1 )
dg_matrix(i,i) = ddot( dim, dg(:,:,i), 1, dg(:,:,i), 1 )
!
lambda(i) = DDOT( dim, vec, 1, dg(:,:,i), 1 )
lambda(i) = ddot( dim, vec, 1, dg(:,:,i), 1 )
!
DO j = i + 1, nconstr
!
dgidgj = DDOT( dim, dg(:,:,i), 1, dg(:,:,j), 1 )
dgidgj = ddot( dim, dg(:,:,i), 1, dg(:,:,j), 1 )
!
dg_matrix(i,j) = dgidgj
dg_matrix(j,i) = dgidgj
......
!
! Copyright (C) 2002-2007 Quantum-ESPRESSO group
! Copyright (C) 2002-2007 Quantum ESPRESSO group
! This file is distributed under the terms of the
! GNU General Public License. See the file `License'
! in the root directory of the present distribution,
......
!
! Copyright (C) 2001-2008 Quantum-ESPRESSO group
! Copyright (C) 2001-2008 Quantum ESPRESSO group
! This file is distributed under the terms of the
! GNU General Public License. See the file `License'
! in the root directory of the present distribution,
! or http://www.gnu.org/copyleft/gpl.txt .
!
#include "f_defs.h"
!
MODULE dspev_module
......@@ -238,7 +237,7 @@ CONTAINS
p(1:l) = vtmp(1:l)
#endif
CALL DAXPY( l, -kappa, u, 1, p, 1 )
CALL daxpy( l, -kappa, u, 1, p, 1 )
CALL DGER( is(l), l, -1.0_DP, ul, 1, p, 1, a, lda )
CALL DGER( is(l), l, -1.0_DP, p( me + 1 ), nproc, u, 1, a, lda )
......
!
! Copyright (C) 2002-2005 Quantum-ESPRESSO group
! Copyright (C) 2002-2005 Quantum ESPRESSO group
! This file is distributed under the terms of the
! GNU General Public License. See the file `License'
! in the root directory of the present distribution,
......
!
! Copyright (C) 2002-2005 Quantum-ESPRESSO group
! Copyright (C) 2002-2005 Quantum ESPRESSO group
! This file is distributed under the terms of the
! GNU General Public License. See the file `License'
! in the root directory of the present distribution,
......
!
! Copyright (C) 2001-2007 Quantum-ESPRESSO group
! Copyright (C) 2001-2007 Quantum ESPRESSO group
! This file is distributed under the terms of the
! GNU General Public License. See the file `License'
! in the root directory of the present distribution,
......
!
! Copyright (C) 2006 Quantum-ESPRESSO group
! Copyright (C) 2006 Quantum ESPRESSO group
! This file is distributed under the terms of the
! GNU General Public License. See the file `License'
! in the root directory of the present distribution,
! or http://www.gnu.org/copyleft/gpl.txt .
!
!
#include "f_defs.h"
!
!----------------------------------------------------------------------
! FFT base Module.
......
!
! Copyright (C) 2002-2008 Quantum-ESPRESSO group
! Copyright (C) 2002-2008 Quantum ESPRESSO group
! This file is distributed under the terms of the
! GNU General Public License. See the file `License'
! in the root directory of the present distribution,
......
!
! Copyright (C) 2002-2005 Quantum-ESPRESSO group
! Copyright (C) 2002-2005 Quantum ESPRESSO group
! This file is distributed under the terms of the
! GNU General Public License. See the file `License'
! in the root directory of the present distribution,
......
!
! Copyright (C) 2002-2005 Quantum-ESPRESSO group
! Copyright (C) 2002-2005 Quantum ESPRESSO group
! This file is distributed under the terms of the
! GNU General Public License. See the file `License'
! in the root directory of the present distribution,
......
......@@ -309,20 +309,4 @@ xml_io_base.o : parser.o
xml_io_base.o : wrappers.o
zhpev_drv.o : io_global.o
zhpev_drv.o : kind.o
basic_algebra_routines.o : ../include/f_defs.h
constraints_module.o : ../include/f_defs.h
dspev_drv.o : ../include/f_defs.h
fft_base.o : ../include/f_defs.h
fft_parallel.o : ../include/f_defs.h
fft_scalar.o : ../include/f_defs.h
fft_scalar.o : ../include/fft_defs.h
mp_wave.o : ../include/f_defs.h
parser.o : ../include/f_defs.h
path_base.o : ../include/f_defs.h
path_io_routines.o : ../include/f_defs.h
path_reparametrisation.o : ../include/f_defs.h
ptoolkit.o : ../include/f_defs.h
wannier.o : ../include/f_defs.h
wannier_new.o : ../include/f_defs.h
wave_base.o : ../include/f_defs.h
zhpev_drv.o : ../include/f_defs.h
!
! Copyright (C) 2002-2005 Quantum-ESPRESSO group
! Copyright (C) 2002-2005 Quantum ESPRESSO group
! This file is distributed under the terms of the
! GNU General Public License. See the file `License'
! in the root directory of the present distribution,
......
!
! Copyright (C) 2002-2005 Quantum-ESPRESSO group
! Copyright (C) 2002-2005 Quantum ESPRESSO group
! This file is distributed under the terms of the
! GNU General Public License. See the file `License'
! in the root directory of the present distribution,
......
!
! Copyright (C) 2002-2005 Quantum-ESPRESSO group
! Copyright (C) 2002-2005 Quantum ESPRESSO group
! This file is distributed under the terms of the
! GNU General Public License. See the file `License'
! in the root directory of the present distribution,
......
!
! Copyright (C) 2001-2006 Quantum-ESPRESSO group
! Copyright (C) 2001-2006 Quantum ESPRESSO group
! This file is distributed under the terms of the
! GNU General Public License. See the file `License'
! in the root directory of the present distribution,
......
!
! Copyright (C) 2002-2008 Quantum-Espresso group
! Copyright (C) 2002-2008 Quantum ESPRESSO group
! This file is distributed under the terms of the
! GNU General Public License. See the file `License'
! in the root directory of the present distribution,
......
!
! Copyright (C) 2002-2008 Quantum-ESPRESSO group
! Copyright (C) 2002-2008 Quantum ESPRESSO group
! This file is distributed under the terms of the
! GNU General Public License. See the file `License'
! in the root directory of the present distribution,
! or http://www.gnu.org/copyleft/gpl.txt .
!
#include "f_defs.h"
!
MODULE mp_wave
......@@ -612,7 +611,7 @@
ALLOCATE( mp_rcv_buffer( icsize * nproc ) )
ALLOCATE( my_buffer( ngw ) )
ALLOCATE( ibuf( nproc ) )
ctmp = CMPLX( 0.0_DP, 0.0_DP )
ctmp = ( 0.0_DP, 0.0_DP )
! WRITE( stdout,*) 'D: ', nproc, mpime, group
......
!
! Copyright (C) 2001-2009 Quantum-Espresso group
! Copyright (C) 2001-2009 Quantum ESPRESSO group
! This file is distributed under the terms of the
! GNU General Public License. See the file `License'
! in the root directory of the present distribution,
......
......@@ -31,7 +31,6 @@
! ... FUNCTION version_compare: Compare two version strings; the result can be
! "newer", "equal", "older", ""
!
#include "f_defs.h"
!
!----------------------------------------------------------------------------
MODULE parser
......
!
! Copyright (C) 2003-2007 Quantum-ESPRESSO group
! Copyright (C) 2003-2007 Quantum ESPRESSO group
! This file is distributed under the terms of the
! GNU General Public License. See the file `License'
! in the root directory of the present distribution,
! or http://www.gnu.org/copyleft/gpl.txt .
!
#include "f_defs.h"
!
!---------------------------------------------------------------------------
MODULE path_base
!---------------------------------------------------------------------------
!
! ... This module contains most of the subroutines and functions needed by
! ... the implementation of "NEB" and "SMD" methods into Quantum-ESPRESSO
! ... the implementation of "NEB" and "SMD" methods into Quantum ESPRESSO
!
! ... Other relevant files are:
!
......
!
! Copyright (C) 2003-2005 Quantum-ESPRESSO group
! Copyright (C) 2003-2005 Quantum ESPRESSO group
! This file is distributed under the terms of the
! GNU General Public License. See the file `License'
! in the root directory of the present distribution,
......
!
! Copyright (C) 2002-2006 Quantum-ESPRESSO group
! Copyright (C) 2002-2006 Quantum ESPRESSO group
! This file is distributed under the terms of the
! GNU General Public License. See the file `License'
! in the root directory of the present distribution,
! or http://www.gnu.org/copyleft/gpl.txt .
!
#include "f_defs.h"
!
!----------------------------------------------------------------------------
MODULE path_io_routines
......
!
! Copyright (C) 2003-2006 Quantum-ESPRESSO group
! Copyright (C) 2003-2006 Quantum ESPRESSO group
! This file is distributed under the terms of the
! GNU General Public License. See the file `License'
! in the root directory of the present distribution,
......
!
! Copyright (C) 2003-2006 Quantum-ESPRESSO group
! Copyright (C) 2003-2006 Quantum ESPRESSO group
! This file is distributed under the terms of the
! GNU General Public License. See the file `License'
! in the root directory of the present distribution,
! or http://www.gnu.org/copyleft/gpl.txt .
!
#include "f_defs.h"
!
!---------------------------------------------------------------------------
MODULE path_reparametrisation
......
!
! Copyright (C) 2003-2006 Quantum-ESPRESSO group
! Copyright (C) 2003-2006 Quantum ESPRESSO group
! This file is distributed under the terms of the
! GNU General Public License. See the file `License'
! in the root directory of the present distribution,
......
!
! Copyright (C) 2002-2008 Quantum-Espresso group
! Copyright (C) 2002-2008 Quantum ESPRESSO group
! This file is distributed under the terms of the
! GNU General Public License. See the file `License'
! in the root directory of the present distribution,
......
!
! Copyright (C) 2001-2006 Quantum-ESPRESSO group
! Copyright (C) 2001-2006 Quantum ESPRESSO group
! This file is distributed under the terms of the
! GNU General Public License. See the file `License'
! in the root directory of the present distribution,
! or http://www.gnu.org/copyleft/gpl.txt .
!
#include "f_defs.h"
!
!==----------------------------------------------==!
MODULE parallel_toolkit
!==----------------------------------------------==!
......@@ -511,7 +509,7 @@ SUBROUTINE zsqmher( n, a, lda, desc )
! diagonal block, procs work locally
!
DO j = 1, nc
a(j,j) = CMPLX( REAL( a(j,j) ), 0_DP )
a(j,j) = CMPLX( REAL( a(j,j) ), 0_DP, KIND=DP )
DO i = j + 1, nr
a(i,j) = CONJG( a(j,i) )
END DO
......@@ -579,7 +577,8 @@ SUBROUTINE zsqmher( n, a, lda, desc )
IF( myid == 0 ) THEN
DO j = 1, n
!
IF( tst2(j,j) /= CMPLX( REAL( tst2(j,j) ), 0_DP ) ) WRITE( 4000, * ) j, tst2(j,j)
IF( tst2(j,j) /= CMPLX( REAL( tst2(j,j) ), 0_DP, KIND=DP ) ) &
WRITE( 4000, * ) j, tst2(j,j)
!
DO i = j + 1, n
!
......@@ -598,7 +597,7 @@ SUBROUTINE zsqmher( n, a, lda, desc )
DO j = 1, n
!
a(j,j) = CMPLX( REAL( a(j,j) ), 0_DP )
a(j,j) = CMPLX( REAL( a(j,j) ), 0_DP, KIND=DP )
!
DO i = j + 1, n
!
......@@ -4711,7 +4710,7 @@ SUBROUTINE sqr_zsetmat( what, n, alpha, a, lda, desc )
CASE( 'H', 'h' )
IF( desc( la_myc_ ) == desc( la_myr_ ) ) THEN
DO i = 1, desc( nlar_ )
a( i, i ) = CMPLX( REAL( a(i,i) ), 0_DP )
a( i, i ) = CMPLX( REAL( a(i,i) ), 0_DP, KIND=DP )
END DO
END IF
CASE DEFAULT
......
!
! Copyright (C) 2001-2008 Quantum-ESPRESSO group
! Copyright (C) 2001-2008 Quantum ESPRESSO group
! This file is distributed under the terms of the
! GNU General Public License. See the file `License'
! in the root directory of the present distribution,
......
!
! Copyright (C) 2002-2005 Quantum-ESPRESSO group
! Copyright (C) 2002-2005 Quantum ESPRESSO group
! This file is distributed under the terms of the
! GNU General Public License. See the file `License'
! in the root directory of the present distribution,
......
!
! Copyright (C) 2002-2008 Quantum-ESPRESSO group
! Copyright (C) 2002-2008 Quantum ESPRESSO group
! This file is distributed under the terms of the
! GNU General Public License. See the file `License'
! in the root directory of the present distribution,
......
!
! Copyright (C) 2001-2007 Quantum-Espresso group
! Copyright (C) 2001-2007 Quantum ESPRESSO group
! This file is distributed under the terms of the
! GNU General Public License. See the file `License'
! in the root directory of the present distribution,
......
! Copyright (C) 2002-2008 Quantum-Espresso group
! Copyright (C) 2002-2008 Quantum ESPRESSO group
! This file is distributed under the terms of the
! GNU General Public License. See the file `License'
! in the root directory of the present distribution,
......
!
! Copyright (C) 2008 Quantum-ESPRESSO group
! Copyright (C) 2008 Quantum ESPRESSO group
! This file is distributed under the terms of the
! GNU General Public License. See the file `License'
! in the root directory of the present distribution,
......
!
! Copyright (C) 2006-2007 Quantum-Espresso group
! Copyright (C) 2006-2007 Quantum ESPRESSO group
! This file is distributed under the terms of the
! GNU General Public License. See the file `License'
! in the root directory of the present distribution,
......
!
! Copyright (C) 2004-2006 Quantum-ESPRESSO group
! Copyright (C) 2004-2006 Quantum ESPRESSO group
! This file is distributed under the terms of the
! GNU General Public License. See the file `License'
! in the root directory of the present distribution,
......
! Copyright (C) 2008 Quantum-Espresso group
! Copyright (C) 2008 Quantum ESPRESSO group
! This file is distributed under the terms of the
! GNU General Public License. See the file `License'
! in the root directory of the present distribution,
......
!
! Copyright (C) 2004-2007 Quantum-ESPRESSO group
! Copyright (C) 2004-2007 Quantum ESPRESSO group
! This file is distributed under the terms of the
! GNU General Public License. See the file `License'
! in the root directory of the present distribution,
......
!
! Copyright (C) 2003-2009 Quantum-Espresso group
! Copyright (C) 2003-2009 Quantum ESPRESSO group
! This file is distributed under the terms of the
! GNU General Public License. See the file `License'
! in the root directory of the present distribution,
......
......@@ -5,7 +5,6 @@
! in the root directory of the present distribution,
! or http://www.gnu.org/copyleft/gpl.txt .
!
#include "f_defs.h"
!
module wannier
USE kinds, only : DP
......
......@@ -6,7 +6,6 @@
!
!--------------------------------------------------------------------------
!
#include "f_defs.h"
MODULE wannier_new
!
......
......@@ -5,9 +5,6 @@
! in the root directory of the present distribution,
! or http://www.gnu.org/copyleft/gpl.txt .
!
#include "f_defs.h"
! BEGIN manual
!==----------------------------------------------==!
......@@ -82,7 +79,7 @@
anorm = SUM( DBLE( wf(:,ib) * CONJG(wf(:,ib)) ) )
CALL mp_sum(anorm, gid)
anorm = 1.0_DP / MAX( SQRT(anorm), small )
CALL ZDSCAL(ngw, anorm, wf(1,ib), 1)
CALL zdscal(ngw, anorm, wf(1,ib), 1)
END DO
DEALLOCATE( s )
RETURN
......@@ -123,7 +120,7 @@
REAL(DP), PARAMETER :: onem = -1.0_DP
REAL(DP), PARAMETER :: zero = 0.0_DP
REAL(DP), PARAMETER :: small = 1.e-16_DP
REAL(DP) :: DNRM2
REAL(DP) :: dnrm2
REAL(DP), ALLOCATABLE :: s(:)
REAL(DP) :: anorm, wftmp
INTEGER :: ib, nwfr, ngw, nb
......@@ -138,7 +135,7 @@
! ... only the processor that own G=0
IF(gzero) THEN
wftmp = -DBLE(wf(1,ib))
CALL DAXPY(ib-1, wftmp, wf(1,1), nwfr, s(1), 1)
CALL daxpy(ib-1, wftmp, wf(1,1), nwfr, s(1), 1)
END IF
CALL DGEMV('T', nwfr, ib-1, two, wf(1,1), nwfr, wf(1,ib), 1, one, s(1), 1)
......@@ -147,15 +144,15 @@
CALL DGEMV('N', nwfr, ib-1, onem, wf(1,1), nwfr, s(1), 1, one, wf(1,ib), 1)
END IF
IF(gzero) THEN
anorm = DNRM2( 2*(ngw-1), wf(2,ib), 1)
anorm = dnrm2( 2*(ngw-1), wf(2,ib), 1)
anorm = 2.0_DP * anorm**2 + DBLE( wf(1,ib) * CONJG(wf(1,ib)) )
ELSE
anorm = DNRM2( 2*ngw, wf(1,ib), 1)
anorm = dnrm2( 2*ngw, wf(1,ib), 1)
anorm = 2.0_DP * anorm**2
END IF
CALL mp_sum(anorm, gid)
anorm = 1.0_DP / MAX( small, SQRT(anorm) )
CALL DSCAL( 2*ngw, anorm, wf(1,ib), 1)
CALL dscal( 2*ngw, anorm, wf(1,ib), 1)
END DO
DEALLOCATE( s )
......@@ -173,7 +170,7 @@