Test for the completion of the run.
- Parameters
-
- Check if the number of steps is greater than nrun
- Check if the remaining time is smaller than the extra time
- Note
- For the time limit, we have to use a similar procedure as for the external stop signal, i.e. if one of the MPI tasks finds that the time limit is exceeded, we have to make sure that all the tasks get the information. Otherwise, there may be subtle bugs where not all the tasks exit the time loop leading to a MPI hang.
- Check if an external stop signal is found in the mystop file (every 30 seconds at most frequent)
If any of the tasks is complete, make everybody stop to prevent job hanging