55 real(kind=
dp) :: jobtime
70 character(len=*) limit_str
71 integer :: str_len, sep_h, h, m, s
73 str_len = len_trim(limit_str)
75 if (str_len .lt. 8)
then
80 sep_h = scan(trim(limit_str),
':')
81 read(limit_str(1:sep_h-1), *) h
84 read(limit_str(sep_h+1:sep_h+2), *) m
87 read(limit_str(sep_h+4:str_len), *) s
109 character(len=LOG_SIZE) :: log_buf
115 write(log_buf,
'(A)')
'! stop at job limit >>>'
120 call mpi_bcast(jstop, 1, mpi_logical, 0,
neko_comm, ierr)
126 real(kind=
rp),
save :: stime
127 real(kind=
rp) :: jobtime
128 logical,
save :: init = .false.
135 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, public signal_set_timeout(sec)
Set a timeout after seconds.
logical function, public signal_usr(usr)
Check if a user signal has been raised.
subroutine, public signal_trap_usr()
Initialize signal handler to trap SIGUSR1 and SIGUSR2.
logical function, public signal_timeout()
Check if any timeout has occurred (either SIGXCPU or SIGALRM)
subroutine, public signal_trap_cpulimit()
Initialize signal handler to trap SIGXCPU.