Remove unused printout_base module.

git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@12523 c92efa57-630b-4861-b058-cf58834340f0
This commit is contained in:
sponce 2016-06-22 11:14:29 +00:00
parent 49a388f9a2
commit c63c0bce11
6 changed files with 5 additions and 340 deletions

View File

@ -1,27 +1,3 @@
# Makefile for EPW
include ../../make.sys
include make.libs
#
# use recursive definitions in Makefile to modify the PATH for modules
#
IFLAGS = -I../../include
MODFLAGS = -I../../iotk/src -I../../Modules -I../../LAXlib -I../../iotk/src \
-I../../FFTXlib -I../../PW/src -I../../LR_Modules -I../../PHonon/PH -I../../PP/src -I.
#
# The above is in alphabetical order except when order matter during compilation
#
EPWOBJS = \
io_epw.o\
elph2.o \
epw.o \
a2f.o \
allocate_epwq.o \
printout_base.o \
bcast_epw_input.o \
broyden.o \
close_epw.o \

View File

@ -43,7 +43,7 @@
wsfc, wscut, write_wfn, wmin_specfun, wmin, &
wmax_specfun, wmax, wepexst, wannierize, &
vme, twophoton, tshuffle2, tshuffle, tphases, &
tempsmin, tempsmax, temps, delta_approx
tempsmin, tempsmax, temps, delta_approx, title
USE elph2, ONLY : elph
USE mp, ONLY : mp_bcast
USE mp_world, ONLY : world_comm
@ -53,9 +53,7 @@
USE io_global, ONLY : ionode_id
USE control_flags, ONLY : iverbosity
USE ions_base, ONLY : amass
USE printout_base, ONLY : title ! title of the run
!
implicit none
!
! logicals

View File

@ -51,13 +51,12 @@
ntempxx, liso, lacon, lpade, etf_mem, epbwrite, &
tshuffle2, tshuffle, nsiter, conv_thr_racon, &
pwc, nswc, nswfc, nswi, filukq, filukk, fildvscf0, &
nbndsub, nbndskip, system_2d, delta_approx
nbndsub, nbndskip, system_2d, delta_approx, title
USE elph2, ONLY : elph
USE start_k, ONLY : nk1, nk2, nk3
USE constants_epw, ONLY : ryd2mev, ryd2ev, ev2cmm1, kelvin2eV
USE io_files, ONLY : tmp_dir, prefix
USE control_flags, ONLY : iverbosity, modenum, gamma_only
USE printout_base, ONLY : title
USE ions_base, ONLY : amass
USE mp_world, ONLY : world_comm
USE partial, ONLY : atomo, nat_todo

View File

@ -23,7 +23,7 @@
USE gvecw, ONLY : ecutwfc
USE symm_base, ONLY : s, sname, ftau, s_axis_to_cart,sr
USE funct, ONLY : write_dft_name
USE printout_base, ONLY : title
USE epwcom, ONLY : title
USE phcom, ONLY : DP, tr2_ph, nmix_ph, alpha_mix
USE lr_symm_base, ONLY : irotmq, minus_q, nsymq, irgq
USE control_flags, ONLY : iverbosity

View File

@ -149,6 +149,7 @@
CHARACTER(len=100) :: dvscf_dir ='./' ! directory for .dvscf and .dyn files (wannier interpolation)
CHARACTER(len=80) :: filelph, fileig ! output file for the electron-phonon coefficients
CHARACTER(len=256), dimension(200) :: proj, wdata ! projections and any extra info for W90
CHARACTER(LEN=75) :: title ! ... title of the simulation
REAL (kind=DP), dimension(25) :: eptemp
REAL (kind=DP), dimension(50) :: temps ! temperature entering in the Eliashberg equtions (units of Kelvin)
integer :: iswitch

View File

