Hi, I would like to time a benchmarking FORTRAN program.
Calvin H. Vu
calvin at dinkum.wpd.sgi.com
Fri Sep 22 07:28:11 AEST 1989
In article <8909211423.AA06605 at prism.gatech.edu>, ccsupos%prism at GATECH.EDU ("SCHREIBER, O. A.") writes:
> I would like to time a FORTRAN program.
> Would anybody tell me how to do it on an
> IRIS4D120GTX and IRIS4D50GT.
> I have tried call time(t) without luck.
> Thanks in advance.
>
If you don't need better resolution than seconds, you can use time().
The way to use it is:
integer t1, t2, time
external time
t1 = time()
......................... do something here
t2 = time() - t1 ! t2 should be the elapsed time
The reason for the EXTERNAL statement is that there are two versions
of time(): an intrinsic VMS-compatible version, and a library version.
Using time() without the EXTERNAL statement will default to the
intrinsic version and give you an error message if you don't provide
an argument. This is documented in the 3.1 release notes.
If you want microsecond resolution you will have to use C and call
gettimeofday(). You can look up in the manual to find out how to
call a C subroutine from Fortran.
> Olivier Schreiber (404)894 6147, Office of Computing Services
> Georgia Institute of Technology, Atlanta Georgia, 30332
> uucp: ...!{allegra,amd,hplabs,seismo,ut-ngp}!gatech!prism!ccsupos
> ARPA: ccsupos at prism.gatech.edu
Hope it helps,
Calvin Vu
Silicon Graphics Computer Systems
calvin at sgi.sgi.com
More information about the Comp.sys.sgi
mailing list