From pueyo:~at~:pinon.ccu.uniovi.es Mon Dec 12 11:19:28 1994 Received: from opalo for pueyo # - at - # pinon.ccu.uniovi.es by www.ccl.net (8.6.9/930601.1506) id KAA09482; Mon, 12 Dec 1994 10:30:17 -0500 Received: from pinon.ccu.uniovi.es by etsiig.uniovi.es (PMDF V4.3-10 #4541) id <01HKK9I5QSTS8WY0PQ %-% at %-% etsiig.uniovi.es>; Mon, 12 Dec 1994 16:30:15 +0100 (GMT) Received: by pinon.ccu.uniovi.es (1.37.109.10G/16.2) id AA179686070; Mon, 12 Dec 1994 16:27:50 +0100 Date: Mon, 12 Dec 1994 16:27:50 +0100 From: Lorenzo Pueyo Subject: Re: CCL:"ETIME" command in LINUX (f77) To: CHEMISTRY -8 at 8- ccl.net, chemistry-request -8 at 8- ccl.net Message-id: <01HKK9I6FW1U8WY0PQ- at -etsiig.uniovi.es> Content-transfer-encoding: 7BIT 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 #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 ! \/ +--------------------------------------------+