mirror of https://gitlab.com/QEF/q-e.git
Internal name of variable outdir in CP is now tmp_dir like in PWscf.
Just a very minor first step towards a cleanup of the current file and directory mess. git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@6141 c92efa57-630b-4861-b058-cf58834340f0
This commit is contained in:
parent
1c7558e16f
commit
6713dfa674
|
@ -1,5 +1,5 @@
|
|||
!
|
||||
! Copyright (C) 2002 CP90 group
|
||||
! Copyright (C) 2002-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,
|
||||
|
@ -48,7 +48,7 @@
|
|||
use cdvan
|
||||
use constants, only : pi, au_gpa
|
||||
use io_files, only : psfile, pseudo_dir
|
||||
USE io_files, ONLY : outdir, prefix
|
||||
USE io_files, ONLY : tmp_dir, prefix
|
||||
use uspp, only : nhsa=> nkb, nhsavb=> nkbus, betae => vkb, rhovan => becsum, deeq,qq
|
||||
use uspp_param, only : nh
|
||||
use cg_module, only : ene_ok, maxiter,niter_cg_restart, &
|
||||
|
@ -144,7 +144,7 @@
|
|||
|
||||
|
||||
if(ionode) then
|
||||
uname = TRIM( outdir ) // trim(prefix) // '.' &
|
||||
uname = TRIM( tmp_dir ) // trim(prefix) // '.' &
|
||||
// trim(int_to_char( my_image_id )) // '_' // trim(int_to_char( me_image))
|
||||
!open(37,file='convergence.dat',status='unknown')!for debug and tuning purposes
|
||||
open(37,file=uname,status='unknown')!for debug and tuning purposes
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
!
|
||||
! Copyright (C) 2002-2005 FPMD-CPV groups
|
||||
! Copyright (C) 2002-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,
|
||||
|
@ -1295,7 +1295,7 @@ END SUBROUTINE rhov
|
|||
use grid_dimensions, ONLY: nr1, nr2, nr3, nr1x, nr2x, nnrx
|
||||
use xml_io_base, ONLY: read_rho_xml, restart_dir
|
||||
use control_flags, ONLY: ndr
|
||||
USE io_files, ONLY: outdir
|
||||
USE io_files, ONLY: tmp_dir
|
||||
!
|
||||
implicit none
|
||||
!
|
||||
|
@ -1305,7 +1305,7 @@ END SUBROUTINE rhov
|
|||
integer :: is
|
||||
CHARACTER(LEN=256) :: filename
|
||||
!
|
||||
filename = restart_dir( outdir, ndr )
|
||||
filename = restart_dir( tmp_dir, ndr )
|
||||
!
|
||||
filename = TRIM(filename) // '/' // 'charge-density'
|
||||
!
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
!
|
||||
! Copyright (C) 2002-2005 Quantum ESPRESSO group
|
||||
! Copyright (C) 2002-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,
|
||||
|
@ -26,7 +26,7 @@ SUBROUTINE compute_fes_grads( fii, lii, stat )
|
|||
USE ions_base, ONLY : tau, nat, nsp, ityp, if_pos, sort_tau, &
|
||||
tau_srt, ind_srt
|
||||
USE path_formats, ONLY : scf_fmt, scf_fmt_para
|
||||
USE io_files, ONLY : prefix, outdir, iunpath, iunaxsf, &
|
||||
USE io_files, ONLY : prefix, tmp_dir, iunpath, iunaxsf, &
|
||||
iunupdate, exit_file, iunexit
|
||||
USE constants, ONLY : bohr_radius_angs
|
||||
USE io_global, ONLY : stdout, ionode, ionode_id, meta_ionode
|
||||
|
@ -46,7 +46,7 @@ SUBROUTINE compute_fes_grads( fii, lii, stat )
|
|||
INTEGER, INTENT(IN) :: fii, lii
|
||||
LOGICAL, INTENT(OUT) :: stat
|
||||
INTEGER :: image, iter
|
||||
CHARACTER(LEN=256) :: outdir_saved, filename
|
||||
CHARACTER(LEN=256) :: tmp_dir_saved, filename
|
||||
LOGICAL :: file_exists, opnd
|
||||
LOGICAL :: tnosep_saved
|
||||
REAL(DP) :: tcpu
|
||||
|
@ -69,7 +69,7 @@ SUBROUTINE compute_fes_grads( fii, lii, stat )
|
|||
!
|
||||
CALL flush_unit( iunpath )
|
||||
!
|
||||
outdir_saved = outdir
|
||||
tmp_dir_saved = tmp_dir
|
||||
tnosep_saved = tnosep
|
||||
!
|
||||
! ... vectors pes and grad_pes are initalized to zero for all images on
|
||||
|
@ -88,7 +88,7 @@ SUBROUTINE compute_fes_grads( fii, lii, stat )
|
|||
! ... only the first cpu initializes the file needed by parallelization
|
||||
! ... among images
|
||||
!
|
||||
IF ( meta_ionode ) CALL new_image_init( fii, outdir_saved )
|
||||
IF ( meta_ionode ) CALL new_image_init( fii, tmp_dir_saved )
|
||||
!
|
||||
image = fii + my_image_id
|
||||
!
|
||||
|
@ -131,7 +131,7 @@ SUBROUTINE compute_fes_grads( fii, lii, stat )
|
|||
!
|
||||
END IF
|
||||
!
|
||||
outdir = TRIM( outdir_saved ) // "/" // TRIM( prefix ) // &
|
||||
tmp_dir= TRIM(tmp_dir_saved ) // "/" // TRIM( prefix ) // &
|
||||
& "_" // TRIM( int_to_char( image ) ) // "/"
|
||||
!
|
||||
! ... unit stdout is connected to the appropriate file
|
||||
|
@ -140,7 +140,7 @@ SUBROUTINE compute_fes_grads( fii, lii, stat )
|
|||
!
|
||||
INQUIRE( UNIT = stdout, OPENED = opnd )
|
||||
IF ( opnd ) CLOSE( UNIT = stdout )
|
||||
OPEN( UNIT = stdout, FILE = TRIM( outdir ) // 'CP.out', &
|
||||
OPEN( UNIT = stdout, FILE = TRIM( tmp_dir) // 'CP.out', &
|
||||
STATUS = 'UNKNOWN', POSITION = 'APPEND' )
|
||||
!
|
||||
END IF
|
||||
|
@ -152,7 +152,7 @@ SUBROUTINE compute_fes_grads( fii, lii, stat )
|
|||
!
|
||||
CALL modules_setup()
|
||||
!
|
||||
filename = TRIM( outdir ) // "therm_average.restart"
|
||||
filename = TRIM( tmp_dir) // "therm_average.restart"
|
||||
!
|
||||
INQUIRE( FILE = filename, EXIST = file_exists )
|
||||
!
|
||||
|
@ -249,7 +249,7 @@ SUBROUTINE compute_fes_grads( fii, lii, stat )
|
|||
!
|
||||
tconvthrs%active = .TRUE.
|
||||
!
|
||||
IF ( check_restartfile( outdir, ndr ) ) THEN
|
||||
IF ( check_restartfile(tmp_dir, ndr ) ) THEN
|
||||
!
|
||||
WRITE( stdout, '(/,3X,"restarting from file",/)' )
|
||||
!
|
||||
|
@ -370,7 +370,7 @@ SUBROUTINE compute_fes_grads( fii, lii, stat )
|
|||
!
|
||||
! ... the new image is obtained
|
||||
!
|
||||
CALL get_new_image( image, outdir_saved )
|
||||
CALL get_new_image( image,tmp_dir_saved )
|
||||
!
|
||||
CALL mp_bcast( image, ionode_id, intra_image_comm )
|
||||
!
|
||||
|
@ -385,10 +385,10 @@ SUBROUTINE compute_fes_grads( fii, lii, stat )
|
|||
!
|
||||
DO image = fii, lii
|
||||
!
|
||||
outdir = TRIM(outdir_saved ) // TRIM( prefix ) // &
|
||||
tmp_dir= TRIM(tmp_dir_saved ) // TRIM( prefix ) // &
|
||||
& "_" // TRIM( int_to_char( image ) ) // "/"
|
||||
!
|
||||
filename = TRIM( outdir ) // "therm_average.restart"
|
||||
filename = TRIM( tmp_dir ) // "therm_average.restart"
|
||||
!
|
||||
OPEN( UNIT = 1000, FILE = filename )
|
||||
!
|
||||
|
@ -430,10 +430,10 @@ SUBROUTINE compute_fes_grads( fii, lii, stat )
|
|||
!
|
||||
DO image = 1, num_of_images
|
||||
!
|
||||
outdir = TRIM( outdir_saved ) // TRIM( prefix ) // &
|
||||
tmp_dir = TRIM( tmp_dir_saved ) // TRIM( prefix ) // &
|
||||
& "_" // TRIM( int_to_char( image ) ) // "/"
|
||||
!
|
||||
filename = TRIM( outdir ) // "therm_average.restart"
|
||||
filename = TRIM( tmp_dir ) // "therm_average.restart"
|
||||
!
|
||||
OPEN( UNIT = 1000, FILE = filename )
|
||||
!
|
||||
|
@ -454,7 +454,7 @@ SUBROUTINE compute_fes_grads( fii, lii, stat )
|
|||
!
|
||||
DEALLOCATE( tauout, fion )
|
||||
!
|
||||
outdir = outdir_saved
|
||||
tmp_dir= tmp_dir_saved
|
||||
tnosep = tnosep_saved
|
||||
!
|
||||
IF ( nimage > 1 ) THEN
|
||||
|
@ -505,7 +505,7 @@ SUBROUTINE metadyn()
|
|||
ampre, nbeg, tfor, taurdr, ndr, ndw, isave
|
||||
USE ions_base, ONLY : nat, nsp, ityp, if_pos
|
||||
USE io_global, ONLY : stdout, ionode, ionode_id
|
||||
USE io_files, ONLY : iunmeta, iunaxsf, outdir
|
||||
USE io_files, ONLY : iunmeta, iunaxsf, tmp_dir
|
||||
USE metadyn_vars, ONLY : ncolvar, fe_grad, new_target, to_target, &
|
||||
metadyn_fmt, to_new_target, fe_step, &
|
||||
metadyn_history, max_metadyn_iter, &
|
||||
|
@ -531,7 +531,7 @@ SUBROUTINE metadyn()
|
|||
LOGICAL :: tnosep_saved
|
||||
!
|
||||
!
|
||||
dirname = restart_dir( outdir, ndw )
|
||||
dirname = restart_dir( tmp_dir, ndw )
|
||||
!
|
||||
ALLOCATE( tau( 3, nat ), fion( 3, nat ) )
|
||||
!
|
||||
|
@ -569,7 +569,7 @@ SUBROUTINE metadyn()
|
|||
!
|
||||
CALL set_time_step( delt )
|
||||
!
|
||||
ELSE IF ( check_restartfile( outdir, ndr ) ) THEN
|
||||
ELSE IF ( check_restartfile( tmp_dir, ndr ) ) THEN
|
||||
!
|
||||
WRITE( stdout, '(/,3X,"restarting from file",/)' )
|
||||
!
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
!
|
||||
! Copyright (C) 2002-2005 Quantum ESPRESSO group
|
||||
! Copyright (C) 2002-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,
|
||||
|
@ -18,7 +18,7 @@ SUBROUTINE compute_scf( N_in, N_fin, stat )
|
|||
USE control_flags, ONLY : conv_elec, ndr, program_name, nbeg, taurdr, &
|
||||
trane, ampre, nomore, tfor, isave
|
||||
USE cp_main_variables, ONLY : nfi
|
||||
USE io_files, ONLY : iunpath, iunexit, outdir, prefix
|
||||
USE io_files, ONLY : iunpath, iunexit, tmp_dir, prefix
|
||||
USE io_global, ONLY : stdout, ionode
|
||||
USE path_formats, ONLY : scf_fmt
|
||||
USE path_variables, ONLY : pos, pes, grad_pes, num_of_images, &
|
||||
|
@ -35,7 +35,7 @@ SUBROUTINE compute_scf( N_in, N_fin, stat )
|
|||
!
|
||||
INTEGER :: image
|
||||
REAL(DP) :: tcpu
|
||||
CHARACTER(LEN=256) :: outdir_saved
|
||||
CHARACTER(LEN=256) :: tmp_dir_saved
|
||||
LOGICAL :: opnd
|
||||
REAL(DP), ALLOCATABLE :: tau(:,:)
|
||||
REAL(DP), ALLOCATABLE :: fion(:,:)
|
||||
|
@ -50,7 +50,7 @@ SUBROUTINE compute_scf( N_in, N_fin, stat )
|
|||
!
|
||||
ALLOCATE( tau( 3, nat ), fion( 3, nat ) )
|
||||
!
|
||||
outdir_saved = outdir
|
||||
tmp_dir_saved = tmp_dir
|
||||
!
|
||||
DO image = N_in, N_fin
|
||||
!
|
||||
|
@ -66,8 +66,8 @@ SUBROUTINE compute_scf( N_in, N_fin, stat )
|
|||
!
|
||||
END IF
|
||||
!
|
||||
outdir = TRIM( outdir_saved ) // "/" // TRIM( prefix ) // "_" // &
|
||||
TRIM( int_to_char( image ) ) // "/"
|
||||
tmp_dir = TRIM ( tmp_dir_saved ) // "/" // TRIM( prefix ) // "_" // &
|
||||
TRIM( int_to_char( image ) ) // "/"
|
||||
!
|
||||
tcpu = get_clock( 'CP' )
|
||||
!
|
||||
|
@ -79,7 +79,7 @@ SUBROUTINE compute_scf( N_in, N_fin, stat )
|
|||
!
|
||||
INQUIRE( UNIT = stdout, OPENED = opnd )
|
||||
IF ( opnd ) CLOSE( UNIT = stdout )
|
||||
OPEN( UNIT = stdout, FILE = TRIM( outdir ) // 'CP.out', &
|
||||
OPEN( UNIT = stdout, FILE = TRIM( tmp_dir ) // 'CP.out', &
|
||||
STATUS = 'UNKNOWN', POSITION = 'APPEND' )
|
||||
!
|
||||
END IF
|
||||
|
@ -96,7 +96,7 @@ SUBROUTINE compute_scf( N_in, N_fin, stat )
|
|||
nfi = 0
|
||||
tfor = .FALSE.
|
||||
!
|
||||
IF ( check_restartfile( outdir, ndr ) ) THEN
|
||||
IF ( check_restartfile( tmp_dir, ndr ) ) THEN
|
||||
!
|
||||
WRITE( stdout, '(/,2X,"restarting from file",/)' )
|
||||
!
|
||||
|
@ -163,7 +163,7 @@ SUBROUTINE compute_scf( N_in, N_fin, stat )
|
|||
!
|
||||
END DO
|
||||
!
|
||||
outdir = outdir_saved
|
||||
tmp_dir = tmp_dir_saved
|
||||
!
|
||||
pending_image = 0
|
||||
!
|
||||
|
|
|
@ -40,7 +40,7 @@ MODULE cp_restart
|
|||
CONTAINS
|
||||
!
|
||||
!------------------------------------------------------------------------
|
||||
SUBROUTINE cp_writefile( ndw, outdir, ascii, nfi, simtime, acc, nk, xk, &
|
||||
SUBROUTINE cp_writefile( ndw, tmp_dir, ascii, nfi, simtime, acc, nk, xk, &
|
||||
wk, ht, htm, htvel, gvel, xnhh0, xnhhm, vnhh, &
|
||||
taui, cdmi, stau0, svel0, staum, svelm, force, &
|
||||
vnhp, xnhp0, xnhpm, nhpcl, nhpdim, occ0, occm, &
|
||||
|
@ -79,7 +79,7 @@ MODULE cp_restart
|
|||
IMPLICIT NONE
|
||||
!
|
||||
INTEGER, INTENT(IN) :: ndw !
|
||||
CHARACTER(LEN=*), INTENT(IN) :: outdir ! directory used to store output and restart files
|
||||
CHARACTER(LEN=*), INTENT(IN) :: tmp_dir ! directory used to store output and restart files
|
||||
LOGICAL, INTENT(IN) :: ascii !
|
||||
INTEGER, INTENT(IN) :: nfi ! index of the current step
|
||||
REAL(DP), INTENT(IN) :: simtime ! simulated time
|
||||
|
@ -183,7 +183,7 @@ MODULE cp_restart
|
|||
CALL errore( 'cp_writefile', &
|
||||
'no free units to write wavefunctions', ierr )
|
||||
!
|
||||
dirname = restart_dir( outdir, ndw )
|
||||
dirname = restart_dir( tmp_dir, ndw )
|
||||
!
|
||||
! ... Create main restart directory
|
||||
!
|
||||
|
@ -888,7 +888,7 @@ MODULE cp_restart
|
|||
END SUBROUTINE cp_writefile
|
||||
!
|
||||
!------------------------------------------------------------------------
|
||||
SUBROUTINE cp_readfile( ndr, outdir, ascii, nfi, simtime, acc, nk, xk, &
|
||||
SUBROUTINE cp_readfile( ndr, tmp_dir, ascii, nfi, simtime, acc, nk, xk, &
|
||||
wk, ht, htm, htvel, gvel, xnhh0, xnhhm, vnhh, &
|
||||
taui, cdmi, stau0, svel0, staum, svelm, force, &
|
||||
vnhp, xnhp0, xnhpm, nhpcl,nhpdim,occ0, occm, &
|
||||
|
@ -921,7 +921,7 @@ MODULE cp_restart
|
|||
IMPLICIT NONE
|
||||
!
|
||||
INTEGER, INTENT(IN) :: ndr ! I/O unit number
|
||||
CHARACTER(LEN=*), INTENT(IN) :: outdir !
|
||||
CHARACTER(LEN=*), INTENT(IN) :: tmp_dir !
|
||||
LOGICAL, INTENT(IN) :: ascii !
|
||||
INTEGER, INTENT(INOUT) :: nfi ! index of the current step
|
||||
REAL(DP), INTENT(INOUT) :: simtime ! simulated time
|
||||
|
@ -1015,7 +1015,7 @@ MODULE cp_restart
|
|||
kunit = 1
|
||||
found = .FALSE.
|
||||
!
|
||||
dirname = restart_dir( outdir, ndr )
|
||||
dirname = restart_dir( tmp_dir, ndr )
|
||||
!
|
||||
! ... Open XML descriptor
|
||||
!
|
||||
|
@ -1739,7 +1739,7 @@ MODULE cp_restart
|
|||
END IF
|
||||
!
|
||||
if ( nprint_nfi == -2 ) then
|
||||
CALL read_print_counter( nprint_nfi, outdir, ndr )
|
||||
CALL read_print_counter( nprint_nfi, tmp_dir, ndr )
|
||||
IF( iprsta > 2 ) write( stdout,*) 'nprint_nfi= ',nprint_nfi
|
||||
endif
|
||||
!
|
||||
|
@ -1748,7 +1748,7 @@ MODULE cp_restart
|
|||
END SUBROUTINE cp_readfile
|
||||
!
|
||||
!------------------------------------------------------------------------
|
||||
SUBROUTINE cp_read_wfc( ndr, outdir, ik, nk, iss, nspin, c2, tag )
|
||||
SUBROUTINE cp_read_wfc( ndr, tmp_dir, ik, nk, iss, nspin, c2, tag )
|
||||
!------------------------------------------------------------------------
|
||||
!
|
||||
USE electrons_base, ONLY : iupdwn, nupdwn
|
||||
|
@ -1757,7 +1757,7 @@ MODULE cp_restart
|
|||
IMPLICIT NONE
|
||||
!
|
||||
INTEGER, INTENT(IN) :: ndr
|
||||
CHARACTER(LEN=*), INTENT(IN) :: outdir
|
||||
CHARACTER(LEN=*), INTENT(IN) :: tmp_dir
|
||||
INTEGER, INTENT(IN) :: ik, iss, nk, nspin
|
||||
CHARACTER, INTENT(IN) :: tag
|
||||
COMPLEX(DP), OPTIONAL, INTENT(OUT) :: c2(:,:)
|
||||
|
@ -1770,7 +1770,7 @@ MODULE cp_restart
|
|||
!
|
||||
ik_eff = ik + ( iss - 1 ) * nk
|
||||
!
|
||||
dirname = restart_dir( outdir, ndr )
|
||||
dirname = restart_dir( tmp_dir, ndr )
|
||||
!
|
||||
IF ( tag /= 'm' ) THEN
|
||||
!
|
||||
|
@ -1810,7 +1810,7 @@ MODULE cp_restart
|
|||
END SUBROUTINE cp_read_wfc
|
||||
!
|
||||
!------------------------------------------------------------------------
|
||||
SUBROUTINE cp_read_cell( ndr, outdir, ascii, ht, &
|
||||
SUBROUTINE cp_read_cell( ndr, tmp_dir, ascii, ht, &
|
||||
htm, htvel, gvel, xnhh0, xnhhm, vnhh )
|
||||
!------------------------------------------------------------------------
|
||||
!
|
||||
|
@ -1821,7 +1821,7 @@ MODULE cp_restart
|
|||
IMPLICIT NONE
|
||||
!
|
||||
INTEGER, INTENT(IN) :: ndr
|
||||
CHARACTER(LEN=*), INTENT(IN) :: outdir
|
||||
CHARACTER(LEN=*), INTENT(IN) :: tmp_dir
|
||||
LOGICAL, INTENT(IN) :: ascii
|
||||
REAL(DP), INTENT(INOUT) :: ht(3,3)
|
||||
REAL(DP), INTENT(INOUT) :: htm(3,3)
|
||||
|
@ -1846,7 +1846,7 @@ MODULE cp_restart
|
|||
CHARACTER(LEN=9) :: symm_type_
|
||||
!
|
||||
!
|
||||
dirname = restart_dir( outdir, ndr )
|
||||
dirname = restart_dir( tmp_dir, ndr )
|
||||
!
|
||||
filename = TRIM( dirname ) // '/' // TRIM( xmlpun )
|
||||
!
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
USE io_global, ONLY: stdout, ionode, ionode_id
|
||||
USE mp, ONLY: mp_bcast, mp_sum
|
||||
USE mp_wave, ONLY: splitwf
|
||||
USE io_files, ONLY: outdir
|
||||
USE io_files, ONLY: tmp_dir
|
||||
USE io_files, ONLY: empty_file, emptyunit
|
||||
USE reciprocal_vectors, ONLY: ig_l2g
|
||||
USE gvecw, ONLY: ngw
|
||||
|
@ -48,8 +48,8 @@
|
|||
!
|
||||
ALLOCATE( ctmp(ngw_g) )
|
||||
|
||||
IF( LEN( TRIM( outdir ) ) > 1 ) THEN
|
||||
fileempty = TRIM( outdir ) // '/' // TRIM( empty_file )
|
||||
IF( LEN( TRIM( tmp_dir ) ) > 1 ) THEN
|
||||
fileempty = TRIM( tmp_dir ) // '/' // TRIM( empty_file )
|
||||
ELSE
|
||||
fileempty = TRIM( empty_file )
|
||||
END IF
|
||||
|
@ -119,7 +119,7 @@
|
|||
USE mp_global, ONLY: me_image, nproc_image, intra_image_comm
|
||||
USE mp_wave, ONLY: mergewf
|
||||
USE mp, ONLY: mp_sum
|
||||
USE io_files, ONLY: empty_file, emptyunit, outdir
|
||||
USE io_files, ONLY: empty_file, emptyunit, tmp_dir
|
||||
USE io_global, ONLY: ionode, ionode_id, stdout
|
||||
USE reciprocal_vectors, ONLY: ig_l2g
|
||||
USE gvecw, ONLY: ngw
|
||||
|
@ -141,8 +141,8 @@
|
|||
!
|
||||
ALLOCATE( ctmp( ngw_g ) )
|
||||
|
||||
IF( LEN( TRIM( outdir ) ) > 1 ) THEN
|
||||
fileempty = TRIM( outdir ) // '/' // TRIM( empty_file )
|
||||
IF( LEN( TRIM( tmp_dir ) ) > 1 ) THEN
|
||||
fileempty = TRIM( tmp_dir ) // '/' // TRIM( empty_file )
|
||||
ELSE
|
||||
fileempty = TRIM( empty_file )
|
||||
END IF
|
||||
|
|
|
@ -24,7 +24,7 @@ PROGRAM fpmd_postproc
|
|||
|
||||
USE kinds, ONLY : DP
|
||||
USE constants, ONLY : bohr => BOHR_RADIUS_ANGS
|
||||
USE io_files, ONLY : prefix, iunpun, xmlpun, outdir
|
||||
USE io_files, ONLY : prefix, iunpun, xmlpun, tmp_dir, outdir
|
||||
USE io_global, ONLY : io_global_start
|
||||
USE mp_global, ONLY : mp_global_start
|
||||
USE mp, ONLY : mp_end, mp_start, mp_env
|
||||
|
@ -89,7 +89,6 @@ PROGRAM fpmd_postproc
|
|||
prefix = 'cp'
|
||||
fileout = 'out'
|
||||
output = 'xsf' ! 'grd'
|
||||
outdir = './'
|
||||
lcharge = .false.
|
||||
lforces = .false.
|
||||
ldynamics = .false.
|
||||
|
@ -117,9 +116,10 @@ PROGRAM fpmd_postproc
|
|||
|
||||
! set file names
|
||||
!
|
||||
filecel = TRIM(outdir) // TRIM(prefix) // '.cel'
|
||||
filepos = TRIM(outdir) // TRIM(prefix) // '.pos'
|
||||
filefor = TRIM(outdir) // TRIM(prefix) // '.for'
|
||||
tmp_dir = TRIM(outdir)
|
||||
filecel = TRIM(tmp_dir) // TRIM(prefix) // '.cel'
|
||||
filepos = TRIM(tmp_dir) // TRIM(prefix) // '.pos'
|
||||
filefor = TRIM(tmp_dir) // TRIM(prefix) // '.for'
|
||||
!
|
||||
filepdb = TRIM(fileout) // '.pdb'
|
||||
!
|
||||
|
@ -163,7 +163,7 @@ PROGRAM fpmd_postproc
|
|||
! Now read the XML data file
|
||||
!
|
||||
|
||||
filepp = restart_dir( outdir, ndr )
|
||||
filepp = restart_dir( tmp_dir, ndr )
|
||||
!
|
||||
filepp = TRIM( filepp ) // '/' // TRIM(xmlpun)
|
||||
!
|
||||
|
@ -334,7 +334,7 @@ PROGRAM fpmd_postproc
|
|||
!
|
||||
CALL read_fpmd( lforces, lcharge, lbinary, cunit, punit, funit, dunit, &
|
||||
natoms, nr1, nr2, nr3, ispin, at, tau_in, force, &
|
||||
rho_in, prefix, outdir, ndr, charge_density )
|
||||
rho_in, prefix, tmp_dir, ndr, charge_density )
|
||||
|
||||
IF( nframes == 1 ) THEN
|
||||
!
|
||||
|
@ -480,7 +480,7 @@ END PROGRAM fpmd_postproc
|
|||
|
||||
SUBROUTINE read_fpmd( lforces, lcharge, lbinary, cunit, punit, funit, dunit, &
|
||||
natoms, nr1, nr2, nr3, ispin, at, tau, force, &
|
||||
rho, prefix, outdir, ndr, charge_density )
|
||||
rho, prefix, tmp_dir, ndr, charge_density )
|
||||
|
||||
USE kinds, ONLY: DP
|
||||
USE constants, ONLY: bohr => BOHR_RADIUS_ANGS
|
||||
|
@ -495,7 +495,7 @@ SUBROUTINE read_fpmd( lforces, lcharge, lbinary, cunit, punit, funit, dunit, &
|
|||
REAL(DP), INTENT(out) :: at(3, 3), tau(3, natoms), force(3, natoms)
|
||||
REAL(DP), INTENT(out) :: rho(nr1, nr2, nr3)
|
||||
CHARACTER(LEN=*), INTENT(IN) :: prefix
|
||||
CHARACTER(LEN=*), INTENT(IN) :: outdir
|
||||
CHARACTER(LEN=*), INTENT(IN) :: tmp_dir
|
||||
CHARACTER(LEN=*), INTENT(IN) :: charge_density
|
||||
|
||||
INTEGER :: i, j, ix, iy, iz, ierr
|
||||
|
@ -535,7 +535,7 @@ SUBROUTINE read_fpmd( lforces, lcharge, lbinary, cunit, punit, funit, dunit, &
|
|||
|
||||
IF (lcharge) THEN
|
||||
|
||||
filename = restart_dir( outdir, ndr )
|
||||
filename = restart_dir( tmp_dir, ndr )
|
||||
!
|
||||
IF( charge_density == 'spin' ) THEN
|
||||
filename = TRIM( filename ) // '/' // 'spin-polarization'
|
||||
|
|
|
@ -219,7 +219,7 @@
|
|||
use control_flags, only: iprint, thdyn, ndr, nbeg, program_name, tbeg
|
||||
use io_global, only: stdout, ionode
|
||||
use mp_global, only: nproc_image
|
||||
USE io_files, ONLY: outdir
|
||||
USE io_files, ONLY: tmp_dir
|
||||
use ions_base, only: na, nsp, nat, tau_srt, ind_srt, if_pos, atm, na, pmass
|
||||
use cell_base, only: a1, a2, a3, r_to_s, cell_init, deth
|
||||
|
||||
|
@ -283,7 +283,7 @@
|
|||
!
|
||||
! read only h and hold from restart file "ndr"
|
||||
!
|
||||
CALL cp_read_cell( ndr, outdir, .TRUE., ht, hold, velh, gvel, xnhh0, xnhhm, vnhh )
|
||||
CALL cp_read_cell( ndr, tmp_dir, .TRUE., ht, hold, velh, gvel, xnhh0, xnhhm, vnhh )
|
||||
|
||||
CALL cell_init( 't', ht0, ht )
|
||||
CALL cell_init( 't', htm, hold )
|
||||
|
|
|
@ -70,7 +70,7 @@ SUBROUTINE init_run()
|
|||
USE efield_module, ONLY : allocate_efield, allocate_efield2
|
||||
USE cg_module, ONLY : allocate_cg
|
||||
USE wannier_module, ONLY : allocate_wannier
|
||||
USE io_files, ONLY : outdir, prefix
|
||||
USE io_files, ONLY : tmp_dir, prefix
|
||||
USE io_global, ONLY : ionode, stdout
|
||||
USE printout_base, ONLY : printout_base_init
|
||||
USE wave_types, ONLY : wave_descriptor_info
|
||||
|
@ -90,9 +90,9 @@ SUBROUTINE init_run()
|
|||
!
|
||||
! ... initialize directories
|
||||
!
|
||||
CALL printout_base_init( outdir, prefix )
|
||||
CALL printout_base_init( tmp_dir, prefix )
|
||||
!
|
||||
dirname = restart_dir( outdir, ndw )
|
||||
dirname = restart_dir( tmp_dir, ndw )
|
||||
!
|
||||
! ... Create main restart directory
|
||||
!
|
||||
|
|
|
@ -60,7 +60,6 @@
|
|||
USE dener
|
||||
!USE derho
|
||||
USE cdvan
|
||||
USE io_files, ONLY: psfile, pseudo_dir, outdir
|
||||
USE uspp, ONLY: nhsa=> nkb, betae => vkb, &
|
||||
rhovan => becsum, deeq
|
||||
USE uspp_param, ONLY: nh
|
||||
|
@ -375,7 +374,6 @@
|
|||
USE dener
|
||||
!USE derho
|
||||
USE cdvan
|
||||
USE io_files, ONLY: psfile, pseudo_dir, outdir
|
||||
USE uspp, ONLY: nhsa=> nkb, betae => vkb, &
|
||||
rhovan => becsum, deeq
|
||||
USE uspp_param, ONLY: nh
|
||||
|
@ -574,7 +572,6 @@
|
|||
USE dener
|
||||
!USE derho
|
||||
USE cdvan
|
||||
USE io_files, ONLY: psfile, pseudo_dir, outdir
|
||||
USE uspp, ONLY: nhsa=> nkb, betae => vkb, &
|
||||
rhovan => becsum, deeq
|
||||
USE uspp_param, ONLY: nh
|
||||
|
|
|
@ -101,7 +101,7 @@ MODULE input
|
|||
USE io_files, ONLY : psfile_ => psfile , &
|
||||
pseudo_dir_ => pseudo_dir, &
|
||||
outdir_ => outdir, &
|
||||
prefix_ => prefix
|
||||
prefix_ => prefix, tmp_dir
|
||||
USE ions_base, ONLY : nsp_ => nsp, nat_ => nat
|
||||
!
|
||||
IMPLICIT NONE
|
||||
|
@ -112,6 +112,7 @@ MODULE input
|
|||
!
|
||||
prefix_ = TRIM( prefix )
|
||||
outdir_ = TRIM( outdir )
|
||||
tmp_dir = TRIM( outdir )
|
||||
!
|
||||
! ... Set internal variables for the number of species and number of atoms
|
||||
!
|
||||
|
|
|
@ -139,7 +139,6 @@ SUBROUTINE cpmain_x( tau, fion, etot )
|
|||
USE uspp_param, ONLY: nhm
|
||||
USE core, ONLY: deallocate_core
|
||||
USE local_pseudo, ONLY: deallocate_local_pseudo
|
||||
USE io_files, ONLY: outdir, prefix
|
||||
USE printout_base, ONLY: printout_base_init
|
||||
USE cp_main_variables, ONLY: ei1, ei2, ei3, eigr, sfac, lambda, &
|
||||
ht0, htm, htp, rhor, vpot, rhog, rhos, wfill, &
|
||||
|
|
|
@ -47,7 +47,7 @@ MODULE path_routines
|
|||
path_thr_ => path_thr, &
|
||||
use_freezing_ => use_freezing
|
||||
!
|
||||
USE io_files, ONLY : prefix, outdir, tmp_dir, &
|
||||
USE io_files, ONLY : prefix, tmp_dir, &
|
||||
check_writable, delete_if_present
|
||||
USE io_global, ONLY : ionode, ionode_id
|
||||
USE ions_base, ONLY : nat
|
||||
|
@ -64,12 +64,10 @@ MODULE path_routines
|
|||
INTEGER :: image, i, ia
|
||||
INTEGER :: ios
|
||||
REAL(DP), ALLOCATABLE :: tau(:,:)
|
||||
CHARACTER(LEN=256) :: outdir_neb
|
||||
CHARACTER(LEN=256) :: tmp_dir_neb
|
||||
CHARACTER(LEN=256) :: filename
|
||||
CHARACTER (LEN=6), EXTERNAL :: int_to_char
|
||||
!
|
||||
tmp_dir = TRIM( outdir )
|
||||
!
|
||||
tprnfor = .TRUE.
|
||||
nstep_path = nstep
|
||||
!
|
||||
|
@ -223,13 +221,13 @@ MODULE path_routines
|
|||
!
|
||||
ios = 0
|
||||
!
|
||||
outdir_neb = TRIM( outdir ) // "/" // TRIM( prefix ) // "_" // &
|
||||
tmp_dir_neb = TRIM( tmp_dir ) // "/" // TRIM( prefix ) // "_" // &
|
||||
TRIM( int_to_char( image ) ) // '/'
|
||||
!
|
||||
! ... a scratch directory for this image of the elastic band is
|
||||
! ... created ( only by the master node )
|
||||
!
|
||||
IF ( ionode ) ios = f_mkdir( TRIM( outdir_neb ) )
|
||||
IF ( ionode ) ios = f_mkdir( TRIM( tmp_dir_neb ) )
|
||||
!
|
||||
! ... all jobs are syncronized
|
||||
!
|
||||
|
@ -237,11 +235,11 @@ MODULE path_routines
|
|||
!
|
||||
! ... each job checks whether the scratch directory is writable
|
||||
!
|
||||
ios = check_writable ( outdir_neb, mpime )
|
||||
ios = check_writable ( tmp_dir_neb, mpime )
|
||||
CALL mp_sum( ios )
|
||||
!
|
||||
IF ( ios /= 0 ) &
|
||||
CALL errore( 'outdir:', TRIM( outdir_neb ) // &
|
||||
CALL errore( 'outdir:', TRIM( tmp_dir_neb ) // &
|
||||
& ' non existent or non writable', 1 )
|
||||
!
|
||||
! ... if starting from scratch all temporary files are removed
|
||||
|
@ -252,7 +250,7 @@ MODULE path_routines
|
|||
! ... standard output of the self consistency is removed
|
||||
!
|
||||
IF ( ionode ) &
|
||||
CALL delete_if_present ( TRIM( outdir_neb ) // 'CP.out' )
|
||||
CALL delete_if_present ( TRIM( tmp_dir_neb ) // 'CP.out' )
|
||||
!
|
||||
END IF
|
||||
!
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
|
||||
USE xml_io_base, ONLY : save_print_counter
|
||||
USE cp_main_variables, ONLY : nprint_nfi, iprint_stdout
|
||||
USE io_files, ONLY : outdir
|
||||
USE io_files, ONLY : tmp_dir
|
||||
USE control_flags, ONLY : ndw, tdipole
|
||||
USE polarization, ONLY : print_dipole
|
||||
USE io_global, ONLY : ionode, ionode_id, stdout
|
||||
|
@ -83,10 +83,10 @@
|
|||
IF( tprint ) THEN
|
||||
IF ( tfile ) THEN
|
||||
! we're writing files, let's save nfi
|
||||
CALL save_print_counter( nfi, outdir, ndw )
|
||||
CALL save_print_counter( nfi, tmp_dir, ndw )
|
||||
ELSE IF ( tfilei ) then
|
||||
! not there yet, save the old nprint_nfi
|
||||
CALL save_print_counter( nprint_nfi, outdir, ndw )
|
||||
CALL save_print_counter( nprint_nfi, tmp_dir, ndw )
|
||||
END IF
|
||||
END IF
|
||||
!
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
USE cp_interfaces, ONLY: set_evtot, set_eitot
|
||||
USE electrons_base, ONLY: nspin, nbnd, nbsp, iupdwn, nupdwn
|
||||
USE electrons_module, ONLY: ei, ei_emp, n_emp, iupdwn_emp, nupdwn_emp
|
||||
USE io_files, ONLY: outdir
|
||||
USE io_files, ONLY: tmp_dir
|
||||
USE ensemble_dft, ONLY: tens
|
||||
USE mp, ONLY: mp_bcast
|
||||
USE mp_global, ONLY: root_image, intra_image_comm
|
||||
|
@ -90,7 +90,7 @@
|
|||
!
|
||||
IF( tens ) THEN
|
||||
!
|
||||
CALL cp_writefile( ndw, outdir, .TRUE., nfi, tps, acc, nk, xk, wk, &
|
||||
CALL cp_writefile( ndw, tmp_dir, .TRUE., nfi, tps, acc, nk, xk, wk, &
|
||||
ht, htm, htvel, gvel, xnhh0, xnhhm, vnhh, taui, cdmi , taus, &
|
||||
vels, tausm, velsm, fion, vnhp, xnhp0, xnhpm, nhpcl,nhpdim, occ_f , &
|
||||
occ_f , lambda, lambdam, xnhe0, xnhem, vnhe, ekincm, ei, &
|
||||
|
@ -98,10 +98,10 @@
|
|||
!
|
||||
ELSE
|
||||
!
|
||||
CALL cp_writefile( ndw, outdir, .TRUE., nfi, tps, acc, nk, xk, wk, &
|
||||
ht, htm, htvel, gvel, xnhh0, xnhhm, vnhh, taui, cdmi , taus, &
|
||||
vels, tausm, velsm, fion, vnhp, xnhp0, xnhpm, nhpcl,nhpdim, occ_f , &
|
||||
occ_f , lambda, lambdam, xnhe0, xnhem, vnhe, ekincm, eitot, &
|
||||
CALL cp_writefile( ndw, tmp_dir, .TRUE., nfi, tps, acc, nk, xk, wk, &
|
||||
ht, htm, htvel, gvel, xnhh0, xnhhm, vnhh, taui, cdmi , taus, &
|
||||
vels, tausm, velsm, fion, vnhp, xnhp0, xnhpm, nhpcl,nhpdim, occ_f,&
|
||||
occ_f , lambda, lambdam, xnhe0, xnhem, vnhe, ekincm, eitot, &
|
||||
rho, c0, cm, ctot, iupdwn, nupdwn, iupdwn_tot, nupdwn_tot )
|
||||
!
|
||||
END IF
|
||||
|
@ -124,7 +124,7 @@
|
|||
! read from file and distribute data calculated in preceding iterations
|
||||
!
|
||||
USE kinds, ONLY : DP
|
||||
USE io_files, ONLY : outdir
|
||||
USE io_files, ONLY : tmp_dir
|
||||
USE electrons_base, ONLY : nbnd, nbsp, nspin, nupdwn, iupdwn, keep_occ
|
||||
USE gvecw, ONLY : ngw, ngwt
|
||||
USE ions_base, ONLY : nsp, na, cdmi, taui
|
||||
|
@ -159,14 +159,14 @@
|
|||
LOGICAL::lopen
|
||||
|
||||
IF( flag == -1 ) THEN
|
||||
CALL cp_read_cell( ndr, outdir, .TRUE., ht, htm, htvel, gvel, xnhh0, xnhhm, vnhh )
|
||||
CALL cp_read_cell( ndr, tmp_dir, .TRUE., ht, htm, htvel, gvel, xnhh0, xnhhm, vnhh )
|
||||
h = TRANSPOSE( ht )
|
||||
hold = TRANSPOSE( htm )
|
||||
velh = TRANSPOSE( htvel )
|
||||
RETURN
|
||||
ELSE IF ( flag == 0 ) THEN
|
||||
DO ispin = 1, nspin
|
||||
CALL cp_read_wfc( ndr, outdir, 1, 1, ispin, nspin, c2 = cm(:,:), tag = 'm' )
|
||||
CALL cp_read_wfc( ndr, tmp_dir, 1, 1, ispin, nspin, c2 = cm(:,:), tag = 'm' )
|
||||
END DO
|
||||
RETURN
|
||||
END IF
|
||||
|
@ -174,13 +174,13 @@
|
|||
ALLOCATE( occ_ ( SIZE( occ_f ) ) )
|
||||
|
||||
IF( tens ) THEN
|
||||
CALL cp_readfile( ndr, outdir, .TRUE., nfi, tps, acc, nk, xk, wk, &
|
||||
CALL cp_readfile( ndr, tmp_dir, .TRUE., nfi, tps, acc, nk, xk, wk, &
|
||||
ht, htm, htvel, gvel, xnhh0, xnhhm, vnhh, taui, cdmi, taus, &
|
||||
vels, tausm, velsm, fion, vnhp, xnhp0, xnhpm, nhpcl,nhpdim,occ_ , &
|
||||
occ_ , lambda, lambdam, b1, b2, b3, &
|
||||
xnhe0, xnhem, vnhe, ekincm, c0, cm, mat_z = mat_z )
|
||||
ELSE
|
||||
CALL cp_readfile( ndr, outdir, .TRUE., nfi, tps, acc, nk, xk, wk, &
|
||||
CALL cp_readfile( ndr, tmp_dir, .TRUE., nfi, tps, acc, nk, xk, wk, &
|
||||
ht, htm, htvel, gvel, xnhh0, xnhhm, vnhh, taui, cdmi, taus, &
|
||||
vels, tausm, velsm, fion, vnhp, xnhp0, xnhpm, nhpcl,nhpdim,occ_ , &
|
||||
occ_ , lambda, lambdam, b1, b2, b3, &
|
||||
|
@ -231,7 +231,7 @@
|
|||
USE ions_nose, ONLY: vnhp, xnhp0, xnhpm, nhpcl, nhpdim
|
||||
USE cp_restart, ONLY: cp_writefile
|
||||
USE electrons_module, ONLY: ei, ei_emp, iupdwn_emp, nupdwn_emp, n_emp
|
||||
USE io_files, ONLY: outdir
|
||||
USE io_files, ONLY: tmp_dir
|
||||
USE grid_dimensions, ONLY: nr1, nr2, nr3, nr1x, nr2x, nr3x
|
||||
USE cp_interfaces, ONLY: set_evtot, set_eitot
|
||||
USE kohn_sham_states, ONLY: print_all_states
|
||||
|
@ -286,7 +286,7 @@
|
|||
!
|
||||
END IF
|
||||
!
|
||||
CALL cp_writefile( ndw, outdir, .TRUE., nfi, trutime, acc, nkpt, xk, wk, &
|
||||
CALL cp_writefile( ndw, tmp_dir, .TRUE., nfi, trutime, acc, nkpt, xk, wk, &
|
||||
ht_0%a, ht_m%a, ht_0%hvel, ht_0%gvel, xnhh0, xnhhm, vnhh, taui, cdmi, &
|
||||
atoms_0%taus, atoms_0%vels, atoms_m%taus, atoms_m%vels, atoms_0%for, &
|
||||
vnhp, xnhp0, xnhpm, nhpcl, nhpdim, occ, occ, lambda, lambda, &
|
||||
|
|
Loading…
Reference in New Issue