@ -1,309 +0,0 @@
!
! Copyright (C) 2010-2016 Samuel Ponce', Roxana Margine, Carla Verdi, Feliciano Giustino
! Copyright (C) 2002 FPMD 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 .
!
! This module contains subroutines to print computed quantities to
! standard output and ASCII file
!
MODULE printout_base
IMPLICIT NONE
SAVE
CHARACTER(LEN=75) :: title
! ... title of the simulation
CHARACTER(LEN=256) :: fort_unit(30:42)
! ... fort_unit = fortran units for saving physical quantity
CHARACTER(LEN=256) :: pprefix
! ... prefix combined with the output path
CONTAINS
SUBROUTINE printout_base_init( outdir, prefix )
USE io_global, ONLY: ionode, ionode_id
USE mp_global, ONLY: intra_image_comm
USE mp, ONLY: mp_bcast
INTEGER :: iunit, ierr
CHARACTER(LEN=*), INTENT(IN) :: outdir
CHARACTER(LEN=*), INTENT(IN) :: prefix
IF( prefix /= ' ' ) THEN
pprefix = TRIM( prefix )
ELSE
pprefix = 'fpmd'
END IF
IF( outdir /= ' ' ) THEN
pprefix = TRIM( outdir ) // '/' // TRIM( pprefix )
END IF
ierr = 0
IF( ionode ) THEN
fort_unit(30) = trim(pprefix)//'.con'
fort_unit(31) = trim(pprefix)//'.eig'
fort_unit(32) = trim(pprefix)//'.pol'
fort_unit(33) = trim(pprefix)//'.evp'
fort_unit(34) = trim(pprefix)//'.vel'
fort_unit(35) = trim(pprefix)//'.pos'
fort_unit(36) = trim(pprefix)//'.cel'
fort_unit(37) = trim(pprefix)//'.for'
fort_unit(38) = trim(pprefix)//'.str'
fort_unit(39) = trim(pprefix)//'.nos'
fort_unit(40) = trim(pprefix)//'.the'
fort_unit(41) = trim(pprefix)//'.spr' ! wannier spread
fort_unit(42) = trim(pprefix)//'.wfc' ! wannier function
DO iunit = LBOUND( fort_unit, 1 ), UBOUND( fort_unit, 1 )
OPEN(UNIT=iunit, FILE=fort_unit(iunit), &
STATUS='unknown', POSITION='append', IOSTAT = ierr )
CLOSE( iunit )
END DO
END IF
CALL mp_bcast(ierr, ionode_id, intra_image_comm)
IF( ierr /= 0 ) &
CALL errore(' printout_base_init ',' error in opening unit, check outdir ',iunit)
RETURN
END SUBROUTINE printout_base_init
SUBROUTINE printout_base_open( suffix )
CHARACTER(LEN=*), OPTIONAL, INTENT(IN) :: suffix
INTEGER :: iunit
LOGICAL :: ok
! ... Open units 30, 31, ... 42 for simulation output
IF( PRESENT( suffix ) ) THEN
IF( LEN( suffix ) /= 3 ) &
CALL errore(" printout_base_open ", " wrong suffix ", 1 )
ok = .false.
END IF
DO iunit = LBOUND( fort_unit, 1 ), UBOUND( fort_unit, 1 )
IF( PRESENT( suffix ) ) THEN
IF( index( fort_unit(iunit), suffix, back=.TRUE. ) == ( len_trim( fort_unit(iunit) ) - 2 ) ) THEN
OPEN( UNIT=iunit, FILE=fort_unit(iunit), STATUS='unknown', POSITION='append')
ok = .true.
END IF
ELSE
OPEN( UNIT=iunit, FILE=fort_unit(iunit), STATUS='unknown', POSITION='append')
END IF
END DO
IF( PRESENT( suffix ) ) THEN
IF( .NOT. ok ) &
CALL errore(" printout_base_open ", " file with suffix "//suffix//" not found ", 1 )
END IF
RETURN
END SUBROUTINE printout_base_open
FUNCTION printout_base_unit( suffix )
! return the unit corresponding to a given suffix
CHARACTER(LEN=*), INTENT(IN) :: suffix
INTEGER :: printout_base_unit
INTEGER :: iunit
LOGICAL :: ok
IF( LEN( suffix ) /= 3 ) &
CALL errore(" printout_base_unit ", " wrong suffix ", 1 )
ok = .false.
DO iunit = LBOUND( fort_unit, 1 ), UBOUND( fort_unit, 1 )
IF( index( fort_unit(iunit), suffix, back=.TRUE. ) == ( len_trim( fort_unit(iunit) ) - 2 ) ) THEN
printout_base_unit = iunit
ok = .true.
END IF
END DO
IF( .NOT. ok ) &
CALL errore(" printout_base_unit ", " file with suffix "//suffix//" not found ", 1 )
RETURN
END FUNCTION printout_base_unit
FUNCTION printout_base_name( suffix )
! return the full name of a print out file with a given suffix
CHARACTER(LEN=*), INTENT(IN) :: suffix
CHARACTER(LEN=256) :: printout_base_name
INTEGER :: iunit
LOGICAL :: ok
IF( LEN( suffix ) /= 3 ) &
CALL errore(" printout_base_name ", " wrong suffix ", 1 )
ok = .false.
DO iunit = LBOUND( fort_unit, 1 ), UBOUND( fort_unit, 1 )
IF( index( fort_unit(iunit), suffix, back=.TRUE. ) == ( len_trim( fort_unit(iunit) ) - 2 ) ) THEN
printout_base_name = fort_unit(iunit)
ok = .true.
END IF
END DO
IF( .NOT. ok ) &
CALL errore(" printout_base_name ", " file with suffix "//suffix//" not found ", 1 )
RETURN
END FUNCTION printout_base_name
SUBROUTINE printout_base_close( suffix )
CHARACTER(LEN=*), OPTIONAL, INTENT(IN) :: suffix
INTEGER :: iunit
LOGICAL :: topen
LOGICAL :: ok
! ... Close and flush unit 30, ... 42
IF( PRESENT( suffix ) ) THEN
IF( LEN( suffix ) /= 3 ) &
CALL errore(" printout_base_close ", " wrong suffix ", 1 )
ok = .false.
END IF
DO iunit = LBOUND( fort_unit, 1 ), UBOUND( fort_unit, 1 )
IF( PRESENT( suffix ) ) THEN
IF( index( fort_unit(iunit), suffix, back=.TRUE. ) == ( len_trim( fort_unit(iunit) ) - 2 ) ) THEN
INQUIRE( UNIT=iunit, OPENED=topen )
IF( topen ) CLOSE(iunit)
ok = .true.
END IF
ELSE
INQUIRE( UNIT=iunit, OPENED=topen )
IF (topen) CLOSE(iunit)
END IF
END DO
IF( PRESENT( suffix ) ) THEN
IF( .NOT. ok ) &
CALL errore(" printout_base_close ", " file with suffix "//suffix//" not found ", 1 )
END IF
RETURN
END SUBROUTINE printout_base_close
SUBROUTINE printout_pos( iunit, tau, nat, what, nfi, tps, label, fact, sort, head )
!
USE kinds
!
INTEGER, INTENT(IN) :: iunit, nat
REAL(DP), INTENT(IN) :: tau( :, : )
CHARACTER(LEN=3), INTENT(IN), OPTIONAL :: what
INTEGER, INTENT(IN), OPTIONAL :: nfi
REAL(DP), INTENT(IN), OPTIONAL :: tps
CHARACTER(LEN=3), INTENT(IN), OPTIONAL :: label( : )
REAL(DP), INTENT(IN), OPTIONAL :: fact
INTEGER, INTENT(IN), OPTIONAL :: sort( : )
CHARACTER(LEN=*), INTENT(IN), OPTIONAL :: head
!
INTEGER :: ia, k
REAL(DP) :: f
!
IF( PRESENT( fact ) ) THEN
f = fact
ELSE
f = 1.0_DP
END IF
!
IF( PRESENT( head ) ) THEN
WRITE( iunit, 10 ) head
END IF
!
IF( PRESENT( what ) ) THEN
IF ( what == 'xyz' ) WRITE( iunit, *) nat
END IF
!
IF( PRESENT( nfi ) .AND. PRESENT( tps ) ) THEN
WRITE( iunit, 30 ) nfi, tps
ELSE IF( PRESENT( what ) ) THEN
IF( what == 'pos' ) THEN
WRITE( iunit, 40 )
ELSE IF( what == 'vel' ) THEN
WRITE( iunit, 50 )
ELSE IF( what == 'for' ) THEN
WRITE( iunit, 60 )
END IF
END IF
!
IF( PRESENT( label ) ) THEN
IF( PRESENT( sort ) ) THEN
DO ia = 1, nat
WRITE( iunit, 255 ) label( sort(ia) ), ( f * tau(k, sort(ia) ),k = 1,3)
END DO
ELSE
DO ia = 1, nat
WRITE( iunit, 255 ) label(ia), ( f * tau(k,ia),k = 1,3)
END DO
END IF
ELSE
DO ia = 1, nat
WRITE( iunit, 252 ) (tau(k,ia),k = 1,3)
END DO
END IF
10 FORMAT(3X,A)
30 FORMAT(I7,1X,F11.8)
40 FORMAT(3X,'ATOMIC_POSITIONS')
50 FORMAT(3X,'ATOMIC_VELOCITIES')
60 FORMAT(3X,'Forces acting on atoms (au):')
255 FORMAT(3X,A3,3E14.6)
252 FORMAT(3E14.6)
RETURN
END SUBROUTINE printout_pos
SUBROUTINE printout_cell( iunit, h, nfi, tps )
!
USE kinds
!
INTEGER, INTENT(IN) :: iunit
REAL(DP), INTENT(IN) :: h(3,3)
INTEGER, INTENT(IN), OPTIONAL :: nfi
REAL(DP), INTENT(IN), OPTIONAL :: tps
!
INTEGER :: i, j
!
IF( PRESENT( nfi ) .AND. PRESENT( tps ) ) THEN
WRITE( iunit, 30 ) nfi, tps
ELSE
WRITE( iunit, 40 )
END IF
!
DO i = 1, 3
WRITE( iunit, 100 ) (h(i,j),j=1,3)
END DO
!
30 FORMAT(I7,1X,F11.8)
40 FORMAT(3X,'CELL_PARAMETERS')
100 FORMAT(3F14.8)
RETURN
END SUBROUTINE printout_cell
SUBROUTINE printout_stress( iunit, str, nfi, tps )
!
USE kinds
!
INTEGER, INTENT(IN) :: iunit
REAL(DP), INTENT(IN) :: str(3,3)
INTEGER, INTENT(IN), OPTIONAL :: nfi
REAL(DP), INTENT(IN), OPTIONAL :: tps
!
INTEGER :: i, j
!
IF( PRESENT( nfi ) .AND. PRESENT( tps ) ) THEN
WRITE( iunit, 30 ) nfi, tps
ELSE
WRITE( iunit, 40 )
END IF
!
DO i = 1, 3
WRITE( iunit, 100 ) (str(i,j),j=1,3)
END DO
!
30 FORMAT(I7,1X,F11.8)
40 FORMAT(3X,'Total stress (GPa)')
100 FORMAT(3(F18.8,1X))
RETURN
END SUBROUTINE printout_stress
END MODULE printout_base