mirror of https://gitlab.com/QEF/q-e.git
The trick suggested by Francesco Antoniella ( input from file ) is now coded
in iosys (input.f90). C.S. git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@456 c92efa57-630b-4861-b058-cf58834340f0
This commit is contained in:
parent
75d26e1992
commit
c690c6d228
28
PW/input.f90
28
PW/input.f90
|
@ -186,13 +186,39 @@ SUBROUTINE iosys()
|
|||
!
|
||||
! ... local variables
|
||||
!
|
||||
INTEGER :: unit = 5, i, ia, ios, ierr, ilen, is, image
|
||||
INTEGER :: unit = 5, &! standard input unit
|
||||
i, iiarg, nargs, ia, ios, ierr, ilen, is, image
|
||||
INTEGER :: iargc
|
||||
EXTERNAL iargc
|
||||
CHARACTER (LEN=80) :: input_file
|
||||
!
|
||||
!
|
||||
CALL getenv( 'HOME', pseudo_dir )
|
||||
!
|
||||
pseudo_dir = TRIM( pseudo_dir ) // '/pw/pseudo/'
|
||||
!
|
||||
! ... Input from file ?
|
||||
!
|
||||
nargs = iargc()
|
||||
!
|
||||
DO iiarg = 1, ( nargs - 1 )
|
||||
!
|
||||
CALL getarg( iiarg, input_file )
|
||||
IF ( TRIM( input_file ) == '-input' .OR. &
|
||||
TRIM( input_file ) == '-inp' .OR. &
|
||||
TRIM( input_file ) == '-in' ) THEN
|
||||
!
|
||||
CALL getarg( ( iiarg + 1 ) , input_file )
|
||||
OPEN ( UNIT = unit, FILE = input_file, FORM = 'FORMATTED', &
|
||||
STATUS = 'OLD', IOSTAT = ierr )
|
||||
CALL errore( 'iosys', 'input file ' // TRIM( input_file ) // &
|
||||
& ' not found' , ierr )
|
||||
!
|
||||
END IF
|
||||
!
|
||||
END DO
|
||||
!
|
||||
!
|
||||
CALL read_namelists( 'PW' )
|
||||
!
|
||||
nraise = 100
|
||||
|
|
|
@ -94,24 +94,20 @@ SUBROUTINE startup( nd_nmbr, code, version )
|
|||
! ... How many pools ?
|
||||
!
|
||||
npool = 1
|
||||
nargs = IARGC()
|
||||
nargs = iargc()
|
||||
!
|
||||
DO iiarg = 1, ( nargs - 1 )
|
||||
!
|
||||
CALL getarg( iiarg, np )
|
||||
IF ( TRIM( np ) == '-npool' .OR. TRIM( np ) == '-npools' ) THEN
|
||||
CALL GETARG( ( iiarg + 1 ), np )
|
||||
READ(np,*) npool
|
||||
!
|
||||
CALL getarg( ( iiarg + 1 ), np )
|
||||
READ( np, * ) npool
|
||||
!
|
||||
END IF
|
||||
IF ( TRIM( np ) == '-input' .OR. TRIM( np ) == '-inp' .OR. &
|
||||
TRIM( np ) == '-in' ) THEN
|
||||
CALL GETARG( ( iiarg + 1 ) , np )
|
||||
OPEN ( UNIT = 5, FILE = np, FORM = 'formatted', &
|
||||
STATUS = 'old', IOSTAT = ierr)
|
||||
CALL errore( 'startup', 'input file '//TRIM(np)//' not found',&
|
||||
ierr )
|
||||
end if
|
||||
|
||||
!
|
||||
END DO
|
||||
!
|
||||
npool = MAX( npool, 1 )
|
||||
npool = MIN( npool, nproc )
|
||||
!
|
||||
|
@ -133,7 +129,7 @@ SUBROUTINE startup( nd_nmbr, code, version )
|
|||
! ... set the processor label for files
|
||||
!
|
||||
IF ( nproc > maxproc ) &
|
||||
call errore( 'startup', ' too many processors', nproc )
|
||||
CALL errore( 'startup', ' too many processors', nproc )
|
||||
nd_nmbr = ' '
|
||||
IF ( nproc < 10 ) THEN
|
||||
WRITE( nd_nmbr(1:1) , '(I1)' ) me
|
||||
|
|
Loading…
Reference in New Issue