Re: CCL:"ETIME" command in LINUX (f77)
Here you have a routine etime.c that compiles with no problem on a Linux
box and can be called from any fortran program.
On the other hand, I have been developing programs on Linux and porting
them effortless to Convex (and nearly effortless to HP's) for the last year.
The standard route is to use the f77 shell script directly available in the
Slackware distribution of Linux. F77 uses f2c in a transparent way to
translate your f77 code to c, and then it uses the gcc compiler. The process
is quite fast and clean. The only problem with this method is that using
the gdb debugger is cumbersome.
Best regards,
Victor Lua~na
>>>>>>>>>>>>>>>>>>>
etime.c
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
/*
etime implementation, by Kevin Dowd, 'High Performance Computing',
(O'Reilly, Sebastopol, CA, 1993)
*/
#include <sys/times.h>
#define INTERVAL 60
float etime_ (tarray)
struct { float user; float system; } *tarray;
{
struct tms local;
times (&local);
tarray->user = (float) local.tms_utime/INTERVAL;
tarray->system = (float) local.tms_stime/INTERVAL;
return (tarray->user + tarray->system);
}
+--------------------------------------------+ +---^---/ /
! Victor Lua~na ! | ~ / Just in case
! Departamento de Quimica Fisica y Analitica ! | | you don't
! Universidad de Oviedo, 33006-Oviedo, Spain ! < / remember
! e-mail: victor \\at// hobbit.quimica.uniovi.es ! | / where
Oviedo
! phone: (34)-8-5103523 ! |____ ___/ is ;-)
! fax: (34)-8-5103480 ! \/
+--------------------------------------------+