Since QE 5.1 restarting from an arbitrary point of the code is no more supported.
The code must terminate properly in order for restart to be possible. A clean stop can be triggered by one the following three conditions:
After the condition is met, the code will try to stop cleanly as soon as possible, which can take a while for large calculation. Writing the files to disk can also be a long process. In order to be safe you need to reserve sufficient time for the stop process to complete.
If the previous execution of the code has stopped properly, restarting is possible setting restart_mode=``restart'' in the control namelist.
Common queue systems will send a signal some time before killing a job. The exact behaviour depends on the queue systems and could be configured. Some examples:
With PBS:
With LoadLeveler (untested): the SIGXCPU signal will be sent when wall softlimit is reached, it will then stop the job when hardlimit is reached. You can specify both limits as:
# @ wall_clock_limit = hardlimit,softlimit
e.g. you can give pw.x thirty minutes to stop using:
# @ wall_clock_limit = 5:00,4:30