Commit 0caeadbd authored by sbraccia's avatar sbraccia

Machine-dependent definitions are now contained in two different files (both in /include):

   1) f_defs.h  for definitions to be included in FORTRAN files ONLY
   2) c_defs.h  for definitions to be included in C       files ONLY

C.S.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@1012 c92efa57-630b-4861-b058-cf58834340f0
parent 19de58eb
......@@ -6,7 +6,7 @@
! or http://www.gnu.org/copyleft/gpl.txt .
!
#include "../include/machine.h"
#include "../include/f_defs.h"
!-----------------------------------------------------------------------
subroutine add_cc(rhoc,rhog,rhor)
......
......@@ -6,7 +6,7 @@
! or http://www.gnu.org/copyleft/gpl.txt .
!
#include "../include/machine.h"
#include "../include/f_defs.h"
!
!=======================================================================
......
......@@ -6,7 +6,7 @@
! or http://www.gnu.org/copyleft/gpl.txt .
!
#include "../include/machine.h"
#include "../include/f_defs.h"
!
!=======================================================================
......
......@@ -6,7 +6,7 @@
! or http://www.gnu.org/copyleft/gpl.txt .
!
#include "../include/machine.h"
#include "../include/f_defs.h"
subroutine errore(a,b,n)
!-----------------------------------------------------------------------
......
......@@ -6,7 +6,7 @@
! or http://www.gnu.org/copyleft/gpl.txt .
!
#include "../include/machine.h"
#include "../include/f_defs.h"
MODULE fft_cp
......
......@@ -6,7 +6,7 @@
! or http://www.gnu.org/copyleft/gpl.txt .
!
#include "../include/machine.h"
#include "../include/f_defs.h"
module para_mod
......
......@@ -6,7 +6,7 @@
! or http://www.gnu.org/copyleft/gpl.txt .
!
#include "../include/machine.h"
#include "../include/f_defs.h"
!
subroutine mxma (a,na,iad,b,nb,ibd,c,nc,icd,nar,nac,nbc)
!
......
......@@ -5,7 +5,7 @@
! in the root directory of the present distribution,
! or http://www.gnu.org/copyleft/gpl.txt .
!
#include "machine.h"
#include "f_defs.h"
!
!-----------------------------------------------------------------------
subroutine allocate_d3
......
......@@ -14,7 +14,7 @@ subroutine bcast_d3_input
!
!
#ifdef __PARA
#include "machine.h"
#include "f_defs.h"
use pwcom
use phcom
use d3com
......
......@@ -12,7 +12,7 @@ subroutine ch_psi_all2 (n, h, ah, e, ik, m)
! This routine applies the operator ( H - \epsilon S + alpha_pv P_v)
! to a vector h. The result is given in Ah.
!
#include "machine.h"
#include "f_defs.h"
USE kinds, only : DP
use pwcom
use becmod
......
......@@ -13,7 +13,7 @@ subroutine close_open (isw)
! Close and open some units. It is useful in case of interrupted run
!
!
#include"machine.h"
#include"f_defs.h"
use pwcom, only: degauss
use phcom, only: iudwf, lrdwf, lgamma
use io_files, only: prefix
......
......@@ -5,7 +5,7 @@
! in the root directory of the present distribution,
! or http://www.gnu.org/copyleft/gpl.txt .
!
#include "machine.h"
#include "f_defs.h"
!
!----------------------------------------------------------------------
subroutine d0rhod2v (ipert, drhoscf)
......
......@@ -5,7 +5,7 @@
! in the root directory of the present distribution,
! or http://www.gnu.org/copyleft/gpl.txt .
!
#include "machine.h"
#include "f_defs.h"
!
!-----------------------------------------------------------------------
subroutine d3_exc
......
......@@ -5,7 +5,7 @@
! in the root directory of the present distribution,
! or http://www.gnu.org/copyleft/gpl.txt .
!
#include"machine.h"
#include"f_defs.h"
!
!-----------------------------------------------------------------------
subroutine d3_init
......
......@@ -5,7 +5,7 @@
! in the root directory of the present distribution,
! or http://www.gnu.org/copyleft/gpl.txt .
!
#include "machine.h"
#include "f_defs.h"
!
!-----------------------------------------------------------------------
subroutine d3_readin
......
......@@ -11,7 +11,7 @@ subroutine d3_recover (ilab, isw)
!
! isw = +1 Writes d3dyn in a file for possible recover
! isw = -1 Starts a recover run
#include "machine.h"
#include "f_defs.h"
use pwcom
use phcom
use d3com
......
......@@ -5,7 +5,7 @@
! in the root directory of the present distribution,
! or http://www.gnu.org/copyleft/gpl.txt .
!
#include "machine.h"
#include "f_defs.h"
!
!-----------------------------------------------------------------------
subroutine d3_setup
......
......@@ -5,7 +5,7 @@
! in the root directory of the present distribution,
! or http://www.gnu.org/copyleft/gpl.txt .
!
#include"machine.h"
#include"f_defs.h"
!
!-----------------------------------------------------------------------
subroutine d3_summary
......
......@@ -14,7 +14,7 @@ subroutine d3_symdyn (d3dyn, u, ug0, xq, s, invs, rtau, irt, irgq, &
! of the modes
!
!
#include "machine.h"
#include "f_defs.h"
USE kinds, only : DP
implicit none
integer :: nat, s (3, 3, 48), irt (48, nat), irgq (48), invs (48), &
......
......@@ -16,7 +16,7 @@ subroutine d3_symdynph (xq, phi, s, invs, rtau, irt, irgq, nsymq, &
! q -> -q+G if present.
!
!
#include "machine.h"
#include "f_defs.h"
USE kinds, only : DP
USE constants, only : tpi
implicit none
......
......@@ -5,7 +5,7 @@
! in the root directory of the present distribution,
! or http://www.gnu.org/copyleft/gpl.txt .
!
#include "machine.h"
#include "f_defs.h"
!
!-----------------------------------------------------------------------
subroutine d3_valence
......
......@@ -5,7 +5,7 @@
! in the root directory of the present distribution,
! or http://www.gnu.org/copyleft/gpl.txt .
!
#include "machine.h"
#include "f_defs.h"
!
!-----------------------------------------------------------------------
subroutine d3dyn_cc
......
......@@ -17,7 +17,7 @@ subroutine d3ionq (nat, ntyp, ityp, zv, tau, alat, omega, q, at, &
! Both the real and reciprocal space terms
! are included.
!
#include "machine.h"
#include "f_defs.h"
!
USE kinds, only : DP
USE io_global, ONLY : stdout
......
......@@ -5,7 +5,7 @@
! in the root directory of the present distribution,
! or http://www.gnu.org/copyleft/gpl.txt .
!
#include "machine.h"
#include "f_defs.h"
!
!-----------------------------------------------------------------------
program d3toten
......
......@@ -5,7 +5,7 @@
! in the root directory of the present distribution,
! or http://www.gnu.org/copyleft/gpl.txt .
!
#include "machine.h"
#include "f_defs.h"
!
!----------------------------------------------------------------------
subroutine d3vrho
......
......@@ -15,7 +15,7 @@ subroutine davcio_drho2 (drho, lrec, iunit, nrec, isw)
! isw = +1 : gathers data from the nodes and writes on a single file
! isw = -1 : reads data from a single file and distributes them
!
#include "machine.h"
#include "f_defs.h"
use pwcom
USE kinds, only : DP
use phcom
......
......@@ -16,7 +16,7 @@ subroutine dpsi_corr (evcq, psidvpsi_x, ik, ikq, nu)
! this routine corrects dpsi in such a way that the density matrix
! is given by: Sum_{k,nu} 2 * | dpsi > < psi |
!
#include "machine.h"
#include "f_defs.h"
USE kinds, only : DP
use pwcom
use phcom
......
......@@ -5,7 +5,7 @@
! in the root directory of the present distribution,
! or http://www.gnu.org/copyleft/gpl.txt .
!
#include "machine.h"
#include "f_defs.h"
!
!-----------------------------------------------------------------------
subroutine dpsidpsidv
......
......@@ -5,7 +5,7 @@
! in the root directory of the present distribution,
! or http://www.gnu.org/copyleft/gpl.txt .
!
#include "machine.h"
#include "f_defs.h"
!
!-----------------------------------------------------------------------
subroutine dpsidvdpsi (nu_q0)
......
......@@ -5,7 +5,7 @@
! in the root directory of the present distribution,
! or http://www.gnu.org/copyleft/gpl.txt .
!
#include "machine.h"
#include "f_defs.h"
!
!----------------------------------------------------------------------
subroutine dqrhod2v (ipert, drhoscf)
......
......@@ -21,7 +21,7 @@ subroutine drho_cc (iflag)
! the total charge --used to set drho and d0rho as they were
! before the first call of drho_cc--
!
#include "machine.h"
#include "f_defs.h"
USE kinds, only : DP
use pwcom
use phcom
......
......@@ -5,7 +5,7 @@
! in the root directory of the present distribution,
! or http://www.gnu.org/copyleft/gpl.txt .
!
#include "machine.h"
#include "f_defs.h"
!
!-----------------------------------------------------------------------
subroutine drho_drc (iudrho_x, u_x, xq_x, drc_x, scale)
......
......@@ -5,7 +5,7 @@
! in the root directory of the present distribution,
! or http://www.gnu.org/copyleft/gpl.txt .
!
#include "machine.h"
#include "f_defs.h"
!
!-----------------------------------------------------------------------
subroutine drhod2v
......
......@@ -5,7 +5,7 @@
! in the root directory of the present distribution,
! or http://www.gnu.org/copyleft/gpl.txt .
!
#include "machine.h"
#include "f_defs.h"
!
!-----------------------------------------------------------------------
subroutine dvdpsi (nu_i, xq_, dvloc, vkb_, vkbq_, psi_, dvpsi_)
......
......@@ -5,7 +5,7 @@
! in the root directory of the present distribution,
! or http://www.gnu.org/copyleft/gpl.txt .
!
#include "machine.h"
#include "f_defs.h"
!
!-----------------------------------------------------------------------
subroutine dvscf (nu_i, dvloc, xq_x)
......
......@@ -5,7 +5,7 @@
! in the root directory of the present distribution,
! or http://www.gnu.org/copyleft/gpl.txt .
!
#include "machine.h"
#include "f_defs.h"
!
!-----------------------------------------------------------------------
subroutine gen_dpdvp
......
......@@ -17,7 +17,7 @@ subroutine gen_dwfc (isw_sl)
! isw_sl = 2 : it calculates | d/du(0) psi_k+q >
! isw_sl = 3,4 : it calculates | d/du(0) psi_k >
!
#include "machine.h"
#include "f_defs.h"
USE io_global, ONLY : stdout
use pwcom
use phcom
......
......@@ -5,7 +5,7 @@
! in the root directory of the present distribution,
! or http://www.gnu.org/copyleft/gpl.txt .
!
#include "machine.h"
#include "f_defs.h"
!
!-----------------------------------------------------------------------
subroutine incdrhoscf2 (drhoscf, weight, ik, dbecsum, mode, flag)
......
......@@ -12,7 +12,7 @@ subroutine psymd0rho (nper, irr, dvtosym)
!-----------------------------------------------------------------------
! p-symmetrize the charge density.
!
#include "machine.h"
#include "f_defs.h"
#ifdef __PARA
USE kinds, ONLY : DP
USE ions_base, ONLY : nat
......
......@@ -10,7 +10,7 @@ subroutine qstar_d3 (d3dyn, at, bg, nat, nsym, s, invs, irt, rtau, &
nq, sxq, isq, imq, iudyn, wrmode)
!-----------------------------------------------------------------------
!
#include "machine.h"
#include "f_defs.h"
USE kinds, only : DP
implicit none
!
......
......@@ -11,7 +11,7 @@ subroutine read_ef
!-----------------------------------------------------------------------
! Reads the shift of the Fermi Energy
!
#include "machine.h"
#include "f_defs.h"
use pwcom
use d3com
#ifdef __PARA
......
......@@ -13,7 +13,7 @@ subroutine rotate_and_add_d3 (phi, phi2, nat, isym, s, invs, irt, &
! to the specified symmetry operation and add the rotated matrix
! to phi2. phi is left unmodified.
!
#include "machine.h"
#include "f_defs.h"
USE kinds, only : DP
implicit none
!
......
......@@ -5,7 +5,7 @@
! in the root directory of the present distribution,
! or http://www.gnu.org/copyleft/gpl.txt .
!
#include "machine.h"
#include "f_defs.h"
!
!-----------------------------------------------------------------------
subroutine set_d3irr
......
......@@ -11,7 +11,7 @@ subroutine set_efsh (drhoscf, imode0, irr, npe)
! This routine calculates the FermiEnergy shift
! and stores it in the variable ef_sh
!
#include "machine.h"
#include "f_defs.h"
USE kinds, only : DP
USE io_global, ONLY : stdout
use pwcom
......
......@@ -29,7 +29,7 @@ subroutine set_sym_irr (nat, at, bg, xq, s, invs, nsym, rtau, irt, &
! Revised Oct. 1995 by Andrea Dal Corso.
! April 1997: parallel stuff added (SdG)
!
#include "machine.h"
#include "f_defs.h"
USE kinds, only : DP
#ifdef __PARA
use para, only: me
......
......@@ -25,7 +25,7 @@ subroutine sgama_d3 (nsymq, nat, s, ityp, nr1, nr2, nr3, nsymg0, &
! a) the first nsymg0 matrices are symmetries of the crystal
! b) the first nsymq matrices are symmetries for the small group of q
!
#include "machine.h"
#include "f_defs.h"
USE kinds, only : DP
implicit none
......
......@@ -5,7 +5,7 @@
! in the root directory of the present distribution,
! or http://www.gnu.org/copyleft/gpl.txt .
!
#include "machine.h"
#include "f_defs.h"
!
!-----------------------------------------------------------------------
subroutine solve_linter_d3 (irr, imode0, npe, isw_sl)
......
......@@ -14,7 +14,7 @@ subroutine sym_def1 (def, irr)
!
! Used in the q=0 metallic case only.
!
#include"machine.h"
#include"f_defs.h"
USE kinds, only : DP
use pwcom
use phcom
......
......@@ -12,7 +12,7 @@ subroutine symd0rho (max_irr_dim, nper, irr, d0rho, s, ftau, nsymq, &
!---------------------------------------------------------------------
! symmetrizes q=0 drho
!
#include"machine.h"
#include"f_defs.h"
!
USE kinds, only : DP
implicit none
......
......@@ -14,7 +14,7 @@ subroutine trntnsc_3 (phi, at, bg, iflg)
!(like the derivative of the dynamical matrix)
! from crystal to cartesian axis (iflg >= 1) or viceversa (iflg <= -1)
!
#include"machine.h"
#include"f_defs.h"
USE kinds, only : DP
implicit none
......
......@@ -5,7 +5,7 @@
! in the root directory of the present distribution,
! or http://www.gnu.org/copyleft/gpl.txt .
!
#include "machine.h"
#include "f_defs.h"
!
!-----------------------------------------------------------------------
subroutine write_aux (isw)
......
......@@ -5,7 +5,7 @@
! in the root directory of the present distribution,
! or http://www.gnu.org/copyleft/gpl.txt .
!
#include "machine.h"
#include "f_defs.h"
!
!-----------------------------------------------------------------------
subroutine writed3dyn_5 (d3dyn_x, filename, isw)
......
......@@ -9,7 +9,7 @@
!-----------------------------------------------------------------------
subroutine A_h(e,h,ah)
!-----------------------------------------------------------------------
#include "machine.h"
#include "f_defs.h"
USE kinds, only: DP
USE cell_base,ONLY : alat, omega, tpiba2
USE uspp, ONLY : vkb, nkb
......
......@@ -10,7 +10,7 @@
subroutine cg_readin
!-----------------------------------------------------------------------
!
#include "machine.h"
#include "f_defs.h"
USE ions_base, ONLY : nat
use pwcom
use cgcom
......
......@@ -10,7 +10,7 @@
subroutine cg_setup
!-----------------------------------------------------------------------
!
#include "machine.h"
#include "f_defs.h"
USE kinds, only: DP
USE ions_base, ONLY : nat, ntyp => nsp, ityp, tau
use pwcom
......
......@@ -16,7 +16,7 @@ subroutine cgsolve (operator,npw,evc,npwx,nbnd,overlap, &
! "operator" is the linear operator - diagonal preconditioning allowed
! x = solution, u = gradient, h = conjugate gradient, Ah = operator*h
!
#include "machine.h"
#include "f_defs.h"
USE io_global, ONLY : stdout
USE kinds, only : DP
implicit none
......
......@@ -14,7 +14,7 @@ subroutine d2ion (nat,ntyp,ityp,zv,tau,alat,omega, &
! calculate the ionic contribution to the dynamical matrix
! (both real- and reciprocal-space contributions are present)
!
#include "machine.h"
#include "f_defs.h"
USE kinds, only : DP
USE io_global, ONLY : stdout
implicit none
......
......@@ -13,7 +13,7 @@ subroutine dgradcor1 (rho, grho, dvxc_rr, dvxc_sr, dvxc_ss, dvxc_s, &
!--------------------------------------------------------------------
! ADD Gradient Correction contibution to screening potential
! phonon calculation, half G-vectors
#include "machine.h"
#include "f_defs.h"
USE kinds, only : DP
implicit none
......
......@@ -12,7 +12,7 @@ subroutine dielec(do_zstar)
!
! calculates the dielectric tensor and effective charges
!
#include "machine.h"
#include "f_defs.h"
USE ions_base, ONLY : nat, zv, ityp
use pwcom
use cgcom
......
......@@ -12,7 +12,7 @@ subroutine drhodv(nu_i)
!
! calculate the electronic term <psi|dv|dpsi> of the dynamical matrix
!
#include "machine.h"
#include "f_defs.h"
use pwcom
use cgcom
implicit none
......
......@@ -11,7 +11,7 @@ subroutine dvb_cc (nlcc,npseu,ngm,nr1,nr2,nr3,nrx1,nrx2,nrx3, &
!---------------------------------------------------------------------
! calcola il contributo core-correction al Delta V bare
!
#include "machine.h"
#include "f_defs.h"
implicit none
integer:: npseu,ngm,nr1,nr2,nr3,nrx1,nrx2,nrx3,np,ng,i
logical :: nlcc(npseu)
......
......@@ -13,7 +13,7 @@ subroutine dvpsi_e(kpoint,ipol)
! Calculates x * psi_k for each k-points and for the 3 polarizations
! Requires on input: vkb, evc, igk