From: kier@team01.enet.dec.com (Mike Kier)
Subject: Re: How to get CPU time under OpenVMS Fortran ??
Date: 17 FEB 95 23:30:13 EST [thread overview]
Message-ID: <3i3u3l$41f@jac.zko.dec.com> (raw)
In-Reply-To: 3i07lf$sv6@cerberus-138.wustl.edu
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
next prev parent reply other threads:[~1995-02-18 4:30 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
1995-02-16 19:05 How to get CPU time under OpenVMS Fortran ?? Jay Ponder
1995-02-16 23:51 ` fairfield
1995-02-17 7:34 ` Dr Ivan D Reid, uSR Facility, PSI
1995-02-18 4:30 ` Mike Kier [this message]
1995-02-18 17:58 ` Martin Egger
1995-02-22 0:23 ` Larry Kilgallen, LJK Software
1995-02-27 17:14 ` Info on DEC PC - 425 ST Laurence Dumais
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox