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
- If ETIME is available as an external function, set the value of the TIMER variable in your
make.inc to EXT_ETIME:second_EXT_ETIME.f and dsecnd_EXT_ETIME.f will be used.
Usually on HPPA architectures,
the compiler and loader flag +U77 should be included to access
the function ETIME.
- If ETIME_ is available as an external function, set the value of the TIMER variable in your make.inc
to EXT_ETIME_:second_EXT_ETIME_.f and dsecnd_EXT_ETIME_.f will be used.
It is the case on some IBM architectures such as IBM RS/6000s.
- If ETIME is available as an internal function, set the value of the TIMER variable in your make.inc
to INT_ETIME:second_INT_ETIME.f and dsecnd_INT_ETIME.f will be used.
This is the case with gfortan.
- If CPU_TIME is available as an internal function, set the value of the TIMER variable in your make.inc
to INT_CPU_TIME:second_INT_CPU_TIME.f and dsecnd_INT_CPU_TIME.f will be used.
- If none of these function is available, set the value of the TIMER variable in your make.inc
to NONE:second_NONE.f and dsecnd_NONE.f will be used.
These routines will always return zero.
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: Testing IEEE arithmetic and
Up: Test and Install the
Previous: Installing SLAMCH and DLAMCH
Contents
Julie Langou
2007-02-26