From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,2ddd659c8ae44fe3 X-Google-Attributes: gid1164f8,public X-Google-ArrivalTime: 1995-02-18 05:13:55 PST Path: nntp.gmd.de!stern.fokus.gmd.de!ceres.fokus.gmd.de!zib-berlin.de!news.mathworks.com!news.alpha.net!uwm.edu!lll-winken.llnl.gov!decwrl!pa.dec.com!jac.zko.dec.com!team01.enet.dec.com!kier From: kier@team01.enet.dec.com (Mike Kier) Newsgroups: comp.sys.dec Subject: Re: How to get CPU time under OpenVMS Fortran ?? Date: 17 FEB 95 23:30:13 EST Organization: DEC - Systems Integration, Cincinnati Message-ID: <3i3u3l$41f@jac.zko.dec.com> References: <3i07lf$sv6@cerberus-138.wustl.edu> NNTP-Posting-Host: TEAM01 In article <3i07lf$sv6@cerberus-138.wustl.edu>, ponder@dasher.wustl.edu (Jay Ponder) writes... > >I'm trying to benchmark a Fortran program on the network available >Alpha-based OpenVMS system (axpvms.pa.dec.com), but I need to know >the OpenVMS way of getting the elapsed CPU time for a process from >Fortran. The OpenVMS Fortran does not support "etime" as does the >OSF/1 version. I used to have a small hunk of VAX/VMS Fortran code >that used a call to SYS$GETJPI to get the elapsed time. It worked >seven years ago, but seems to fail now. Since I don't have access >to the required OpenVMS docs, could some kind sole help me out.... > I usually use LIB$INIT_TIMER and either LIB$STAT_TIMER or LIB$SHOW_TIMER depending on whether I want the values for use inside the program or just displayed on SYS$OUTPUT. LIB$INIT_TIMER [context] LIB$STAT_TIMER code, value-argument [,handle-address] code - longword, read only by reference 1 is elapsed time (quadword system time format) 2 is CPU time (longword in 10ms increments) 3 is Buffered I/O (longword) 4 is Direct I/O (longword) 5 is Page faults (longword) value-argument - unspecified, write only by reference address of the location to receive the result handle-address - longword, read only by reference same as context if used in LIB$INIT_TIMER (used to get stats for different threads of execution) LIB$SHOW_TIMER [handle-address][,code][,user-action-procedure][,user-argument-value] handle-address - longword, read only be reference code - longword, read only by reference user-action-procedure - procedure entry mask by value if specified, routined is entered with two arguments. The first is the character string by descriptor containing the buffer that would have been written to SYS$OUTPUT. The second is the user-argument-value, by value. user-argument-value - unspecified, read only be value omitting all arguments causes all 5 code values to be displayed to SYS$OUTPUT e.g. ! ! Set up to measure ! STATUS = LIB$INIT_TIMER() STATUS = LIB$SHOW_TIMER() ! Show initial values in case we ! has a page fault or a clock ! tick was charged to us . . . ! work to me measured . STATUS = LIB$SHOW_TIMER() ! Show ending values = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Mike Kier | "Our legislators are not sufficiently Digital Equipment Corporation | apprized of the rightful limits of their 10101 Alliance Rd. | power; that their true office is to declare Blue Ash, OH USA 45242 | and enforce only our natural rights and 513.984.7715 | duties, and to take none of them from us." kier@team01.enet.dec.com | Thomas Jefferson, 1816