Pseudopotential file wasn't closed after an unsuccesfull attempt to read,

leading to an error when debug flags are activated
This commit is contained in:
Paolo Giannozzi 2020-09-01 08:34:05 +00:00
parent e0b24e8376
commit d5c91fbaca
2 changed files with 2 additions and 1 deletions

View File

@ -189,7 +189,7 @@ SUBROUTINE readpp ( input_dft, printout, ecutwfc_pp, ecutrho_pp )
!
ELSE
!
OPEN ( UNIT = iunps, FILE = TRIM(file_pseudo), STATUS = 'old', FORM = 'formatted' )
OPEN ( UNIT = iunps, FILE = file_pseudo, STATUS = 'old', FORM = 'formatted' )
!
! The type of the pseudopotential is determined by the file name:
! *.xml or *.XML UPF format with schema pp_format=0

View File

@ -55,6 +55,7 @@ CONTAINS
end if
end if
if ( ierr /= 0 .and. ierr /= -2 ) then
call xml_closefile( )
ierr = -81
return
end if