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

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