diff --git a/PH/check_restart_recover.f90 b/PH/check_restart_recover.f90 index 568895f5a..487276449 100644 --- a/PH/check_restart_recover.f90 +++ b/PH/check_restart_recover.f90 @@ -14,20 +14,15 @@ iunrec = 99 iunres = 98 CALL seqopn (iunrec, 'recover', 'unformatted', exst_recover) CALL seqopn( iunres, 'restart', 'UNFORMATTED', exst_restart ) -IF (.not.exst_recover.and..not.exst_restart) THEN - close (unit = iunrec, status = 'delete') - close (unit = iunres, status = 'delete') +IF (exst_recover) THEN + close (unit = iunrec, status = 'keep') ELSE - IF (exst_recover) THEN - close (unit = iunrec, status = 'keep') - ELSE - close (unit = iunrec, status = 'delete') - ENDIF - IF (exst_restart) THEN - close (unit = iunres, status = 'keep') - ELSE - close (unit = iunres, status = 'delete') - ENDIF + close (unit = iunrec, status = 'delete') +ENDIF +IF (exst_restart) THEN + close (unit = iunres, status = 'keep') +ELSE + close (unit = iunres, status = 'delete') ENDIF RETURN END SUBROUTINE check_restart_recover diff --git a/PH/initialize_ph.f90 b/PH/initialize_ph.f90 index d136747ea..6a3646191 100644 --- a/PH/initialize_ph.f90 +++ b/PH/initialize_ph.f90 @@ -41,8 +41,8 @@ SUBROUTINE initialize_ph() ! END IF ! - ! Save the current status of the run: all the flags, the list of q, - ! and the current q, the fact that we are after the bands + ! Save again the status of the run because now the bands have been + ! calculated ! CALL ph_writefile('init',0) !