Bug fix: if some occupations were missing the code started an infinite loop

that filled the disk with garbage.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@5469 c92efa57-630b-4861-b058-cf58834340f0
This commit is contained in:
dalcorso 2009-03-11 14:17:24 +00:00
parent e01974b356
commit 9501d97cdd
1 changed files with 4 additions and 1 deletions

View File

@ -1087,6 +1087,7 @@ MODULE read_cards_module
INTEGER :: nfield, nbnd_read, nf, ierr INTEGER :: nfield, nbnd_read, nf, ierr
LOGICAL, SAVE :: tread = .FALSE. LOGICAL, SAVE :: tread = .FALSE.
REAL(DP),EXTERNAL :: eval_infix REAL(DP),EXTERNAL :: eval_infix
LOGICAL :: tef
! !
! !
IF ( tread ) THEN IF ( tread ) THEN
@ -1100,7 +1101,9 @@ MODULE read_cards_module
! !
nbnd_read = 0 nbnd_read = 0
DO WHILE ( nbnd_read < nbnd) DO WHILE ( nbnd_read < nbnd)
CALL read_line( input_line ) CALL read_line( input_line, end_of_file=tef )
IF (tef) CALL errore('card_occupations',&
'Missing occupations, end of file reached',1)
CALL field_count( nfield, input_line ) CALL field_count( nfield, input_line )
! !
DO nf = 1,nfield DO nf = 1,nfield