From: Dawid Jagiela Date: Wed, 31 Oct 2012 15:00:55 +0000 (+0100) Subject: tcpu function fix for gfortran X-Git-Tag: v.3.2~62 X-Git-Url: http://mmka.chem.univ.gda.pl/gitweb/?p=unres.git;a=commitdiff_plain;h=a7988667d774b6f3a74cac5b23473ab9bd865a1e tcpu function fix for gfortran --- diff --git a/source/cluster/unres/src/COMMON.TIME1 b/source/cluster/unres/src/COMMON.TIME1 index b6e9c88..8cbc327 100644 --- a/source/cluster/unres/src/COMMON.TIME1 +++ b/source/cluster/unres/src/COMMON.TIME1 @@ -1,4 +1,4 @@ - DOUBLE PRECISION BATIME,TIMLIM,STIME,PREVTIM,SAFETY + double precision BATIME,TIMLIM,STIME,PREVTIM,SAFETY INTEGER ISTOP COMMON/TIME1/STIME,TIMLIM,BATIME,PREVTIM,SAFETY COMMON/STOPTIM/ISTOP diff --git a/source/cluster/unres/src/timing.F b/source/cluster/unres/src/timing.F index 9f0b732..ecab9b4 100644 --- a/source/cluster/unres/src/timing.F +++ b/source/cluster/unres/src/timing.F @@ -3,8 +3,11 @@ C $Revision: 2.2 $ C C C +C========================================================================= +C subroutine set_timers c + double precision tcpu ! function include 'COMMON.TIME1' C Diminish the assigned time limit a little so that there is some time to C end a batch job @@ -12,7 +15,11 @@ c timlim=batime-150.0 C Calculate the initial time, if it is not zero (e.g. for the SUN). stime=tcpu() return - end + end ! end of set_timers + + +C========================================================================= +C logical function stopx(nf) C C .................................................................. @@ -40,7 +47,7 @@ C .................................................................. C include 'DIMENSIONS' integer nf - logical ovrtim + logical ovrtim ! function include 'COMMON.IOUNITS' include 'COMMON.TIME1' #ifdef MPL @@ -72,8 +79,12 @@ cd print *,'Processor ',MyID,' is checking STOP: nf=',nf stopx = .false. endif return - end + end !end of stopx + +C========================================================================= +C logical function ovrtim() + double precision tcpu ! function include 'COMMON.TIME1' C Set a 100.0 secs. safety margin, so as to allow for the termination of C a batch job. @@ -83,8 +94,10 @@ cd print *,'curtim=',curtim,' timlim=',timlim C curtim is the current time in seconds. ovrtim=(curtim .ge. timlim - safety ) return - end -************************************************************************** + end ! end of ovrtim + +C========================================================================= +C double precision function tcpu() include 'COMMON.TIME1' #ifdef ES9000 @@ -140,10 +153,22 @@ C Next definitions for RS6000 i1 = mclock() tcpu = (i1+0.0D0)/100.0D0 #endif +#ifdef LINUX +**************************** +C Next definitions for Linux + real :: timar(2) + real :: seconds + seconds = etime(timar) + tcpu=DBLE(seconds - stime) +**************************** +#endif return - end -* + end ! end of tcpu + + +C========================================================================= +C subroutine dajczas(rntime,hrtime,mintime,sectime) include 'COMMON.IOUNITS' real*8 rntime,hrtime,mintime,sectime diff --git a/source/cluster/wham/src/timing.F b/source/cluster/wham/src/timing.F index 1fc1ddf..ecab9b4 100644 --- a/source/cluster/wham/src/timing.F +++ b/source/cluster/wham/src/timing.F @@ -3,8 +3,11 @@ C $Revision: 2.2 $ C C C +C========================================================================= +C subroutine set_timers c + double precision tcpu ! function include 'COMMON.TIME1' C Diminish the assigned time limit a little so that there is some time to C end a batch job @@ -12,7 +15,11 @@ c timlim=batime-150.0 C Calculate the initial time, if it is not zero (e.g. for the SUN). stime=tcpu() return - end + end ! end of set_timers + + +C========================================================================= +C logical function stopx(nf) C C .................................................................. @@ -40,7 +47,7 @@ C .................................................................. C include 'DIMENSIONS' integer nf - logical ovrtim + logical ovrtim ! function include 'COMMON.IOUNITS' include 'COMMON.TIME1' #ifdef MPL @@ -72,8 +79,12 @@ cd print *,'Processor ',MyID,' is checking STOP: nf=',nf stopx = .false. endif return - end + end !end of stopx + +C========================================================================= +C logical function ovrtim() + double precision tcpu ! function include 'COMMON.TIME1' C Set a 100.0 secs. safety margin, so as to allow for the termination of C a batch job. @@ -83,8 +94,10 @@ cd print *,'curtim=',curtim,' timlim=',timlim C curtim is the current time in seconds. ovrtim=(curtim .ge. timlim - safety ) return - end -************************************************************************** + end ! end of ovrtim + +C========================================================================= +C double precision function tcpu() include 'COMMON.TIME1' #ifdef ES9000 @@ -142,18 +155,20 @@ C Next definitions for RS6000 #endif #ifdef LINUX **************************** -C Next definitions for sgi - real timar(2), etime +C Next definitions for Linux + real :: timar(2) + real :: seconds seconds = etime(timar) -Cd print *,'seconds=',seconds,' stime=',stime -C usrsec = timar(1) -C syssec = timar(2) - tcpu=seconds - stime + tcpu=DBLE(seconds - stime) **************************** #endif + return - end -* + end ! end of tcpu + + +C========================================================================= +C subroutine dajczas(rntime,hrtime,mintime,sectime) include 'COMMON.IOUNITS' real*8 rntime,hrtime,mintime,sectime