1 subroutine rerun_check(stopjob) 2 3 include "common.h" 4 include "mpif.h" 5 6 integer stopjob 7 8 stopjob = -1 9 10 if(myrank.eq.master) then 11 open(unit=772,file='rerun-check',status='old',iostat=ierr) 12 if(ierr.eq.0) read(772,*)stopjob 13 close(772) 14 endif 15 16 call MPI_BCAST(stopjob,1,MPI_INTEGER,master, 17 . MPI_COMM_WORLD,ierr) 18 19 return 20 end 21