File: checkrst.f90

package info (click to toggle)
elkcode 10.8.1-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 10,672 kB
  • sloc: f90: 52,747; perl: 964; makefile: 352; sh: 296; python: 105; ansic: 67
file content (23 lines) | stat: -rw-r--r-- 634 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23

! Copyright (C) 2024 J. K. Dewhurst and S. Sharma.
! This file is distributed under the terms of the GNU General Public License.
! See the file COPYING for license details.

subroutine checkrst
use modmain
use modmpi
use moddelf
implicit none
! check for RESTART file (only MPI master process)
if (mp_mpi) then
  inquire(file='RESTART',exist=trestart)
  if (trestart) then
    write(*,'("Info(checkrst): RESTART file exists")')
! delete the RESTART file
    call delfile('RESTART')
  end if
end if
! broadcast trestart from master process to all other processes
call mpi_bcast(trestart,1,mpi_logical,0,mpicom,ierror)
end subroutine