[Scipy-svn] r7099 - in trunk/scipy: optimize/lbfgsb sparse/linalg/eigen/arpack/ARPACK/UTIL

scipy-svn at scipy.org scipy-svn at scipy.org
Sat Jan 29 14:17:31 EST 2011


Author: ptvirtan
Date: 2011-01-29 13:17:31 -0600 (Sat, 29 Jan 2011)
New Revision: 7099

Modified:
   trunk/scipy/optimize/lbfgsb/routines.f
   trunk/scipy/sparse/linalg/eigen/arpack/ARPACK/UTIL/second.f
Log:
BUG: use CPU_TIME intrinsic instead of ETIME in Fortran code (#1376)

Modified: trunk/scipy/optimize/lbfgsb/routines.f
===================================================================
--- trunk/scipy/optimize/lbfgsb/routines.f	2011-01-29 19:02:01 UTC (rev 7098)
+++ trunk/scipy/optimize/lbfgsb/routines.f	2011-01-29 19:17:31 UTC (rev 7099)
@@ -3824,6 +3824,7 @@
 
       subroutine timer(ttime)
       double precision ttime
+      real t1
 c     *********
 c
 c     Subroutine timer
@@ -3846,15 +3847,9 @@
 c     Modified October 1990 by Brett M. Averick.
 c
 c     **********
-      real temp
-      real tarray(2)
-      real etime
 
-c     The first element of the array tarray specifies user time
-
-      temp = etime(tarray) 
-
-      ttime = dble(tarray(1))
+      call cpu_time(t1)
+      ttime = t1
  
       return
 

Modified: trunk/scipy/sparse/linalg/eigen/arpack/ARPACK/UTIL/second.f
===================================================================
--- trunk/scipy/sparse/linalg/eigen/arpack/ARPACK/UTIL/second.f	2011-01-29 19:02:01 UTC (rev 7098)
+++ trunk/scipy/sparse/linalg/eigen/arpack/ARPACK/UTIL/second.f	2011-01-29 19:17:31 UTC (rev 7099)
@@ -11,23 +11,10 @@
 *  =======
 *
 *  SECOND returns the user time for a process in seconds.
-*  This version gets the time from the system function ETIME.
+*  This version gets the time from the system function CPU_TIME.
 *
-*     .. Local Scalars ..
-      REAL               T1
-*     ..
-*     .. Local Arrays ..
-      REAL               TARRAY( 2 )
-*     ..
-*     .. External Functions ..
-      REAL               ETIME
-*      EXTERNAL           ETIME
-*     ..
-*     .. Executable Statements ..
-*
 
-      T1 = ETIME( TARRAY )
-      T  = TARRAY( 1 )
+      CALL CPU_TIME(T)
 
       RETURN
 *




More information about the Scipy-svn mailing list