[Pw_forum] CPU Timing

Eyvaz Isaev eyvaz_isaev at yahoo.com
Mon Apr 9 11:44:41 CEST 2007


Hi Paul,

I do not think you need "re-configure",   just do "re-make". 
 Because of that you replaced  cpitime.c you should recompile the code. 
 
So, relax.
 
Bests,
Eyvaz.

----- Original Message ----
From: Paul M. Grant <w2agz at pacbell.net>
To: pw_forum at pwscf.org
Sent: Monday, April 9, 2007 10:06:24 AM
Subject: [Pw_forum] CPU Timing
<!--  _filtered {font-family:"Comic Sans MS";panose-1:3 15 7 2 3 3 2 2 2 4;} /* Style Definitions */  p.MsoNormal, li.MsoNormal, div.MsoNormal 	{margin:0in;margin-bottom:.0001pt;font-size:12.0pt;font-family:"Times New Roman";} a:link, span.MsoHyperlink 	{color:blue;text-decoration:underline;} a:visited, span.MsoHyperlinkFollowed 	{color:purple;text-decoration:underline;} span.EmailStyle17 	{font-family:Arial;color:windowtext;}  _filtered {margin:1.0in 1.25in 1.0in 1.25in;} div.Section1 	{} --> To All (especially Paolo):
  
In February, Paolo sent me a “correction” to the standard distro of espresso-3.2 for cputime, listed below.  I’ve now copied the new source of cputime.c to 
/clib in my espresso directory.  I assume, of course, I have to re-“make,” but do I have to re-“configure” as well?  Needless to say, I’m kind of nervous about all this.
  
/*
  Copyright (C) 2002-2006 Quantum-Espresso group
  This file is distributed under the terms of the
  GNU General Public License. See the file `License'
  in the root directory of the present distribution,
  or http://www.gnu.org/copyleft/gpl.txt .
*/
  
#include <sys/time.h>
#include <sys/resource.h>
#include <unistd.h>
  
#include "c_defs.h"
  
double F77_FUNC(cclock,CCLOCK)()
  
/* Return the second elapsed since Epoch (00:00:00 UTC, January 1, 1970)
*/
  
{
  
    struct timeval tmp;
    double sec;
    gettimeofday( &tmp, (struct timezone *)0 );
    sec = tmp.tv_sec + ((double)tmp.tv_usec)/1000000.0;
    return sec;
  
}
  
double F77_FUNC(scnds,SCNDS) ( )
  
/* Return the cpu time associated to the current process
*/
  
{
        static struct rusage T;
  
        getrusage(RUSAGE_SELF, &T);
  
        return ((double)T.ru_utime.tv_sec + ((double)T.ru_utime.tv_usec)/1000000.0);
}
                                       
Paul M. Grant, PhD
Principal, W2AGZ Technologies
Visiting Scholar, Applied Physics,  Stanford University
EPRI Science Fellow (Retired)
IBM Research Staff Member Emeritus
w2agz at pacbell.net
http://www.w2agz.com



 
____________________________________________________________________________________
TV dinner still cooling? 
Check out "Tonight's Picks" on Yahoo! TV.
http://tv.yahoo.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.quantum-espresso.org/pipermail/users/attachments/20070409/e25cad83/attachment.html>


More information about the users mailing list