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 routines2and 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 system time''. The following version of SECOND in second_EXT_ETIME.f, second_INT_ETIME.f 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.

Since LAPACK 3.1.1 we provide 5 different flavours of the SECOND and DSECND routines. The version that will be used depends on the value of the TIMER variable in the make.inc

The test program in secondtst.f performs a million operations using 5000 iterations of the SAXPY operation 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. The test program executable is called testsecond (or testdsecnd). There is no single right answer, but the times in seconds should be positive and the megaflop ratios should be appropriate for your machine.


next up previous contents
Next: Testing IEEE arithmetic and Up: Test and Install the Previous: Installing SLAMCH and DLAMCH   Contents
Julie Langou 2007-02-26