54 real(kind=
dp) :: jobtime
69 character(len=*) limit_str
70 integer :: str_len, sep_h, h, m, s
72 str_len = len_trim(limit_str)
74 if (str_len .lt. 8)
then
79 sep_h = scan(trim(limit_str),
':')
80 read(limit_str(1:sep_h-1), *) h
83 read(limit_str(sep_h+1:sep_h+2), *) m
86 read(limit_str(sep_h+4:str_len), *) s
108 character(len=LOG_SIZE) :: log_buf
114 write(log_buf,
'(A)')
'! stop at job limit >>>'
119 call mpi_bcast(jstop, 1, mpi_logical, 0,
neko_comm, ierr)
125 real(kind=
rp),
save :: stime
126 real(kind=
rp) :: jobtime
127 logical,
save :: init = .false.
134 jobtime = mpi_wtime() - stime
type(mpi_comm) neko_comm
MPI communicator.
subroutine jobctrl_set_time_limit_str(limit_str)
Set a job's time limit (in walltime 'HH:MM:SS')
logical function, public jobctrl_time_limit()
Check if the job's time limit has been reached.
real(kind=rp) function, public jobctrl_jobtime()
Returns a job's time in seconds relative to the first call.
subroutine jobctrl_set_time_limit_sec(sec)
Set a job's time limit (in seconds)
subroutine, public jobctrl_init()
Initialize jobctrl.
integer, parameter, public neko_log_quiet
Always logged.
type(log_t), public neko_log
Global log stream.
integer, parameter, public dp
integer, parameter, public rp
Global precision used in computations.
Interface to signal handler.
subroutine signal_trap_usr()
Initialize signal handler to trap SIGUSR1 and SIGUSR2.
logical function signal_timeout()
Check if any timeout has occurred (either SIGXCPU or SIGALRM)
subroutine signal_set_timeout(sec)
Set a timeout after seconds.
logical function signal_usr(usr)
Check if a user signal has been raised.
subroutine signal_trap_cpulimit()
Initialize signal handler to trap SIGXCPU.