source: palm/trunk/SOURCE/local_tremain.f90 @ 4677

Last change on this file since 4677 was 4677, checked in by raasch, 4 years ago

files re-formatted to follow the PALM coding standard

  • Property svn:keywords set to Id
File size: 2.3 KB
Line 
1!> @file local_tremain.f90
2!--------------------------------------------------------------------------------------------------!
3! This file is part of the PALM model system.
4!
5! PALM is free software: you can redistribute it and/or modify it under the terms of the GNU General
6! Public License as published by the Free Software Foundation, either version 3 of the License, or
7! (at your option) any later version.
8!
9! PALM is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
10! implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
11! Public License for more details.
12!
13! You should have received a copy of the GNU General Public License along with PALM. If not, see
14! <http://www.gnu.org/licenses/>.
15!
16! Copyright 1997-2020 Leibniz Universitaet Hannover
17!--------------------------------------------------------------------------------------------------!
18!
19! Current revisions:
20! -----------------
21!
22!
23! Former revisions:
24! -----------------
25! $Id: local_tremain.f90 4677 2020-09-14 07:55:28Z raasch $
26! file re-formatted to follow the PALM coding standard
27!
28! 4360 2020-01-07 11:25:50Z suehring
29! Corrected "Former revisions" section
30!
31! 3655 2019-01-07 16:51:22Z knoop
32! Corrected "Former revisions" section
33!
34! Revision 1.1  1998/03/18 20:14:47  raasch
35! Initial revision
36!
37!
38! Description:
39! ------------
40!> For different operating systems get the remaining cpu-time of the job
41!--------------------------------------------------------------------------------------------------!
42 SUBROUTINE local_tremain( remaining_time )
43
44
45    USE control_parameters,                                                                        &
46        ONLY:  maximum_cpu_time_allowed
47
48    USE cpulog,                                                                                    &
49        ONLY:  initial_wallclock_time
50
51    USE kinds
52
53    USE pegrid
54
55    IMPLICIT NONE
56
57    INTEGER(idp) ::  count                 !<
58    INTEGER(idp) ::  count_rate            !<
59
60    REAL(wp)     ::  current_wallclock_time !<
61    REAL(wp)     ::  remaining_time        !<
62
63    CALL SYSTEM_CLOCK( count, count_rate )
64    current_wallclock_time = REAL( count, KIND=wp ) / REAL( count_rate, KIND=wp )
65    remaining_time = maximum_cpu_time_allowed - ( current_wallclock_time - initial_wallclock_time )
66
67 END SUBROUTINE local_tremain
Note: See TracBrowser for help on using the repository browser.