next up previous contents
Next: Testing IEEE arithmetic and Up: Test and Install the Previous: Installing SLAMCH and DLAMCH   Contents

Installing SECOND and DSECND

Both the timing routines and the test routines call SECOND (DSECND), a real function with no arguments that returns the time in seconds from some fixed starting time. Our version of this routine returns only ``user time'', and not ``user time 10#10 system time''. The version of second in SECONDF calls ETIME, a Fortran library routine available on some computer systems. If ETIME is not available or a better local timing function exists, you will have to provide the correct interface to SECOND and DSECND on your machine.

The test program in TSECONDF performs a million operations using 5000 iterations of the SAXPY operation 11#11 on a vector of length 100. The total time and megaflops for this test is reported, then the operation is repeated including a call to SECOND on each of the 5000 iterations to determine the overhead due to calling SECOND. Compile SECONDF and TSECONDF and run the test program. There is no single right answer, but the times in seconds should be positive and the megaflop ratios should be appropriate for your machine. Repeat this test for DSECNDF and TDSECNDF and save SECOND and DSECND for inclusion in the LAPACK library in Section A.5.


next up previous contents
Next: Testing IEEE arithmetic and Up: Test and Install the Previous: Installing SLAMCH and DLAMCH   Contents
Susan Blackford 2001-08-13